FEMAP neutral file parser
Project description
FEMAP neutral Parser
FEMAP neutral file parser
Free software: MIT license
Features and limitations
Parse and render FEMAP neutral files. For now, three blocks are interpreted:
Block 100 “Neutral File Header”
Block 450 “Output Sets”
Block 451 “Output Data Vectors”
Additionally, MYSTRAN outputs (which makes use of different titles than FEMAP) are harmonized: access to total translation is done using the same title as FEMAP (“Total Translation” vs “RSS translations”).
Basic example
>>> from femap_neutral_parser import Parser >>> neutral = Parser("fea.NEU") >>> arr = neutral.output_vectors["Total Translation"][2]["record"] >>> type(arr) numpy.ndarray >>> arr array([( 1, 0. ), ( 2, 0. ), ( 3, 0.00923191), ..., (1363, 0.00986211), (1364, 0.1818963 ), (1365, 0.2173212 )], dtype=[('nodeID', '<i8'), ('disp', '<f8')]) >>> import pandas as pd >>> pd.DataFrame(arr).set_index("nodeID") disp nodeID 1 0.000000 2 0.204539 3 0.000000 4 0.014683 5 0.000092 6 0.627640 7 2.578386 8 0.102510 9 2.578363 10 1.916094 11 1.100510 12 2.389742
Requirements
Beside Python>=3.8, only numpy is required. numpy arrays are released as <https://numpy.org/doc/stable/user/basics.rec.html>`_, which makes conversions to Pandas a breeze.
Testing
For testing, making docs or coding, all the dev requirements are provided in requirements_dev.txt.
From a blank virtual environment, clone this repo:
git clone https://framagit.org/numenic/femap_neutral_parser.git
- Create a Python virtual environment:
python3 -m venv fnp
- Activate this environment:
source fnp/bin/activate
- Install requirements:
cd femap_neutral_parser pip install -r requirements.txt # install numpy pip install -r requirements_dev.txt pip install -e . # install femap-neutral-parser in new venv
- Now testing:
make test # or make coverage
- Building docs:
make docs
History
0.1.0 (2021-03-24)
First release on PyPI.
0.2.0 (2021-04-16)
Update Documentation
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
Hashes for femap_neutral_parser-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bff98b7a7bac63ae3b591fb8ac5fa85f6ee98284ddc74cf71cf608c14e6bfd9 |
|
MD5 | f4fa41e0294dcb3c52cce76f54148a9f |
|
BLAKE2b-256 | 0839562569f23e00a82279ca280e36f5dc3fbf16aafc15315307c144eee02a97 |
Hashes for femap_neutral_parser-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8fdb0afe5cf9c2e909aed849d8b4fa339ad50df579669ba9112ff58f7f577e6 |
|
MD5 | 74c077856e2da955f4d9617e1514ce0f |
|
BLAKE2b-256 | 026c122fcd0e6596a69204f733b7ae462a9e102f89274a2282874b978dad6f92 |