foamlib: A modern Python interface for interacting with OpenFOAM
Resúmenes de Mecánica Computacional · 2024
DOI: 10.70567/rmc.v1i13.194 ↗Kurz gefasst
Fachartikel in der Zeitschrift Resúmenes de Mecánica Computacional, 2024. Verfasst von Gabriel S. Gerlero und 1 weiteren Autor:innen. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).
Abstract (Originalsprache)
We introduce foamlib, an open-source Python library developed for the purpose of interacting with OpenFOAM. foamlib provides an object-oriented interface for pre-processing, executing, and post-processing OpenFOAM cases, with capabilities for accessing and editing their related files. foamlib is mainly targeted towards testing and optimization runs, which commonly require executing a large number of different cases and analyzing their results programmatically. It has the capability to autodetect the steps needed to run a case, and will automatically arrange tasks so that multiple cases can run simultaneously without oversubscribing the available CPUs. It can even orchestrate runs across computing nodes in a Slurm-based cluster environment. foamlib includes its own custom parser and serializer for OpenFOAM files, which allows reading and writing these files even on systems without an OpenFOAM installation.In comparison with other related libraries also available, foamlib supports Python versions from 3.7 up to the latest release, and allows users to take advantage of modern Python features such as type checking and asynchronous programming. It can also read and write fields stored in files using OpenFOAM's optional mixed text/binary format. foamlib is distributed under a GPLv3 license as a registered Python package, as well as in the form of Docker images. It is compatible with the two major distributions of OpenFOAM.
Zitieren
APA
Gerlero, G. S., & Kler, P. A. (2024). foamlib: A modern Python interface for interacting with OpenFOAM. Resúmenes de Mecánica Computacional. https://doi.org/10.70567/rmc.v1i13.194
Vancouver
Gerlero GS, Kler PA. foamlib: A modern Python interface for interacting with OpenFOAM. Resúmenes de Mecánica Computacional. 2024. doi:10.70567/rmc.v1i13.194
BibTeX
@article{Gerlero2024,
author = {Gerlero, Gabriel S. and Kler, Pablo A.},
title = {foamlib: A modern Python interface for interacting with OpenFOAM},
journal = {Resúmenes de Mecánica Computacional},
year = {2024},
doi = {10.70567/rmc.v1i13.194}
}
EUVIMED