ifoam


Nameifoam JSON
Version 0.13.5 PyPI version JSON
download
home_pagehttps://github.com/iydon/of.yaml
SummaryPython Interface to OpenFOAM Case (Configured Using YAML)
upload_time2023-03-14 19:11:32
maintainer
docs_urlNone
authorIydon Liang
requires_python>=3.7,<4.0
licenseGPL-3.0-only
keywords openfoam yaml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- Template from https://github.com/othneildrew/Best-README-Template -->
<div id="top"></div>



<!-- PROJECT SHIELDS -->
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![GPL-3.0 License][license-shield]][license-url]



<!-- PROJECT LOGO -->
<br />
<div align="center">
  <a href="https://github.com/iydon/of.yaml">
    ๐ŸŸขโฌœ๐ŸŸฉโฌœ๐ŸŸฉ<br />
    โฌœโฌœโฌœโฌœโฌœ<br />
    ๐ŸŸฉโฌœ๐ŸŸฉโฌœ๐ŸŸฉ<br />
    โฌœโฌœโฌœโฌœโฌœ<br />
    ๐ŸŸฉโฌœ๐ŸŸฉโฌœ๐ŸŸฉ<br />
  </a>

  <h3 align="center">OpenFOAM.YAML</h3>

  <p align="center">
    Python Interface to OpenFOAM Case (Configured Using YAML)
    <br />
    <a href="https://ifoam.readthedocs.io"><strong>Explore the docs ยป</strong></a>
    <br />
    <br />
    View <a href="https://github.com/iydon/of.yaml-template">Demo</a>/<a href="https://github.com/iydon/of.yaml-tutorial">Tutorial</a>
    ยท
    <a href="https://github.com/iydon/of.yaml/issues">Report Bug</a>
    ยท
    <a href="https://github.com/iydon/of.yaml/issues">Request Feature</a>
  </p>
</div>



<!-- TABLE OF CONTENTS -->
<details>
  <summary>Table of Contents</summary>
  <ol>
    <li>
      <a href="#about-the-project">About The Project</a>
    </li>
    <li>
      <a href="#getting-started">Getting Started</a>
      <ul>
        <li><a href="#installation">Installation</a></li>
        <li><a href="#demo">Demo</a></li>
      </ul>
    </li>
    <li><a href="#contributing">Contributing</a></li>
    <li><a href="#license">License</a></li>
    <li><a href="#contact">Contact</a></li>
  </ol>
</details>



<!-- ABOUT THE PROJECT -->
## 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.

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- GETTING STARTED -->
## Getting Started

This project currently uses Poetry to manage Python dependencies. I've heard good things about [PDM](https://github.com/pdm-project/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 -->
## 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

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- LICENSE -->
## License

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

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- CONTACT -->
## Contact

