NASTRAN migration#
If your starting point is a NASTRAN deck (MSC, NX, Simcenter, or one of the open-source dialects), this page is the bridge into femorph-solver. The mapping is mostly mechanical — the language is different but every concept has a direct counterpart.
For the one-table cheat-sheet, see Cross-vendor terminology Rosetta. For the deep-dive on which BDF cards we read today, keep going.
Loading a BDF deck#
Single call (from_bdf) reads the ASCII bulk-data deck and
returns a Model ready to assemble:
from femorph_solver.interop.nastran import from_bdf
model = from_bdf("rotor.bdf")
model.fix(nodes=clamped_nodes, dof="ALL")
result = model.solve_static()
The reader handles MSC Nastran 2014+ free-format and
fixed-format decks, NX Nastran (Simcenter Nastran) decks back
to v8, and the open-source pyNastran BDF format. Decks
written from older Nastran versions (pre-v68) sometimes use
fixed-format only — pass them through pyNastran’s
write_bdf first to normalise.
What’s read#
The reader covers the linear-elastic structural-mechanics slice femorph-solver supports today:
NASTRAN card |
Maps to |
|---|---|
|
|
|
Coordinate-system reference (only |
|
|
|
|
|
|
|
|
|
|
|
|
|
(planned — currently warns) |
|
|
|
|
|
|
|
|
|
Isotropic material (E, nu, rho fields) |
|
Orthotropic material (full anisotropic-elasticity matrix) |
|
Property → element binding |
|
Property → element binding |
|
|
|
|
|
Gravity body force |
|
Distributed surface pressure |
|
Multi-point constraint (cyclic-symmetry only at present) |
What’s flagged but not read#
The reader emits a warning and skips:
MAT2/MAT3/MAT8/MAT11— composite laminate cards. Composite layups need the plannedQUAD4_SHELLcomposite extension; not yet shipped.CHEXAwith 27 / 64 nodes — non-standard high-order forms; HEX20 covers the common quadratic case.RBE2/RBE3— rigid-body / interpolation elements. Add as MPC constraints when supported.MAT9ORTorthotropic-with-thermal — thermal coupling not yet shipped.CDAMPdamping elements — Rayleigh damping at the model level is the current path.
Solution sequences#
NASTRAN decks declare the analysis type via the Executive
Control SOL N line. The reader is BDF-only and ignores
SOL — you choose the analysis type via the Model API
after the deck is loaded:
NASTRAN SOL |
femorph-solver call |
|---|---|
|
|
|
|
|
not yet shipped (planned) |
|
|
|
|
|
|
|
|
This separation is intentional — it lets you re-use the same geometry for multiple analysis types without re-parsing the deck.
Result-format readback#
The reader is BDF-only. Reading NASTRAN .op2 /
.f06 / .h5 result files isn’t currently supported —
you’d run the solve through femorph-solver, export the result
to the canonical .pv format, and visualise from there:
from femorph_solver.interop.nastran import from_bdf
model = from_bdf("model.bdf")
result = model.solve_static()
result.save("model.pv", model)
If you specifically need NASTRAN-format output for downstream
post-processing, file an issue with the use case — the
op2 writer is on the planned roadmap.
Edge cases worth flagging#
DOF ordering. NASTRAN orders DOFs as (UX, UY, UZ, RX,
RY, RZ). femorph-solver matches: see
Model.dof_map() documentation. If you read a BDF deck
that was originally written by Abaqus’ BDF-export and
re-imported, the DOF ordering may have been mangled — always
sanity-check on a known-good static solve before trusting
the readback.
Free-format vs fixed-format. Modern NASTRAN decks mix
both (e.g. GRID* long-form for high-precision
coordinates). The reader handles both transparently.
Comment cards ($, $#). Stripped silently.
Bulk-data Continuation (+-cards). Joined transparently.
Free-field separators (,). Handled.
Case-control input — not parsed. The reader is
bulk-data only; if your deck contains essential SUBCASE
information for load-step assignment, you’ll need to encode
that in the femorph-solver Model directly (one Model
per load case).
Concrete migration recipe#
For a typical static-analysis deck:
from femorph_solver.interop.nastran import from_bdf
# 1. Load the deck. All BDF cards above become
# Model state — geometry, materials, BCs, loads.
model = from_bdf("vehicle_frame.bdf")
# 2. Optionally inspect or modify the model:
print(f"{model.grid.n_points} nodes, {model.grid.n_cells} cells")
# 3. Solve and recover result quantities.
result = model.solve_static()
# 4. Write to canonical ``.pv`` for downstream
# post-processing in the femorph-solver gallery
# recipes (:doc:`/gallery/post-processing/index`).
result.save("vehicle_frame.pv", model)
# 5. Stress recovery + design check follow the
# standard recipes — same code regardless of which
# deck you started from:
from femorph_solver.recover import compute_nodal_stress, stress_invariants
sigma = compute_nodal_stress(model, result.displacement.ravel())
inv = stress_invariants(sigma)
print(f"Peak σ_VM = {inv['von_mises'].max() / 1e6:.2f} MPa")
Cross-references#
Cross-vendor terminology Rosetta — the one-table Rosetta covering every concept across femorph-solver / MAPDL / NASTRAN / Abaqus / LS-DYNA.
MAPDL interop — the MAPDL equivalent of this page.
Element kernels — per-element technical sheets, each carrying a cross-vendor mapping table that starts from the femorph-solver name and lists the NASTRAN card.