Skip to content

Materials

Module: xfea.model.materials.material

Materials: elastic, elastic-plastic, orthotropic and thermal, in the model’s units.

ElasticIsotropic(
    E: float,
    v: float,
    density: float,
    expansion: float | None = None,
    **kwargs,
)

A linear elastic, isotropic material: Young’s modulus, Poisson’s ratio and density.

Parameters

Name Type Description
E float Young’s modulus, force per area (N/mm² for N and mm: 210000 for steel).
v float Poisson’s ratio (0.3 for steel).
density float Mass per volume (t/mm³ for N and mm: 7.85e-9 for steel). Gravity and modal and dynamic steps use it.
expansion float, optional Thermal expansion coefficient, strain per degree (1.2e-5 for steel), or None.
**kwargs dict, optional Passed on, such as name, the material’s name.

Attributes

Name Type Description
G float Shear modulus, E / (2 (1 + v)).

Guidance (materials)

  • The grade recipes (ElasticIsotropic.steel("s355"), .concrete, .aluminum, ElasticPlastic.steel, ElasticOrthotropic.timber) are in SI: Pa and kg/m³, for a model in N and m. For a model in N and mm write the values out: ElasticIsotropic(E=210000, v=0.3, density=7.85e-9).
Properties
Efloat

float: Young’s modulus, force per area.

Gfloatread-only

float: Shear modulus, E / (2 (1 + v)).

densityfloat | None

float: Mass per volume (t/mm³ for N and mm), or None.

expansionfloat | None

float: Thermal expansion coefficient, strain per degree, or None.

keyAny | Noneread-only

The object’s key (its number) in what it is registered to; None until it is given one.

modelread-only

Model: The model the material is registered to, or None before it is added.

namestr

The object’s name.

registrationAny | None

The object this one is registered to (a part, a model, a step, …), or None.

uidUUID | Noneread-only

The object’s unique id, a UUID.

vfloat

float: Poisson’s ratio.

ElasticOrthotropic(
    Ex: float,
    Ey: float,
    Ez: float,
    vxy: float,
    vyz: float,
    vzx: float,
    Gxy: float,
    Gyz: float,
    Gzx: float,
    density: float,
    expansion: float | None = None,
    **kwargs,
)

A linear elastic, orthotropic material, its axes the global x, y and z (xfea sets no material orientation).

Parameters

Name Type Description
Ex, Ey, Ez float Young’s moduli along x, y and z, force per area (N/mm² for N and mm).
vxy float Poisson’s ratio for a stress along x: minus the strain along y over the strain along x.
vyz float Poisson’s ratio for a stress along y: minus the strain along z over the strain along y.
vzx float Poisson’s ratio for a stress along z: minus the strain along x over the strain along z.
Gxy, Gyz, Gzx float Shear moduli in the x-y, y-z and z-x planes, force per area.
density float Mass per volume (t/mm³ for N and mm).
expansion float, optional Thermal expansion coefficient, strain per degree, the same along every axis, or None.
**kwargs dict, optional Passed on, such as name, the material’s name.

Attributes

Name Type Description
vyx, vzy, vxz float The reciprocal Poisson’s ratios, from vyx / Ey = vxy / Ex and the like.
Properties
densityfloat | None

float: Mass per volume (t/mm³ for N and mm), or None.

expansionfloat | None

float: Thermal expansion coefficient, strain per degree, or None.

keyAny | Noneread-only

The object’s key (its number) in what it is registered to; None until it is given one.

modelread-only

Model: The model the material is registered to, or None before it is added.

namestr

The object’s name.

registrationAny | None

The object this one is registered to (a part, a model, a step, …), or None.

uidUUID | Noneread-only

The object’s unique id, a UUID.

ElasticPlastic(
    E: float,
    v: float,
    density: float,
    strain_stress: list[tuple[float, float]],
    expansion: float | None = None,
    **kwargs,
)

An isotropic elastic-plastic material: linear elastic up to yield, then the stress-strain curve you give.

Parameters

Name Type Description
E float Young’s modulus, force per area (N/mm² for N and mm).
v float Poisson’s ratio.
density float Mass per volume (t/mm³ for N and mm).
strain_stress list[tuple[float, float]] (strain, stress) points of the uniaxial curve from the yield point on, strain total (elastic plus plastic) and stress in force per area.
expansion float, optional Thermal expansion coefficient, strain per degree, or None.
**kwargs dict, optional Passed on, such as name, the material’s name.

Attributes

Name Type Description
G float Shear modulus, E / (2 (1 + v)).
strain_stress list[tuple[float, float]] The (strain, stress) points.

Guidance (materials)

  • Give strain_stress as total strain and stress from the yield point, (fy / E, fy): the points before it are elastic and add nothing.
  • The plasticity is von Mises, the same in tension and compression, so it suits metals. The .concrete recipe’s curve, with its compression branch, is refused by the solver.
