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.1.1.tar.gz (427.5 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pyoftools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 166bc77e9dd068903fd9f2f6134639f9c5a640d156d504919ff2812e6755fdd8
MD5 b2d9d2383abbc64f40af4b837b368031
BLAKE2b-256 3609b4da2fafac50c4f38b884fb955e3a34d53eaa808a239611e62b6fb5982bb

See more details on using hashes here.

Provenance

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