Skip to main content

Python tools for OpenFOAM

Project description

Docs CI Codecov

pyOFTools

Python tools and utilities for OpenFOAM

Currently in the pre-alpha release state.

Description

pyOFTools is a collection of Python utilities for working with OpenFOAM simulations. It provides:

  • Region selection and geometry tools
  • Field manipulation functions
  • Post-processing utilities
  • Time series analysis
  • Dictionary handling

Installation

Prerequisites

  • Python 3.8 or higher
  • OpenFOAM of2012 or higher (for OpenFOAM integration features)
  • Required Python packages: numpy, pydantic

Install from PyPI (when available)

pip install pyOFTools

Install from source

git clone https://github.com/HenningScheufler/pyOFTools
cd pyOFTools
pip install -e .

Development installation

git clone https://github.com/HenningScheufler/pyOFTools
cd pyOFTools
pip install -e ".[dev]"

Usage

import pyOFTools

# Use region selection tools
from pyOFTools import Box, Sphere

# Create geometric regions
box = Box(min=(0, 0, 0), max=(1, 1, 1))
sphere = Sphere(center=(0.5, 0.5, 0.5), radius=0.3)

# Combine regions
region = box & sphere  # intersection

OpenFOAM Integration

The project also includes CMake build system for embedding Python into OpenFOAM as function objects. The CMake build is separate from the Python package installation.

Testing

Run the test suite:

pytest

Documentation

Documentation is work in progress and will be available at the project homepage.

License

GPL-3.0-or-later

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyoftools-0.3.0.tar.gz (442.0 kB view details)

Uploaded Source

File details

Details for the file pyoftools-0.3.0.tar.gz.

File metadata

  • Download URL: pyoftools-0.3.0.tar.gz
  • Upload date:
  • Size: 442.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyoftools-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4b815dd68e6f6da1ca2a43b68f2654c5ea6414a7a339a0f657ac236dabad0d55
MD5 0c68f81e65a4bd88aa0622fe91757044
BLAKE2b-256 7fe0e32d67db8a25675637bc183b81888c6bd462ef9ad1886f46a2dac3ddef9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyoftools-0.3.0.tar.gz:

Publisher: publish.yml on HenningScheufler/pyOFTools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page