Skip to content

Releases: SteveDoyle2/pyNastran

1.4.1

26 Mar 01:41
Compare
Choose a tag to compare

v1.4.1 (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:

  • Loads popup
  • Visuals to indicate the location of the cutting planes
  • Element ids may also be explicitly limited now
  • You can pick the plot x-axis (global x/y/z vs. distance)

BDF:

  • changed (trivial):
    • moving ACMODL writing to dynamics
    • reorg on AddCard class to make it easier to find cards
  • added:
    • PLOAD2s now support 7+ values (requires MSC >= 2018; NX doesn't support this)
    • CBUSH centroid to fix grid point forces bug
    • acoustic: PMIC, ACPLNW, AMLREG, MATPOR, MICPNT
    • is_acoustic() flag
  • fixed:
    • add_tempbc was named incorrectly (was tempbc)
    • MONDSP1 comp field can be a string (e.g., PLATE)
    • CBUSH x-vector normalization bug; was a min/max equality check, so [1,1,1] failed; now a norm check)
    • RBE3s have a bug in MSC Nastran where double precision causes an issue in MSC Nastran if there is a single weight that is greater than or equal to 2.0; RBE3s now always use single precision
    • fixing TEMP writing when ntemperatures > 3
    • ACMODL for NX wrote/expected ctype in the wrong field

OP2:

  • added:
    • op2_results.stressa (for MSC)
    • support for more Simcenter and Optistruct versions
    • adding OES1A table; stores results in stressa. for MSC Nastran
  • fixed:
    • trmbd/trmbu results read in properly
    • strain.ctetra/cpenta_strain hdf5 results read in properly
    • fixing 64-bit MSC version bug by settig is_interlaced = False
    • fixing 64-bit support for stress/strain-CSHEAR

OP2Geom:

  • changed:
    • explicitly stopping on mesh adaptation cards
      (e.g., PVAL, PCURV, PINT, GMSURF, ADAPT, ...)
  • added:
    • acoustic PMIC, AMLREG, ACPLNW, CHEXA/CROD, MICPNT, MATPOR-CRAGGS
  • fixed reading:
    • CFAST-NX reading should always work now
      (ida, idb, gs, xyzs added to reader)
    • FORCE, MOMENT 64-bit support

other:

  • nastran_to_vtk:
    • now supports op2_filename='' to only convert geometry
    • fixed bug when result names are duplicated

GUI:

  • preferences menu split out into nastran and non-nastran specific parameters

  • added:

    • Shear-Moment-Torque menu:
      • remove unused time box
      • added icase flag to allow changing case
      • added line/points to indicate start/end and intermediate plane locations
      • added length scale/unit
      • added scripting message
      • added Station Label to more clearly indicate location for 2D plots
      • added analysis element_ids
      • added popup for SMT results
    • Groups / GroupsMenu
      • active element ids are now copyable
      • added node ids to groups for informational purposes
      • groups menu delete sorted bug (can't sort int/str)
  • fixed:

    • fixed Nastran results bug von mises for plate stress/strain
    • fixed corner text min/max bug (should be default, not same as legend)
    • fixed legend disappearing when previous result is GridPointForces
    • fixed issue with GUI not loading if json file doesn't exist
  • nastran reader:

    • fixed acoustic PMIC crash (property was expected and not found without PMIC)
  • known issues:

    • area_picker picks all nodes associated with picked elements (not just boxed nodes); highlight menu works though
    • Groups:
      • node id picking for active groups is buggy (area_pick, highlight menu)
      • legend doesn't limit min/max when group is active
      • extra arrows (e.g., load_vectors) are shown when group is active

1.4.0

29 Feb 22:42
c25f5c8
Compare
Choose a tag to compare

It's been a while since the 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 receieved a lot of work recently including:

  • Better results selector. Individual displacment and SPC/MPC/Load Vector components are selectable.
    For solid, plate, and composite stress/strain, nodal or centroidal stress
    may be shown and various blending methods including nodal averaging is now supported.
  • Grid Point Forces
    are supported in the GUI. They take some getting used to but you can march along a vector and output the section loads in any arbitrary coordinate system.
  • Preferences are also now exposed in a json file (vs the registry) and if you find
    a bug in the new results, you can flip a flag to use the old objects.
  • A recent files history to speed up model loading and a whole bunch of other bug fixes.

Programmatics:

  • Supports Python 3.9 - 3.12 (later versions of Python requires downloading from github)
  • GUI is compatible with VTK 9 and PyQt5/PySide2
  • improved testing of old versions of packages
  • much improve NX 64-bit and OptiStruct support

BDF:

  • fixed CAERO1 paneling bug
  • 427 cards supported (up from 405)

OP2:

  • 20 new results
  • vectorized op2 writing
  • model.cquad4_stress is now found in model.op2_results.stress.cquad4_stress. Same goes for other stress, strain, force, and strain_energy components. This will hopefully make things a bit easier find.

GUI:

  • grid point forces / section cuts / shear-moment torque plotter
  • more dynamic stress/strain results allow for simpler menus
  • transient/complex fringe only animations now supported
  • recent files support
  • greatly expanded preferences menu; many more preferences are saved
  • new icons

1.3.4

31 May 06:39
Compare
Choose a tag to compare

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

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

Programmatics:

  • supports Python 3.7-3.10
  • support for nptyping 1.1.1-2.0 (removed as a required dependency)
  • support for h5py >3.0
  • GUI is compatible with PyQt5/6 and PySide2/6 and VTK 7-10
  • support for NX 2019.0, 2019.1

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

Additional minor changes (e.g., support for CFAST/PFAST in bdf_convert) were
added when fixing bugs.

Overall:

  • typing
  • cleaner setup.py files / packages.py

BDF:

  • bug fixes:
    • renaming pyNastran/nptyping.py to pyNastran/nptyping_interface.py to avoid namespace conflicts
    • require that nastran_format is a string
    • FORCE2/MOMENT2: fixed g4 bug (can't be blank)
    • FLUTTER: method can be string_or_blank (default='L')
    • FLUTTER: fixing EAS sorting bug in make_flfacts_mach_sweep (mach should be sorted to give sorted EAS)
    • MTRANS now supported for SOL 200 (vs only MTRAN; they're the same)
    • SET1: (and more generally any card that has 1,THRU,10 or 1,THRU,10,BY,2) now supports blank values
    • MATT1: g11_tid=0 update to None if it's 0
    • MATT3: table_ids update to None if they're 0
    • PARAM, DRESP1, DVCRELx now supports numpy int/floats
    • PARAMs: better type checking
    • PLOAD2: correcting number elements allowed
    • PLOAD4: surf_or_line, line_load_dir set to blank when they're default (to fix NX issue)
    • PBARL/PBEAML: I2 for BOX section
    • PBARL: fixed I1 bug
    • PBARL: I12 now returns I12 instead of [A, I1, I2, I12]
    • AUTOSPC (from case control) now works in bdf_renumber
    • BCTSET: fixing bug where defaults were mishandled (poor documentation in QRG)
    • DEQATN: better builtin handling
    • DMIG: better size/is_double handling
    • large field solid writing (forgot the *)
    • deepcopying a card now supports comments
    • Subcase: add_op2_data supports OUG1F
    • test_bdf: fixed bug when subcase=0 was the only subcase
    • test_bdf: fixed bug that dropped the global subcase
      • it's not used unless there are no local subcases
  • added:
    • pathlib support
    • GRID: method get_position_wrt_coord_ref
    • MAT11: adding get_density
    • DVCRELx: CMASS/M and CELAS4/K options
    • DCONSTR: support for FLUTTER/PK
    • DRESP1: PBEAM/PBEAML, FATIGUE support
    • DRESP2: now references DNODE
    • DVMREL2: now supports MAT2, MAT8
    • PCOMP/G: layers must now be the same
    • PCOMP: added get_material_ids(include_symmetry=True), get_thetas(include_symmetry=True), get_souts(include_symmetry=True) methods
    • PCOMPG: added get_global_ply_ids(include_symmetry=True) in addition to PCOMP methods
    • CAERO1/2: added aefact_ids property
    • mesh_utils:
      • get_oml:
        • CTRIA6/CQUAD8/CQUAD support
        • applying np.clip to get_oml (to account for cos out of range precision issues)
      • collapse_bad_quads: now removes degenerate quads
      • bdf_mirror:
        • solid support
        • correcting case where eid_offset isn't calculated
        • fixed bug where tolerance was ignored
      • bdf_convert now supports:
        • CFAST/PFAST
        • rho, area conversion
          f06 flutter:
  • bug fixes:
    • supporting any number modes
    • correcting default for in/out_units (documentation error)
  • added:
    • subcases support
    • vd_limit and damping_limit
  • adding:
    • repr
    • mach, dynamic pressure, altitude plots

op2:

  • pathlib support

op2 geom:

  • PARAM: improved (PVT/PVT0 table) loading
  • PSOLID: FFLUID support
  • PSOLID: isop=2 support
  • PCOMP: ft (failure theory) HFAI, HTAP, HFAB support
  • QVECT: skipping
  • SPC: fixed bug (was double writing header)
  • RBE2: fixed bug (alpha vs. non alpha cases were flipped)
  • BSET1/CSET1: fixed mixup (were flipped)

gui:

  • fixed CELAS2 bug where nid2 is an SPOINT

other:

  • format_converter now has defaults if you're using the functions
  • atmosphere not supports velocity in cm/s

1.3.3

28 Jun 18:02
Compare
Choose a tag to compare

This is a bug fix only release outside of:

 .. code-block:: python

    >>> model = subcase.add_set_from_values(set_id, values)

which was overly complicated to do before.

Programmatics:

  • Supports Python 3.7 and 3.8

  • GUI is compatible with PyQt5 and PySide2 and VTK 7-9

  • improved testing of old versions of packages

  • updated nptyping requirements

  • support for NX 2019.0, 2019.1

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

1.3.2

09 Apr 05:37
Compare
Choose a tag to compare

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.

Better yet, check out this blog post covering Flutter Analysis in pyNastran

Programmatics:

  • Supports Python 3.7 and 3.8

  • Dropping Python 2.7 and 3.6 support

  • GUI is compatible with PyQt5 and PySide2

  • improved testing of old versions of packages

BDF:

  • enhancements

    • 405 cards supported (up from 373)

    • improved mesh utilities

      • bdf mirror, bdf convert, bdf export_caero_mesh

      • additional bdf scale, which takes arbitrary mass, length, time, pressure, or velocity scale factors (3 of 5) to apply a scaling law

    • added deck guessing with punch=None

OP2:

  • enhancements:

    • OP2 write support

    • fixed most pandas deprecation warnings/added support for pandas 0.25

    • much improved NX 2019.2 support

  • minor enhancements:

    • more hdf5 results

    • a few more cards supported in the OP2 geometry reader

    • preliminary NX 64-bit support

    • more MSC versions supported

    • sped up R1TABRG (optimization) reading

    • various geometry cards added

    • supports more PARAM reading

  • new results:

    • composite failure indicies (OEFIT)

    • sensitivity support (DSCMCOL)

    • Cambpell diagrams (CDDATA)

    • eigenvectors (BOPHIGF)

    • grid point forces SORT2 (OGPFB2)

    • stress/strain/force

      • random stress/strain (OESVM1/2, OESVM1C, OSTRVM1/2, OSTRVM2, OESXRM1C, OESXNO1, OESXNO1C)

      • real/complex stress/strain/force output for centroidal CQUADR/CTRIAR

      • complex CBEAR forces

      • real CFAST, CWELD forces

      • nonlinear cbush stress/strain/force

    • other

      • PSDs

      • optimization

        • convergence table

        • design variables

        • weight, displacement, stress, strain, force, composite stress, composite strain, fractional mass response

    • SOL 401/402 results:

      • eigenvalue_fluid (LAMAF, LAMAS)

      • eigenvectors (BOPHIGF, BOPHIGS)

      • temperature (OTEMP1)

      • solution set

        • results: displacement, velocity, acceleration, eigenvectors:

        • tables: OUXY1, OUXY2, OPHSA

GUI:

  • enhancements:

    • partial custom results many now be loaded

    • animation now supports complex fringe

    • result case description now shows the mode/time/frequency

    • result case description now shows the min/max value as well as the location

    • map centroidal to nodal option

    • adding node/element highlight menu

    • adding node/element mark/label menu

    • result case description now shows the min/max value as well as the location

    • result case description now shows the mode/time/frequency

  • minor enhancements:

    • added export result option to right-click menu

    • more keyboard shortcuts

  • nastran:

    • geometry:

      • added preferences for geometry/results to speed up model loading

      • element & material coordinate systems

    • results

      • added acoustic displacements (OUG1F)

      • real/complex stress/strain/force results

        • plate by upper/lower, composite plates by ply, bars, rods, springs, cbush, cdamp
      • fractional mass response

F06:

  • KE support for plot_145

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

1.2.0

22 May 02:36
Compare
Choose a tag to compare

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:

  • This is the last Python 2.7 release.
  • Dropping Python 3.5 support
  • Supports Python 2.7, 3.6-3.7
  • GUI is compatible with PyQt4/PyQt5 as well as PySide/PySide2
  • improved testing of old versions of packages

BDF:

  • 373 cards supported (up from 343)

  • added abiltity to write models to separate include files

    >>> model = BDF()
    >>> model.read_bdf(bdf_filename, save_file_structure=True)
    
    out_filenames = {
        bdf_filename : bdf_filename_new,
        include_filename : include_filename_new,
    }
    >>> model.write_bdfs(out_filenames, relative_dirname=None, is_windows=None)
    >>> ifile = model.grids[1].ifile
  • HDF5 import/export

    >>> model = read_bdf(bdf_filename)
    >>> model.export_hdf5_filename(hdf5_filename)
    >>> model_new = OP2()
    >>> model_new.load_hdf5_filename(hdf5_filename)
  • preliminary superelement support

    >>> model.read_bdf(bdf_filename)
    >>> model.superelement_models[1].nodes

OP2:

  • reorganization of random op2 results into op2.results.psd (or ato, no, crm, rms) to aide in finding data

  • reorganization of op2 class to reduce number of functions in the object. This affects any custom table reading.

  • improved optimzation response reading

  • limited SORT2 support

  • fixed CD transformation bug for BOUGV1 and BOPHIG1 tables

  • Improved HDF5 export/import support (e.g., matrices, random results)

  • Can optionally save directly to HDF5 instead of numpy (limited).

  • Loading OP2s to an HDF5 file to decrease memory usage

    >>> op2_model = OP2()
    >>> op2_model.load_as_h5 = True
    >>> op2_model.read_op2(op2_filename)

OP2Geom:

  • HDF5 support
  • reading EQEXIN/S, GPT, GPDT, CSTM/S tables (recovery of nodes & coordinate with OP2Geom)
  • fixed theta/mcid reading for CTRIA3/CQUAD4
  • fixed CQUAD8 bug

GUI:

  • sped up HTML logging
  • much improved groups menu
  • options for Nastran in preferences menu to speed up loading/limit memory usage
  • pyNastran BDF pickle reading
  • pyNastran OP2 HDF5 reading (not MSC's format)
  • visualization when pickling nodes/elements
  • min/max labels
  • highlight menu
  • Patran-style colors
  • custom force vectors
  • AVL support

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.

v1.1.0

27 Jun 06:14
c3daa8c
Compare
Choose a tag to compare

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

v1.0.0

26 May 02:19
Compare
Choose a tag to compare

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+

v0.8.0

22 Aug 00:38
Compare
Choose a tag to compare

The following are some new features from the v0.8 release.

BDF

  • unicode support
  • 278 cards supported
  • simplifed method to add cards : grid = GRID(nid, cp, xyz, cd, ps, seid, comment)
  • verify=False in read_bdf(...) will disable checks to allow reading in bad decks
  • lots of optimization work
  • bdf equivalence, renumber, deck merging
  • element quality

OP2

  • ~500x faster than v0.7.2
    • non-vectorized OP2 option has been removed
  • matrix support
  • improved SOL 200 support
  • transform displacement/eigenvectors/spc/mpc/applied loads to global coordinate system
  • transform stresses/forces to material coordinate system
  • geometry can be read directly from op2 (not perfect, but when it works, it's much faster)
  • Pandas DataFrame support for use in the Jupyter/iPython Notebook

GUI

  • additional results
    • multiple OP2s
    • deflection plots
    • area, max interior angle, skew angle, aspect ratio, taper ratio results
  • SOL 200 support
  • imporoved legend
  • custom user (nodal/centroidal) results
  • aero models now support sideslip coordinate systems

OP4

  • fixed sparse ASCII BIGMAT bug

v0.7.2

25 Apr 20:11
Compare
Choose a tag to compare

Relase notes:

  • This is a bug fix release
  • improved documentation

BDF:

  • fixed bug with write_card on GRID card
  • fixing bug with bdf.get_material_id_to_property_ids_map
  • fixing deprecation messages; missed a few stack traces

BDF API:

  • these are internal methods
    • build_thru(packs, maxDV=None) is now build_thru(packs, max_dv=None)
    • build_thru_packs(packs, maxDV=None) is now build_thru_packs(packs, max_dv=None)
    • build_thru_float(packs, maxDV=None) is now build_thru_float(packs, max_dv=None)
    • build_table_lines(fields, nStart=1, nEnd=0) is now build_table_lines(fields, nstart=1, nend=0)
  • added get_points(...) function for CAERO5
  • subcases now support:
    if 'LOAD in subcase:
    data = subcase['LOAD']

OP2:

  • fixed bug with gridPointForces not being saved
  • fixed issue with test_op2 suppressing exceptions
  • fixed bug with ComplexSolidStrainArray being a stress result

OP2 API:

  • op2._found_results and op2._saved_results have been replaced by op2._results
    to prevent invalid results from being requested

GUI:

  • fixed nastran GUI loading issue (BDFs didn't show up in popup)