Iydon Liang - [@iydon](https://github.com/iydon) - liangiydon_AT_gmail.com

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- MARKDOWN LINKS & IMAGES -->
[contributors-shield]: https://img.shields.io/github/contributors/iydon/of.yaml.svg?style=for-the-badge
[contributors-url]: https://github.com/iydon/of.yaml/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/iydon/of.yaml.svg?style=for-the-badge
[forks-url]: https://github.com/iydon/of.yaml/network/members
[stars-shield]: https://img.shields.io/github/stars/iydon/of.yaml.svg?style=for-the-badge
[stars-url]: https://github.com/iydon/of.yaml/stargazers
[issues-shield]: https://img.shields.io/github/issues-closed/iydon/of.yaml.svg?style=for-the-badge
[issues-url]: https://github.com/iydon/of.yaml/issues
[license-shield]: https://img.shields.io/github/license/iydon/of.yaml.svg?style=for-the-badge
[license-url]: https://github.com/iydon/of.yaml/blob/master/LICENSE.txt

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/iydon/of.yaml",
    "name": "ifoam",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "OpenFOAM,YAML",
    "author": "Iydon Liang",
    "author_email": "liangiydon@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/de/c3/f1734a6a1b507e583fcda4725d33d9ecc323df7538a5cfb4bdac38b2ac3c/ifoam-0.13.5.tar.gz",
    "platform": null,
    "description": "<!-- Template from https://github.com/othneildrew/Best-README-Template -->\n<div id=\"top\"></div>\n\n\n\n<!-- PROJECT SHIELDS -->\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![GPL-3.0 License][license-shield]][license-url]\n\n\n\n<!-- PROJECT LOGO -->\n<br />\n<div align=\"center\">\n  <a href=\"https://github.com/iydon/of.yaml\">\n    \ud83d\udfe2\u2b1c\ud83d\udfe9\u2b1c\ud83d\udfe9<br />\n    \u2b1c\u2b1c\u2b1c\u2b1c\u2b1c<br />\n    \ud83d\udfe9\u2b1c\ud83d\udfe9\u2b1c\ud83d\udfe9<br />\n    \u2b1c\u2b1c\u2b1c\u2b1c\u2b1c<br />\n    \ud83d\udfe9\u2b1c\ud83d\udfe9\u2b1c\ud83d\udfe9<br />\n  </a>\n\n  <h3 align=\"center\">OpenFOAM.YAML</h3>\n\n  <p align=\"center\">\n    Python Interface to OpenFOAM Case (Configured Using YAML)\n    <br />\n    <a href=\"https://ifoam.readthedocs.io\"><strong>Explore the docs \u00bb</strong></a>\n    <br />\n    <br />\n    View <a href=\"https://github.com/iydon/of.yaml-template\">Demo</a>/<a href=\"https://github.com/iydon/of.yaml-tutorial\">Tutorial</a>\n    \u00b7\n    <a href=\"https://github.com/iydon/of.yaml/issues\">Report Bug</a>\n    \u00b7\n    <a href=\"https://github.com/iydon/of.yaml/issues\">Request Feature</a>\n  </p>\n</div>\n\n\n\n<!-- TABLE OF CONTENTS -->\n<details>\n  <summary>Table of Contents</summary>\n  <ol>\n    <li>\n      <a href=\"#about-the-project\">About The Project</a>\n    </li>\n    <li>\n      <a href=\"#getting-started\">Getting Started</a>\n      <ul>\n        <li><a href=\"#installation\">Installation</a></li>\n        <li><a href=\"#demo\">Demo</a></li>\n      </ul>\n    </li>\n    <li><a href=\"#contributing\">Contributing</a></li>\n    <li><a href=\"#license\">License</a></li>\n    <li><a href=\"#contact\">Contact</a></li>\n  </ol>\n</details>\n\n\n\n<!-- ABOUT THE PROJECT -->\n## About The Project\n\nThis 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.\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n\n\n<!-- GETTING STARTED -->\n## Getting Started\n\nThis project currently uses Poetry to manage Python dependencies. I've heard good things about [PDM](https://github.com/pdm-project/pdm) so far, and may provide PDM support subsequently.\n\n### Installation\n\n```sh\npip3 install ifoam[full]\n```\n\n### Demo\n\nSave the following demo code as a separate file (e.g. `demo.py`).\n\n```python\nfrom foam import Foam\n\nfoam = Foam.fromDemo('cavity')\nfoam['foam']['system', 'controlDict', 'endTime'] = 1.0\nfoam.save('cavity')\nfoam.cmd.all_run()\n```\n\nRunning the demo code in the virtual environment results in the following output.\n\n```sh\n$ python demo.py\n\nFoam.fromPath('.../of.yaml/foam/demo/7/cavity.yaml', warn=False)\nRunning blockMesh on .../of.yaml/cavity using 1 processes if in parallel\nRunning icoFoam on .../of.yaml/cavity using 1 processes if in parallel\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.0/1.0 [00:02<00:00,  2.24s/it]\n```\n\n\n\n<!-- CONTRIBUTING -->\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf 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\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n\n\n<!-- LICENSE -->\n## License\n\nDistributed under the GPL-3.0 License. See `LICENSE.txt` for more information.\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n\n\n<!-- CONTACT -->\n## Contact\n\nIydon Liang - [@iydon](https://github.com/iydon) - liangiydon_AT_gmail.com\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n\n\n<!-- MARKDOWN LINKS & IMAGES -->\n[contributors-shield]: https://img.shields.io/github/contributors/iydon/of.yaml.svg?style=for-the-badge\n[contributors-url]: https://github.com/iydon/of.yaml/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/iydon/of.yaml.svg?style=for-the-badge\n[forks-url]: https://github.com/iydon/of.yaml/network/members\n[stars-shield]: https://img.shields.io/github/stars/iydon/of.yaml.svg?style=for-the-badge\n[stars-url]: https://github.com/iydon/of.yaml/stargazers\n[issues-shield]: https://img.shields.io/github/issues-closed/iydon/of.yaml.svg?style=for-the-badge\n[issues-url]: https://github.com/iydon/of.yaml/issues\n[license-shield]: https://img.shields.io/github/license/iydon/of.yaml.svg?style=for-the-badge\n[license-url]: https://github.com/iydon/of.yaml/blob/master/LICENSE.txt\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Python Interface to OpenFOAM Case (Configured Using YAML)",
    "version": "0.13.5",
    "split_keywords": [
        "openfoam",
        "yaml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "10d9ae10eb3e0859ddd803d4e0d5815df8125ca8cba6a6927ba7c9ad73868e33",
                "md5": "f5282a7b8acc8143633c595e27947677",
                "sha256": "973df88a1a61b82f158edd063105e4ce90b61deee2bec7a3fb00f2c16153eb78"
            },
            "downloads": -1,
            "filename": "ifoam-0.13.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5282a7b8acc8143633c595e27947677",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 88658,
            "upload_time": "2023-03-14T19:11:29",
            "upload_time_iso_8601": "2023-03-14T19:11:29.443490Z",
            "url": "https://files.pythonhosted.org/packages/10/d9/ae10eb3e0859ddd803d4e0d5815df8125ca8cba6a6927ba7c9ad73868e33/ifoam-0.13.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dec3f1734a6a1b507e583fcda4725d33d9ecc323df7538a5cfb4bdac38b2ac3c",
                "md5": "5dc9ec83f5f2422654e2162e6ccf08fc",
                "sha256": "d7259bcc5add23977cd6f7a0a2eeb4c412791bd32cb8096ca91683526ce5256c"
            },
            "downloads": -1,
            "filename": "ifoam-0.13.5.tar.gz",
            "has_sig": false,
            "md5_digest": "5dc9ec83f5f2422654e2162e6ccf08fc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 73850,
            "upload_time": "2023-03-14T19:11:32",
            "upload_time_iso_8601": "2023-03-14T19:11:32.230860Z",
            "url": "https://files.pythonhosted.org/packages/de/c3/f1734a6a1b507e583fcda4725d33d9ecc323df7538a5cfb4bdac38b2ac3c/ifoam-0.13.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-14 19:11:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "iydon",
    "github_project": "of.yaml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ifoam"
}
        
Elapsed time: 0.40107s