Real constants and sections#
Some elements need geometric data the mesh doesn’t carry — a shell
thickness, a truss cross-section area, a beam inertia tensor, a
point mass. femorph-solver stamps that data on the model via
Model.assign(..., real=...),
which writes a 1-D array under a real_id that the element
kernel later indexes.
Native API#
import femorph_solver as fs
model = fs.Model.from_grid(grid)
model.assign(
fs.ELEMENTS.QUAD4_SHELL,
{"EX": 2.1e11, "PRXY": 0.30, "DENS": 7850.0},
real=[0.005], # 5 mm shell thickness, written under real_id=1
)
The element kernel reads the array as a flat positional buffer and extracts the named slots via the table below.
Per-element-type layouts#
Element |
Positional layout |
Notes |
|---|---|---|
TRUSS2 |
|
Only |
SPRING |
|
|
POINT_MASS |
|
|
BEAM2 |
|
|
QUAD4_PLANE |
|
Out-of-plane thickness; default 1.0. |
QUAD4_SHELL |
|
Through-thickness dimension. Mandatory. |
HEX8 / HEX20 / TET10 / WEDGE15 / PYR13 |
(none) |
Solid elements carry no real constants; geometry is fully determined by the nodes. |
Foreign-deck readers (CDB / BDF / INP / FEM) round-trip the
positional layout exactly — an element carrying REAL,2 in the
input deck ends up with model.real_constants[2] populated in
the correct order.
Introspection#
model.real_constants
# {1: array([0.005])} # QUAD4_SHELL thickness
# {2: array([1.0e-4, 8.3e-9, 8.3e-9, 1.7e-8])} # BEAM2 section
# Which real id does an element use?
model.grid.cell_data["ansys_real_constant"]
Sections (future)#
Beam cross-section description blocks (e.g. MAPDL’s
SECTYPE / SECDATA, NASTRAN’s PBARL / PBEAML,
Abaqus’s *BEAM SECTION) are not yet consumed by femorph-solver.
A foreign deck with only the equivalent of R data works today;
a deck describing a beam through a cross-section catalogue does
not yet translate into the equivalent BEAM2 real constants. All
three formats will eventually share a common intermediate
representation.
See also#
Materials — material properties (
EX,PRXY,DENSetc.).Element library — per-element documentation including the exact real-constant layout.