visualdynamics.io.nastran¶
nastran
¶
Nastran bulk data (.bdf/.dat/.nas) — geometry, read and written.
The bulk deck is the lingua franca of the FEM world this tool's measurements get correlated against, and its card formats are public knowledge documented in every Nastran vendor's reference guide and decades of literature. This reader is written from those card layouts; no other tool's source was consulted.
What is read is the geometry: GRID points with their definition and displacement systems, CORD2R/C/S coordinate systems (chained references resolved), the connection elements the vocabulary knows, and PLOTEL — Nastran's own display-only line — as tracelines. What is deliberately not read, and why:
- Properties, materials, loads, constraints, control decks — a bulk file describes an analysis; only its mesh is geometry. These are skipped by card name, silently, the way a UNV reader skips the datasets it was not asked about.
- Rigid elements (RBE2/RBE3/RBAR/RROD) and MPCs are constraints wearing element names — they carry no mesh and are skipped.
- CORD1R/C/S (systems defined by grid points) refuse loudly: a guessed frame places every node in it wrongly, and the cards are rare enough that a refusal names the fix (redefine as CORD2).
- Any other
C-prefixed connection card refuses loudly with its name, because an element silently dropped is a mesh that lies.
A deck is unitless by construction, so imports arrive raw and
length_unit= declares — exactly the universal-file-without-164
convention.
Writing is the mirror: coordinate systems as CORD2, grids as
large-field GRID* (full precision — small-field's eight characters
are why so many decks in the wild have five-digit coordinates),
elements on their own cards with PID 1 throughout, and tracelines as
PLOTEL chains. Properties are an analyst's statement about the
structure, not the geometry's to invent, so the written deck is
interchange geometry: it meshes viewers and preprocessors, and it
would need PSHELL/PSOLID cards added before Nastran itself would run
it — the docstring of save says so rather than leaving it to be
discovered.
Functions:
| Name | Description |
|---|---|
save |
Write a geometry as a bulk deck. |
Classes¶
Functions:¶
save
¶
save(
geometry: Geometry,
path: str | PathLike,
unit_system: Any = None,
) -> None
Write a geometry as a bulk deck.
Interchange geometry, not a runnable analysis: elements carry PID 1 and no PSHELL/PSOLID/MAT cards are written, because properties are the analyst's statement about the structure and inventing them here would put made-up stiffness in a real deck. Grids go out large-field for full precision. Tracelines become PLOTEL chains — Nastran's own display-only line. Values are written in SI, the geometry's storage.