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.fromDemo('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.fromPath('.../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)

Release files for ifoam 0.13.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ifoam 0.13.5
File Size Uploaded
ifoam-0.13.5.tar.gz 73.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ifoam 0.13.5
File Interpreter ABI Platform
ifoam-0.13.5-py3-none-any.whl Python 3 none any Details

Total release size: 162.5 kB

Release files / ifoam-0.13.5.tar.gz

Download URL ifoam-0.13.5.tar.gz
Size 73.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d7259bcc5add23977cd6f7a0a2eeb4c412791bd32cb8096ca91683526ce5256c
BLAKE2b-256 checksum
How to use checksums
dec3f1734a6a1b507e583fcda4725d33d9ecc323df7538a5cfb4bdac38b2ac3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.8.16 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / ifoam-0.13.5-py3-none-any.whl

Download URL ifoam-0.13.5-py3-none-any.whl
Size 88.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
973df88a1a61b82f158edd063105e4ce90b61deee2bec7a3fb00f2c16153eb78
BLAKE2b-256 checksum
How to use checksums
10d9ae10eb3e0859ddd803d4e0d5815df8125ca8cba6a6927ba7c9ad73868e33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.8.16 Linux/5.15.90.1-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.13.5 This release

2 release files

0.13.4

2 release files

0.13.3

2 release files

0.13.0

2 release files

0.12.6

2 release files

0.12.5

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.9

2 release files

0.11.8

2 release files

0.11.7

2 release files

0.11.6

2 release files

0.11.4

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.10.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page