Closed vtpasquale closed 3 years ago
There's a MSC Nastran HDF5 reader technically separate (at least at the moment) from pyNastran called h5Nastran.
HDF5 is shockingly simple as a file format. I managed to implement an h5 reader/writer in a couple hours across the entire OP2 with about 100 lines of code. If you're familiar with the Nastran OP2, the h5 format is basically the same thing (so a bit of a mess, but not THAT hard). If you compare the MSC vs. NX OP2s, they are nearly identical. There are a few cards that are different, but that's it. PyNastran uses an is_msc/is_nx flag to deal with this as well as just looking at the data and seeing if it makes sense in MSC/NX format.
https://github.com/SteveDoyle2/pyNastran/tree/master/h5Nastran
Thanks for the input. I'll take a look at that h5 reader/writer. I haven't yet explored the inner workings of Nastran OP2, but I have resources on that.
Mark Sherman publicly confirmed that Femap will support HDF5: https://community.plm.automation.siemens.com/t5/CAE-Simulation-Femap-Forum/Femap-needs-to-better-support-MSC-Nastrans-newer-features/m-p/575852/highlight/true#M9296
HDF5 should still be a long term solution for CoFE. However, I'm continuing with Femap Neutral format for now since it's working for me.
Unfortunantly, Simcenter Nastran 2019.2 VERSION - 1872.0150 does not support HDF5 for superelment runs. The following is output to the .f06:
^^^ USER WARNING MESSAGE 9447 (PHASE0)
^^^ HDF5 OUTPUT IS NOT SUPPORTED FOR SUPERELEMENTS. THE HDF5 FILE GENERATED WILL BE DELETED.
Hopefully this will be remedied in the coming years. I'll take a look at MSC Nastran to see if hdf5 is supported for superelements there.
The MSC documentation implies that superelements are supported for MSC Nastran hdf5 ouput. Unfortunantly, the MSC license pool I have access to doesn't have sufficient tokens for me to run superlement solutions, so I'm done pursuing that avenue for now.
Implementation started. I'm using MSC's HDF5 format because it has better documentation and supports superelements. Patran can postprocess this format. Femap postprocessing support is imminent.
The CoFE v5 classes will be able to read and write HDF5 data for the supported element types. MSC Nastran HDF5 output data will be used directly for system verification testing. CoFE v5 support for Femap neutral files will be discontinued (implementation was still in progress).
HDF5 functionally is progressing nicely, but slowly, primarily due to lack of attention. The class composition is in great shape. I need to add a few more classes (element stress, strain), which will follow the existing composition. Element force and strain/kinetic energy are implemented. Node displacement, eigenvectors, and forces are implemented. Element force, stress, and strain data require subclasses for each element type, but programming for additional elements is not particularly hard because the class composition is clear.
The top-level HDF5 class has a compare method that is intended to compare CoFE HDF5 files to MSC Nastran HDF5 files for system verification. The compare method is in work. The HDF5 data may not end up in the same tabular order, so data sorting is required for the comparison. Data sorting has been implemented. There are some details, such as comparison for numerical-zero results and eigenvector scaling, which are a bit tricky and still being worked out.
It's done! Stress/strain classes have been implemented. Compare functionality can be used to compare HDF5 results to MSC Nastran. Results can be viewed using Patran. We're still waiting on Femap to release HDF5 support.
This will be a longer-term enhancement. I don't have immediate plans to implement this. HDF5 is a binary format that is easily writable, readable, and digestible using Matlab built-in tools.
Recent versions of both MSC and NX Nastran support HDF5 formatted output (I expect they use different formatting rules). Patran 2017+ can read HDF5 formatted MSC Nastran output. Femap does not yet read HDF5 formatted output, but it's seems like it may a likely possibility for the future.
Open questions: