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/DLR-RY/pyOFTools.git
cd pyOFTools
pip install -e .

Development installation

git clone https://github.com/DLR-RY/pyOFTools.git
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.2.0.tar.gz (489.8 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pyoftools-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6e899810b7425799a62b11232a5058bbd3b41f295017fa8eccb78da2faee2718
MD5 69d38d11c8479496f18f877aa2a53b96
BLAKE2b-256 c1763332c02bc621c4e9253486fb51e2aff506734dd43ab368e64fb65a4f5010

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyoftools-0.2.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