OpenFOAM config file parser
Project description
File parser for OpenFOAM configuration files based on https://cfd.direct/openfoam/user-guide/v6-basic-file-format/
foamfile uses pyparsing to extract the data from the files.
example usage
from foamfile import FoamFile
with FoamFile("path/to/file") as f:
foam_content = f.read()
print(f.header)
print(foam_content)
with FoamFile("path/to/file", "w", foam_class="dictionary") as f:
f.write(foam_content)
TODO
- Macro expansion does not work at the moment
- Optimize parsing of directives
- Add codeStreams
- Add calculations
- Add support for comments
Tested with OpenFOAM v6.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
foamfile-0.11.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file foamfile-0.11.tar.gz.
File metadata
- Download URL: foamfile-0.11.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abce7f13887e5ad7c59be2a0a22c11b52f3f0724217317ed73672304e6199e4b
|
|
| MD5 |
0c46484fb1210acac634bafc9173108d
|
|
| BLAKE2b-256 |
7872ec526361f2d162a55fb9f67ee1b3d7df322495762593390e794209b806a8
|
File details
Details for the file foamfile-0.11-py3-none-any.whl.
File metadata
- Download URL: foamfile-0.11-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1384a6c225512efb35f21322ba571f5118845ddf3150473109124c10cabf4781
|
|
| MD5 |
29d034f54191785d956bc122a620a4f3
|
|
| BLAKE2b-256 |
a1c5a4559af6081a6dfc84664f860fd4c2e7d498ce06e8eefbdccd405ec08cc8
|