Element library#
femorph-solver ships a library of structural finite elements. Each
element is built from published FEM theory (textbook / journal
citations on its theory page). Element names are topology-first
and vendor-neutral — HEX8, HEX20, TET10, BEAM2,
QUAD4_SHELL, etc. Foreign-deck spellings (e.g. MAPDL
SOLID185, NASTRAN CHEXA, Abaqus C3D8) are translated to
these neutral names at each interop boundary; every internal call-
site sees only the neutral form.
Correctness is verified against two independent evidence sources:
analytical / textbook closed-form solutions (tests/analytical/)
and migration-safety agreement with established commercial solvers
on shared benchmarks. Commercial solvers are yardsticks for
migration safety, not a source of implementation detail.
Pick an element by dimension and kinematics:
Element |
Kind |
Notes |
|---|---|---|
3D 2-node truss |
Axial only; 3 DOF/node. |
|
3D 2-node spring |
Longitudinal mode; 3 DOF/node. |
|
1-node point mass |
Translational-only (3 DOF/node). |
|
3D 2-node Euler–Bernoulli beam |
6 DOF/node; axial + torsion + two bending planes. |
|
2D 4-node quad |
2 DOF/node; plane stress / plane strain. |
|
4-node Mindlin shell |
Selective reduced integration; drilling stabilisation. |
|
3D 8-node hex |
2×2×2 Gauss; B-bar / enhanced-strain options. |
|
3D 20-node serendipity hex |
Reduced 2×2×2 stiffness with Irons 14-point mass; degenerate
|
|
3D 10-node tet |
4-point Keast Gauss (both K and M). |
Registry and dispatch#
Element classes register into femorph_solver.elements and are
discovered by their neutral kernel name:
from femorph_solver.elements import get, registered
registered()
# ['BEAM2', 'HEX20', 'HEX8', 'POINT_MASS', 'PYR13', 'QUAD4_PLANE',
# 'QUAD4_SHELL', 'SPRING', 'TET10', 'TRUSS2', 'WEDGE15']
hex_kernel = get("HEX8")
The native API (femorph_solver.Model.assign()) takes a
typed ELEMENTS spec rather than a string:
import femorph_solver as fs
model = fs.Model.from_grid(grid)
model.assign(fs.ELEMENTS.HEX8, {"EX": 2.1e11, "PRXY": 0.30, "DENS": 7850.0})
model.assign(
fs.ELEMENTS.HEX8(integration="enhanced_strain"),
{"EX": 2.1e11, "PRXY": 0.30, "DENS": 7850.0},
)
Foreign-deck readers (femorph_solver.interop.mapdl.from_cdb(),
femorph_solver.interop.nastran.from_bdf(),
femorph_solver.interop.abaqus.from_inp()) translate their
respective catalogue names into the neutral kernel names above
before the model is constructed.
Every element class implements the
ElementBase interface — ke()
for stiffness, me() for mass, optional ke_batch() /
me_batch() for vectorised assembly.