Skip to main content

Contributors Forks Stargazers Issues GPL-3.0 License


Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact

About The Project

This repository was originally designed to solve the problem of complex OpenFOAM case structure, and the solution was to re-present the original cases using the common configuration file format YAML. Later, since there is a corresponding package for the YAML format in Python, I wrote this Python interface package for OpenFOAM, and then I added progress bars to most OpenFOAM solvers by analyzing log files in real time. Although there are still many details to be specified in this repository, its function of generating cases and calling solvers is ready for preliminary use, for example, I used this package to generate cases in batch in my own project. In the future I would like to integrate the post-processing steps into this interface package as well.

(back to top)

Getting Started

This project currently uses Poetry to manage Python dependencies. I've heard good things about PDM so far, and may provide PDM support subsequently.

Installation

pip3 install ifoam[full]

Demo

Save the following demo code as a separate file (e.g. demo.py).

from foam import Foam

foam = Foam.from_demo('cavity')
foam['foam']['system', 'controlDict', 'endTime'] = 1.0
foam.save('cavity')
foam.cmd.all_run()

Running the demo code in the virtual environment results in the following output.

$ python demo.py

Foam.from_file('.../of.yaml/foam/demo/7/cavity.yaml', warn=False)
Running blockMesh on .../of.yaml/cavity using 1 processes if in parallel
Running icoFoam on .../of.yaml/cavity using 1 processes if in parallel
100%|█████████████████████████████████████| 1.0/1.0 [00:02<00:00,  2.24s/it]

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GPL-3.0 License. See LICENSE.txt for more information.

(back to top)

Contact

Iydon Liang - @iydon - liangiydon_AT_gmail.com

(back to top)

Download files

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

Source Distribution

ifoam-0.12.0.tar.gz (52.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ifoam-0.12.0-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file ifoam-0.12.0.tar.gz.

File metadata

  • Download URL: ifoam-0.12.0.tar.gz
  • Upload date:
  • Size: 52.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.8.14 Linux/5.15.68.1-microsoft-standard-WSL2

File hashes

Hashes for ifoam-0.12.0.tar.gz
Algorithm Hash digest
SHA256 296819dffe49a74d5225e3109749aaaf0307e7e1a33b1d08b0c6ff83bf20249f
MD5 da78e6d8dadcc791facc399872832468
BLAKE2b-256 057d23cb67ad71fd113ed2d236bde16ec3c366ba09b91a548dfd4fe7ccced1c9

See more details on using hashes here.

File details

Details for the file ifoam-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: ifoam-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 58.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.8.14 Linux/5.15.68.1-microsoft-standard-WSL2

File hashes

Hashes for ifoam-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa2e8de306f2d8c12561bf94353cc6efd38cd35b01a5bc3c4c4864e8e142bfa3
MD5 add9a5cc437eb9d24643c8c6d48d7e12
BLAKE2b-256 ef2619fd7ae00d2300f47699c9d24acf658d7ca2d964f0d8a01c4544a97c3e8f

See more details on using hashes here.

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