FEMM file reader for Python
Project description
femmreader
Femmreader is a parser to read files from the Finite Element Software femm.
Following files are supported. Model files:
- *.fem (Magnetics problem)
- *.fee (Electrostatics problem)
- *.fec (Current flow problem)
- *.feh (Heat flow problem)
Result files:
- *.ans (Result file of magnetics problem)
- *.anc (Result file of current flow problem)
- *.res (Result file of electrostatics problem)
- *.anh (Result file of heat flow problem)
Installation
femmreader is a pure python package with no dependencies. Install via
pip install femmreader
Usage
Let's have a look on a very basic example.
Read the file with
imoprt femmreader
data = femmreader.read("EI-core.FEM")
print(data.keys())
>>> dict_keys(['Format', 'Frequency', 'Precision', 'MinAngle', 'DoSmartMesh', 'Depth', 'LengthUnits', 'ProblemType', 'Coordinates', 'ACSolver', 'PrevType', 'PrevSoln', 'Comment', 'BdryProps', 'BlockProps', 'CircuitProps', 'NumPoints', 'NumSegments', 'NumArcSegments', 'NumHoles', 'NumBlockLabels'])
print(data['Depth'])
>>> 20
The same for result files:
data = femmreader.read("EI-core.ans")
print(data.keys())
>>> dict_keys(['Format', 'Frequency', 'Precision', 'MinAngle', 'DoSmartMesh', 'Depth', 'LengthUnits', 'ProblemType', 'Coordinates', 'ACSolver', 'PrevType', 'PrevSoln', 'Comment', 'BdryProps', 'BlockProps', 'CircuitProps', 'NumPoints', 'NumSegments', 'NumArcSegments', 'NumHoles', 'NumBlockLabels', 'Solution'])
print(data['Solution'].keys())
>>> dict_keys(['xpos', 'ypos', 'sol_real', 'sol_imag', 'solution', 'elements', 'block_labels'])
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
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 femmreader-1.0.0.tar.gz.
File metadata
- Download URL: femmreader-1.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f45cecc75096301b7afe66d79a5775201f48c1dcd464b83ba43305a116972a2
|
|
| MD5 |
9c690848c76b70f01c83d7eb15c962c3
|
|
| BLAKE2b-256 |
f2ded194eee2c45a49c3b73b07c3fc3ec1ae8a2c021727b4a96fbe6471497420
|
File details
Details for the file femmreader-1.0.0-py3-none-any.whl.
File metadata
- Download URL: femmreader-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efababd4e733195ec11fba4b25ab88ad66b5550f1cea63990366ec6acd35cba3
|
|
| MD5 |
ff5b002d9b9394d054485f5ee4967001
|
|
| BLAKE2b-256 |
b71ea02298ff5c1c81ed9a14151d7ae269c95eb0215bd4b360b069f2146618bc
|