Properties
Efloat

float: Young’s modulus, force per area.

Gfloatread-only

float: Shear modulus, E / (2 (1 + v)).

densityfloat | None

float: Mass per volume (t/mm³ for N and mm), or None.

expansionfloat | None

float: Thermal expansion coefficient, strain per degree, or None.

keyAny | Noneread-only

The object’s key (its number) in what it is registered to; None until it is given one.

modelread-only

Model: The model the material is registered to, or None before it is added.

namestr

The object’s name.

registrationAny | None

The object this one is registered to (a part, a model, a step, …), or None.

uidUUID | Noneread-only

The object’s unique id, a UUID.

vfloat

float: Poisson’s ratio.

MaterialBase(density: float | None = None, expansion: float | None = None, **kwargs)

The base of every material: its density and thermal expansion.

Abstract: use a concrete material, such as ElasticIsotropic.

Parameters

Name Type Description
density float, optional Mass per volume, in units consistent with force and length (t/mm³ for N and mm: 7.85e-9 for steel), or None.
expansion float, optional Thermal expansion coefficient, strain per degree (1.2e-5 for steel), or None.
**kwargs dict, optional Passed on, such as name, the material’s name.

Attributes

Name Type Description
density float Mass per volume.
expansion float Thermal expansion coefficient.
key int The material’s index in its model, set when it is added to one.
model Model The model the material is registered to.
Properties
densityfloat | None

float: Mass per volume (t/mm³ for N and mm), or None.

expansionfloat | None

float: Thermal expansion coefficient, strain per degree, or None.

keyAny | Noneread-only

The object’s key (its number) in what it is registered to; None until it is given one.

modelread-only

Model: The model the material is registered to, or None before it is added.

namestr

The object’s name.

registrationAny | None

The object this one is registered to (a part, a model, a step, …), or None.

uidUUID | Noneread-only

The object’s unique id, a UUID.

Stiff(density: float | None = None, expansion: float | None = None, **kwargs)

A very stiff, massless elastic material, for members that should not deform; the solver plugin sets its stiffness.

Properties
densityfloat | None

float: Mass per volume (t/mm³ for N and mm), or None.

expansionfloat | None

float: Thermal expansion coefficient, strain per degree, or None.

keyAny | Noneread-only

The object’s key (its number) in what it is registered to; None until it is given one.

modelread-only

Model: The model the material is registered to, or None before it is added.

namestr

The object’s name.

registrationAny | None

The object this one is registered to (a part, a model, a step, …), or None.

uidUUID | Noneread-only

The object’s unique id, a UUID.

ThermalElasticIsotropic(
    k: float,
    c: float,
    E: float,
    v: float,
    density: float,
    expansion: float | None = None,
    **kwargs,
)

An isotropic elastic material that also conducts and stores heat, for heat transfer and thermal stress analyses.

Parameters

Name Type Description
k float Thermal conductivity, power per length per degree (W/(m·K), the same number in mW/(mm·K) for N, mm and s: about 50 for steel).
c float Specific heat capacity, energy per mass per degree (J/(kg·K) times 1e6 for N, mm, s and t: 4.6e8 for steel).
E float Young’s modulus, force per area (N/mm² for N and mm).
v float Poisson’s ratio.
density float Mass per volume (t/mm³ for N and mm).
expansion float, optional Thermal expansion coefficient, strain per degree (1.2e-5 for steel), or None.
**kwargs dict, optional Passed on, such as name, the material’s name.
Properties
Efloat

float: Young’s modulus, force per area.

Gfloatread-only

float: Shear modulus, E / (2 (1 + v)).

cfloatread-only

float: Specific heat capacity, energy per mass per degree.

densityfloat | None

float: Mass per volume (t/mm³ for N and mm), or None.

expansionfloat | None

float: Thermal expansion coefficient, strain per degree, or None.

kfloatread-only

float: Thermal conductivity, power per length per degree.

keyAny | Noneread-only

The object’s key (its number) in what it is registered to; None until it is given one.

modelread-only

Model: The model the material is registered to, or None before it is added.

namestr

The object’s name.

registrationAny | None

The object this one is registered to (a part, a model, a step, …), or None.

uidUUID | Noneread-only

The object’s unique id, a UUID.

vfloat

float: Poisson’s ratio.

UserMaterial(**kwargs)

A material defined by a solver subroutine you supply; xfea holds no properties for it.

Properties
keyAny | Noneread-only

The object’s key (its number) in what it is registered to; None until it is given one.

namestr

The object’s name.

registrationAny | None

The object this one is registered to (a part, a model, a step, …), or None.

uidUUID | Noneread-only

The object’s unique id, a UUID.

© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them