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. In MAPDL that data goes into a real-constant set, identified
by a REAL id and attached to each element through its
REAL stamp. femorph-solver reproduces the convention with
femorph_solver.Model.r() and real().
R and REAL#
m = femorph_solver.Model()
m.et(1, "SHELL181")
m.mat(1)
m.mp("EX", 1, 2.1e11)
m.mp("PRXY", 1, 0.30)
m.mp("DENS", 1, 7850.0)
m.real(1) # REAL,1 — stamp the id for subsequent E,...
m.r(1, 0.005) # R,1,0.005 — 5 mm thickness
# ... n(), e() ...
Model.r() stores the positional values on the grid; the element
kernel pulls them out as a 1-D array and indexes them by the layout
documented in its theory page.
Per-element-type layouts#
Element |
Positional layout |
Notes |
|---|---|---|
LINK180 |
|
Only |
COMBIN14 |
|
|
MASS21 |
|
|
BEAM188 |
|
|
PLANE182 |
|
Out-of-plane thickness; default 1.0. |
SHELL181 |
|
Through-thickness dimension. Mandatory. |
SOLID185 / SOLID186 / SOLID187 |
(none) |
Solid elements carry no real constants; geometry is fully determined by the nodes. |
CDB decks round-trip the positional layout exactly — an element
carrying REAL,2 in the input deck ends up with
m.real_constants[2] populated in the correct order.
Introspection#
m.real_constants
# {1: array([0.005])} # SHELL181 thickness
# {2: array([1.0e-4, 8.3e-9, 8.3e-9, 1.7e-8])} # BEAM188 section
# Which real id does an element use?
m.grid.cell_data["ansys_real_constant"]
Sections (future)#
MAPDL’s SECTYPE / SECDATA commands for beam cross-sections are
not yet consumed by femorph-solver. A CDB with only R data works today;
a CDB using SECTYPE,...,BEAM,RECT + SECDATA for a beam
section does not (yet) translate into BEAM188 real constants. Both
paths will eventually share a common intermediate representation.
See also#
Materials —
MPproperties (EX,PRXY,DENSetc).Element library — per-element documentation including the exact real-constant layout.