The data model
An xfea analysis is a model (xfea.model.Model) and its problems (xfea.problem.Problem), each made of smaller
objects. All of them share one base, which is what makes a model one thing that can be named, copied, saved and
handed to any solver.
How the objects hold together
Section titled “How the objects hold together”flowchart LR
Model --> Part
Part --> Node
Part --> Element
Element --> Section
Section --> Material
Model --> Supports["Supports and couplings"]
Model --> Interface["Interfaces between parts"]
Model --> Problem
Problem --> Step
Step --> Loads["Load fields"]
Step --> Outputs["Result fields"]
- A model holds parts, supports, couplings, interfaces and problems.
- A part is a piece of the structure with its own nodes and elements. Pieces that touch or are welded are joined by an interface between their parts, not by sharing nodes.
- An element joins nodes and has a section; a section has a material.
- A problem holds steps, applied in order. A step holds its load fields and the result fields it should keep.
The classes
Section titled “The classes”FEAObject a name, a uid, copies, JSON and pickle├─ FEAData what a solver's input is written from│ ├─ Model│ ├─ Part│ ├─ Node│ ├─ ElementBase BeamElement, ShellElement, TetrahedronElement ...│ ├─ SectionBase RectangularSection, ShellSection, SolidSection ...│ ├─ MaterialBase ElasticIsotropic, ElasticPlastic ...│ ├─ BoundaryConditionBase FixedBC, PinnedBC, GeneralBC ...│ ├─ ConstraintBase TieConstraint ...│ ├─ InterfaceBase PartPartInterface ...│ ├─ GroupBase NodesGroup, ElementsGroup, FacesGroup│ ├─ Problem│ ├─ StepBase StaticStep, ModalAnalysis, BucklingAnalysis ...│ ├─ LoadBase VectorLoad, ScalarLoad│ └─ LoadFieldBase ForceField ...├─ FieldResultsBase DisplacementFieldResults, StressFieldResults ...└─ Result DisplacementResult, StressResult ...The classes on the right are the ones a script uses; the bases are in the API reference.
What every object has
Section titled “What every object has”from xfea.model import Node
node = Node(xyz=(0.0, 0.0, 0.0), name="corner")
print(node.name) # the name given, or one generatedprint(node.uid) # a unique id, kept when the object is saved and loadedprint(node.key) # its number in the part it is added to; None until then
twin = node.copy()copy(), to_json() and to_pickle() are on every object: see
Saving and loading.
Groups
Section titled “Groups”Nodes, elements and faces are handed around in groups: part.nodes is a NodesGroup, and so is what
part.find_nodes_on_plane(plane) returns. A group can be narrowed with a rule of your own,
part.nodes.subgroup(lambda n: n.x < 1e-3), and is accepted wherever nodes are, as is a plain list.
© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them