ifoam

Python Interface to OpenFOAM Case (Configured Using YAML)

https://github.com/iydon/of.yaml

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 4 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

openfoam python yaml
Last synced: 6 months ago · JSON representation ·

Repository

Python Interface to OpenFOAM Case (Configured Using YAML)

Basic Info
Statistics
  • Stars: 16
  • Watchers: 5
  • Forks: 1
  • Open Issues: 6
  • Releases: 0
Topics
openfoam python yaml
Created about 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog License Citation

README.md

Contributors Forks Stargazers Issues GPL-3.0 License


🟢⬜🟩⬜🟩
⬜⬜⬜⬜⬜
🟩⬜🟩⬜🟩
⬜⬜⬜⬜⬜
🟩⬜🟩⬜🟩

OpenFOAM.YAML

Python Interface to OpenFOAM Case (Configured Using YAML)
Explore the docs »

View Demo/Tutorial · Report Bug · Request Feature

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

sh pip3 install ifoam[full]

Demo

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

```python 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.

```sh $ 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 - liangiydonATgmail.com

(back to top)

Owner

  • Name: Iydon Liang
  • Login: iydon
  • Kind: user
  • Location: SUSTech, Shenzhen, China
  • Company: @SUSTC

Major in Computational Mathematics @ SUSTech.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Liang"
  given-names: "Iydon"
  orcid: "https://orcid.org/0000-0003-1923-4002"
title: "Python Interface to OpenFOAM Case (Configured Using YAML)"
version: 0.13.5
date-released: 2023-3-15
url: "https://github.com/iydon/of.yaml"

GitHub Events

Total
Last Year

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 431
  • Total Committers: 4
  • Avg Commits per committer: 107.75
  • Development Distribution Score (DDS): 0.023
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Iydon Liang l****n@g****m 421
Iydon Liang 1****3@m****n 8
yue-qiang 9****g 1
YUEQiangg 9****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 49
  • Total pull requests: 3
  • Average time to close issues: 19 days
  • Average time to close pull requests: 9 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.65
  • Average comments per pull request: 0.67
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • iydon (49)
Pull Request Authors
  • dependabot[bot] (2)
  • iydon (1)
Top Labels
Issue Labels
enhancement (32) bug (11) documentation (4) wontfix (1) question (1) good first issue (1)
Pull Request Labels
dependencies (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 36 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 24
  • Total maintainers: 1
pypi.org: ifoam

Python Interface to OpenFOAM Case (Configured Using YAML)

  • Versions: 24
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 36 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 14.3%
Dependent repos count: 21.6%
Average: 21.9%
Forks count: 22.7%
Downloads: 40.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • mkdocs-material ==8.2.9
  • mkdocs-static-i18n ==0.45
poetry.lock pypi
  • ghp-import 2.1.0 develop
  • jinja2 3.1.2 develop
  • lxml 4.8.0 develop
  • markdown 3.3.7 develop
  • markupsafe 2.1.1 develop
  • mergedeep 1.3.4 develop
  • mkdocs 1.3.0 develop
  • mkdocs-material 8.2.14 develop
  • mkdocs-material-extensions 1.0.3 develop
  • mkdocs-static-i18n 0.45 develop
  • mypy 0.971 develop
  • mypy-extensions 0.4.3 develop
  • pygments 2.12.0 develop
  • pymdown-extensions 9.4 develop
  • python-docx 0.8.11 develop
  • pyyaml-env-tag 0.1 develop
  • typed-ast 1.5.4 develop
  • watchdog 2.1.7 develop
  • aiohttp 3.8.1
  • aiosignal 1.2.0
  • async-timeout 4.0.2
  • asynctest 0.13.0
  • attrs 21.4.0
  • brotli 1.0.9
  • brotlicffi 1.0.9.2
  • cffi 1.15.0
  • charset-normalizer 2.0.12
  • click 8.1.3
  • colorama 0.4.4
  • cycler 0.11.0
  • fonttools 4.33.3
  • frozenlist 1.3.0
  • idna 3.3
  • importlib-metadata 4.11.3
  • kiwisolver 1.4.2
  • matplotlib 3.5.2
  • multidict 6.0.2
  • multivolumefile 0.2.3
  • numpy 1.22.3
  • packaging 21.3
  • pillow 9.1.1
  • py7zr 0.17.4
  • pybcj 0.5.2
  • pycparser 2.21
  • pycryptodomex 3.14.1
  • pyparsing 3.0.9
  • pyppmd 0.18.2
  • python-dateutil 2.8.2
  • pyyaml 6.0
  • pyzstd 0.15.2
  • setuptools-scm 6.4.2
  • six 1.16.0
  • texttable 1.6.4
  • tomli 2.0.1
  • tqdm 4.64.0
  • typing-extensions 4.3.0
  • vtk 9.1.0
  • wslink 1.6.4
  • yarl 1.7.2
  • zipp 3.8.0
pyproject.toml pypi
  • mkdocs-material ^8.2.9 develop
  • mkdocs-static-i18n ^0.45 develop
  • mypy ^0.971 develop
  • pygments ^2.12.0 develop
  • python-docx ^0.8.11 develop
  • PyYAML ^6.0
  • click ^8.0.3
  • py7zr ^0.17.2
  • python >=3.7
  • tqdm ^4.63.1
  • vtk ^9.1.0