Skip to content
A Python-based interface tool for Nastran's file formats
Branch: master
Clone or download
Latest commit b6809f5 Apr 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dev docs Sep 24, 2018
docs docs Mar 31, 2019
h5Nastran _bdf.py: updating rejects to reject_lines Jan 4, 2019
licenses
models - get_material_id_to_property_ids_map supports PSHELL with mid=0 Apr 13, 2019
pyNastran removing code Apr 18, 2019
.coveragerc trying again on coverage Aug 24, 2016
.gitattributes more git attributes Jun 20, 2018
.gitignore more nastran file removal Feb 10, 2018
.travis.yml removing python 3.5 support Mar 13, 2019
LICENSE.md docs Mar 29, 2019
README.md
appveyor.yml adding a conda list Apr 27, 2018
codecov.yml
mypy.ini - allowing for longer deqatn line (should fix this to be better) Apr 15, 2019
packages.py fixing gui bug Apr 10, 2019
releaseNotes.txt bdf: Jul 6, 2018
requirements.txt docs Mar 29, 2019
requirements_docs.txt
setup.cfg update from v0.7 Apr 17, 2015
setup.py - allowing for longer deqatn line (should fix this to be better) Apr 15, 2019
setup_no_gui.py - allowing for longer deqatn line (should fix this to be better) Apr 15, 2019
setup_no_reqs.py - allowing for longer deqatn line (should fix this to be better) Apr 15, 2019

README.md

Version Docs Status
PyPi Version docs Build Status Coverage Status
Master Documentation Status Linux Status Coverage Status

v1.1.0

Download GUI (latest is from 2018/6/26)

Also, check out the:

for more detailed information.

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 very large result files very quckly and very efficiently. Additionally, you can also extract a subset of the result data and write OP2/F06 result files.

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

pyNastran v1.1.0 has been released (2018/6/26)

It's been roughly a year and ~100 tickets closed since the last version, so it's probably time for another release! I want to thank everybody who helped with this release, especially Michael Redmond. He is working on h5Nastran, which which ties in with pyNastran. It's not quite ready yet, but it offers the possibility of major speedups for large models.

Probably the most best thing is the documentation actually builds again. It was too big and took too long, so readthedocs failed. I'm pleased to announce that the continuing problems of up-to-date documentation will hopefully be a thing of the past. M4 Engineering has offered to host the documentation on http://www.pynastran.m4-engineering.com. There's still some work to do regarding hosting documentation for older versions and the master, but that's hopefully coming soon. Outside of that, it's the same open-source project and will still be on Github.

Regarding features, the focus has again been on robustness and testing. There has been a 10% increase in the testing coverage (the same as v0.8 to v1.0). There are a few changes (mainly in the BDF) though. The GUI now also supports PyQt4, PyQt5, and Pyside with the same API, so it's a bit easier to install from source as simplifying licensing issues as PyQt is GPL.

Programmatics

  • Dropping Python 3.4 support
  • Supports Python 2.7, 3.5-3.6
  • dropping VTK 5/6 suppoprt for the GUI

BDF:

  • 343 cards supported (up from 312)
  • cross-referencing is now more straightforward to new users (much of v1.0 works using the _ref option)
    • *_ref attributes are cross-referenced
      • element.nodes is not cross-referenced
      • element.nodes_ref is cross-referenced
  • pickling to reload your deck ~5x faster
  • decreased time required for Case Control Deck with large SETs and many load cases
  • improved optimization checks

OP2:

  • HDF5 export/import support
    >>> op2_model = read_op2(op2_filename)
    >>> op2_model.export_hdf5_filename(hdf5_filename)
    >>> op2_model_new = OP2()
    >>> op2_model_new.load_hdf5_filename(hdf5_filename, combine=True)
  • pandas support for matrices
  • couple more results vectorized (e.g., complex strain energy, DMIG strain energy, some forces)
  • grid_point_stressses supported (disabled since v0.7)
  • fixed sparse matrices being stored as dense matrices

GUI:

  • preliminary support for PySide
  • can now mix and match fringe/displacement/vector results (e.g., max principal stress shown on a displaced model)
  • improved animation menu
    • in gui animation
    • more animation profiles
  • bar profile visualzation
  • nominal geometry (useful for deflection plots)
  • improved optimization support
  • improved picking display
  • better PSHELL/PCOMP distinction

Known issues:

  • Transient Pandas Dataframes will fail for newer versions of numpy/pandas. If anyone knows how to use a MultiIndex, this is probably pretty easy to fix.

pyNastran v1.0.0 has been released (2017/5/25)

This is a major release. The focus this time has been on robustness and testing. Hopefully, it shows. The software has also been relicensed to be BSD-3, which is a more permissive license and is the same one that numpy, scipy, and matplotlib use.

Unfortunately, the GUI is more complicated.

  • For open source projects : GPL 2/3
  • For companies that pay a license to Riverbank : proprietary
  • For companies that don't pay a license fee : GPL 2/3

However, you may distribute an unmodified binary.

  • Programmatics:

    • Dropping Python 3.3 support
    • Adding Python 3.6 support
    • Supports Python 2.7, 3.4-3.6
  • OP2

    • preliminary random results (ATO/CRM/PSD/RMS/NO)
    • improved geometry support
    • MONPNT1/MONPNT3 reading
    • MATPOOL matrices
  • F06 scripts

    • added a preliminary flutter (SOL 145) parser
      • supports multiple subcases
      • PK and PKNL methods supported
      • plot_Vg_Vf(...), plot_Vg(...), plot_root_locus(...)
      • input/output units
      • mode switching not fixed yet
  • GUI:

    • complex displacement support
    • animation support
    • vector results (real/complex)
      • SPC Forces, MPC Forces, Load Vector, Applied Load
        • minimal control presently
      • No Grid Point Forces (e.g., freebody loads, interface loads)
    • signficant speedups
  • BDF

    • 312 cards supported

    • faster node transforms using:

      >>> icd_transform, icp_transform, xyz_cp, nid_cp_cd = get_displacement_index_xyz_cp_cd(dtype='float64, sort_ids=True)
      >>> xyz_cid0 = transform_xyzcp_to_xyz_cid(xyz_cp, icp_transform, cid=0, in_place=False)
    • simplified card adding

      >>> model.add_grid(nid, xyz=[4.,5.,6.], comment='nid, cp, x, y, z')
  • comments can now be created without worrying about $ signs

    >>> model.add_card(['GRID', 10, None, 4.0, 5.0, 6.0], comment='GRID comment\ngrid,nid,cp,x,y,z')
    $GRID comment
    $grid,nid,cp,x,y,z
    GRID,10,,4.0,5.0,6.0
    
    • unit conversion
  • GUI

    • buttons for picking, rotation center, distance
    • PyQt5 support
    • QScintilla & pygments support for scripting code editor
  • Matlab integration

    • pyNastran works with Matlab 2014a+

See v1.0.0 for information regarding enhancements.

pyNastran v0.8.0 has been released (2016/8/21)

Version Docs
v0.8.0 Documentation Status

See v0.8.0 for information regarding enhancements.

pyNastran v0.7.2 has been Released (2015/4/25)

Version Docs
v0.7.2 Documentation Status

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. a 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.

You can’t perform that action at this time.