SteveDoyle2 / pyNastran

A Python-based interface tool for Nastran's file formats
Other
384 stars 147 forks source link
fea nastran python

Main/dev: Documentation Status Linux Status Coverage Status

See the Installation Instructions for instructions on installing pyNastran.

v1.4.1

Download GUI (latest is from 2024/3/25)

Also, check out the:

for more detailed information.

Blogs

Code of Conduct

Everyone interacting in the setuptools project’s codebase, issue trackers, chat room/Discord, and mailing lists is expected to follow the Code of Conduct.

Overview

pyNastran is an interface library to the various Nastran file formats (BDF, OP2, OP4). Using the BDF interface, you can read/edit/write Nastran geometry without worrying about field formatting. Many checks are also performed to verify that your model is correct. Using the OP2 interface, you can read large result files quickly and efficiently. Additionally, you can also extract a subset of the result data and write OP2/F06 result files. For a more detailed list of features, see:

Using the pyNastran GUI, you can read in Nastran models and quickly view results for a model. While it's no FEMAP/Patran, it can replace many tasks that would otherwise require a commercial program.

GUI

News

v1.4.1 has been released (2024/3/25)

This is a mainly a bug fix release. There's also a couple of new acoustic cards and MSC's STRESSA table that were added to fix some errors.

The force/bending moment diagrams have also been improved:

See pyNastran release notes for details on the other changes.

v1.4.0 has been released (2024/2/29)

It's been a while since the update, but I've had a more time lately. MSC also provided a copy of MSC Nastran free of charge to help support the project, so modern MSC Nastran support is much better.

Finally, the GUI has received a lot of work recently including:

Programmatics:

BDF:

OP2:

GUI:

See pyNastran release notes for details on the other changes.

v1.3.4 has been released (2022/5/30)

This is a bug fix release mainly to address dependency changes:

Programmatics:

There are also at least 33 bugs fixed and a few features added from the 1.4 release (e.g., pathlib support, subcase limiting in the flutter F06 parser).

See pyNastran release notes for details on the other changes.

v1.3.3 (2020/6/28)

This is a bug fix only release outside of:

     >>> subcase.add_set_from_values(set_id, values)

which was overly complicated to do before.

Programmatics:

See pyNastran release notes for details on the 54 bug fixes. Not too bad for 2.5 months!

pyNastran v1.3.2 has been released (2020/4/8)

With Python 2 now officially dead, it's time for a new killer feature to get the last few people to switch.

There is now support for writing OP2 files! They're difficult to create from scratch, but modifying an existing one isn't difficult. This includes geometry support.

In addition, many new OP2 results have been added. Modern NX Nastran should work much better.

Programmatics:

BDF:

OP2:

GUI:

F06:

Many bug fixes, and a few more details on features, can be found in the Release Notes

v1.3.1/v1.3.0 (2020/4/8)

This result has been superseded by 1.3.2. The PyPi page was fixed.

v1.2.1 (2019/5/24)

I keep saying to myself there's not much to add, but Nastran is huge. Beyond HDF5 support in the BDF, I'm a huge fan of the new ability to keep track of which include file a card came from and write it as a separate file. It's limited in usefulness, but very handy in certain cases. There's a new (still preliminary) superelement capability. I'm far from a superelement expert, but it's probably useful.

The OP2 reader now supports SORT2 along with much improved random results reading. If you're using 60+ GB OP2s, you probably have had issues with RAM usage in the past. With the new ability to dump the OP2 directly to HDF5, this should not be an as much of an issue. It's not 100% implemented, so let me know if you need it for another result.

Regarding the GUI, there are also some new features. Groups work a bit better, but aren't quite perfect. Logging has been dramatically sped up, so the GUI loads faster, and you can load Nastran models even faster if you disable additional results (e.g., element quality).

Finally, Python 2.7 is end of life. Numpy, scipy, and matplotlib have all dropped Python 2.7 support. It's time for pyNastran to as well. The OP2 reader is 30% faster in Python 3.6+ than Python 2.7, so it's not all bad!

Programmatics:

BDF:

OP2:

OP2Geom:

GUI:

Known issues:

v1.2.0 (2019/5/21)

This result has been superseded by 1.2.1. See release notes for details.

v1.1.0 (2018/6/26)

See v1.1.0 for information regarding enhancements.

v1.0.0 (2017/5/25)

See v1.0.0 for information regarding enhancements.

v0.8.0 (2016/8/21)

See v0.8.0 for information regarding enhancements.

v0.7.2 (2015/4/25)

See v0.7.2 for information regarding enhancements.

Version 0.6.1 has been released (2013/6)

Version 0.6 improves BDF reading. The reader is more robust and also requires proper BDF field formatting (e.g. an integer field can't be a float). Additionally, cards also have a comment() method.

Marcin Gąsiorek participated in the latest pyNastran under the European Space Agency's (ESA) "Summer of Code In Space" SOCIS program. The program provides a stipend to students to work on open-source projects. He did a great job of simplifying code and creating nicer documentation.