Skip to content

Assign

_FEAssignMixin

_assignMultiElement(dimension, assign_fn, assign_value, tagsMacro=None, tagsElement=None, assign_extra_args=()) staticmethod

Apply a single-element assignment function to a collection of elements.

This is the shared implementation used by all assignMulti* methods. Exactly one of tagsMacro or tagsElement must be non-empty.

When tagsMacro is provided, the helper resolves each macro-element (geometric object) to its set of mesh elements for the given dimension and calls assign_fn for each one.

Parameters:

Name Type Description Default
dimension Dim

Spatial dimension of the elements (Dim.DIM_1D for frames, Dim.DIM_2D for plates).

required
assign_fn Callable[..., None]

Callable with signature assign_fn(element_tag, assign_value, *assign_extra_args) -> None.

required
assign_value Any

The value to pass as the second argument to assign_fn for every targeted element.

required
tagsMacro Optional[List[myInt64]]

List of macro-element (geometric entity) tags. Mutually exclusive with tagsElement.

None
tagsElement Optional[List[myInt64]]

List of individual mesh element tags. Mutually exclusive with tagsMacro.

None
assign_extra_args tuple[Any, ...]

Additional positional arguments forwarded to assign_fn after assign_value. Defaults to an empty tuple.

()

Raises:

Type Description
EXAExceptions

If both lists are non-empty or both are empty.

_check_material_assign(tagElement, idMaterial)

Validate arguments before assigning a material to an element.

Parameters:

Name Type Description Default
tagElement myInt64

Mesh element tag (must be numpy.uint64).

required
idMaterial int

Material id to validate against the material library.

required

Raises:

Type Description
EXAExceptions

If tagElement is not numpy.uint64, if idMaterial is not an int, or if idMaterial is not present in the material library.

_getFrameLocal2Default(tagFrame) staticmethod

Compute the default local axis-2 direction for a frame element.

When the frame is parallel to the global Z axis, axis 2 is set to the positive global Y direction. Otherwise axis 2 is computed as Z_global × local3. This matches the Strand7 convention described in :meth:__init__.

Parameters:

Name Type Description Default
tagFrame myInt64

Mesh tag of the frame element.

required

Returns:

Name Type Description
Normalised Vector3d

class:Vector3d for the default local axis 2.

_getPlateLocal1Default(tagPlate) staticmethod

Compute the default local axis-1 direction for a plate element.

For a triangle (nodes N1, N2, N3) axis 1 goes from N1 toward the midpoint of side N2–N3. For a quad (nodes N1, N2, N3, N4) it goes from the midpoint of side N1–N4 to the midpoint of side N2–N3. This matches the Strand7 convention described in :meth:__init__.

Parameters:

Name Type Description Default
tagPlate myInt64

Mesh tag of the plate element.

required

Returns:

Name Type Description
Normalised Vector3d

class:Vector3d for the default local axis 1.

Raises:

Type Description
EXAExceptions

If tagPlate is not in the mesh or the element has an unsupported number of nodes.

addMaterialToLibrary(idMaterial, modulus, poisson, name, density=0.0, thermal_expansion=0.0, conductivity=0.0, specific_heat=0.0)

Register a material in the model material library.

Parameters:

Name Type Description Default
idMaterial int

Unique integer identifier for the material.

required
modulus float

Young's modulus [MPa].

required
poisson float

Poisson's ratio [-].

required
name str

Human-readable material name.

required
density float

Mass density [kg/m³]. Default is 0.0.

0.0
thermal_expansion float

Coefficient of thermal expansion [1/°C]. Default is 0.0.

0.0
conductivity float

Thermal conductivity [kJ/s/m/°C]. Default is 0.0.

0.0
specific_heat float

Specific heat capacity [kJ/kg/°C]. Default is 0.0.

0.0

addSectionShape(idShape, name, tp, dim=None)

Register a cross-section shape in the model section library.

Parameters:

Name Type Description Default
idShape int

Unique integer identifier for the section shape. Must not already exist in the library.

required
name str

Human-readable name for the section.

required
tp ShapesEnum

Cross-section type from :class:ShapesEnum. Currently only ShapesEnum.SHAPE_RECT is supported.

required
dim Optional[List[float]]

Dimensions of the cross-section as a list of floats. For SHAPE_RECT exactly 2 values are required: [width, height].

None

Raises:

Type Description
EXAExceptions

If idShape is already in use, if idShape is not an int, if tp is not a ShapesEnum, if dim contains non-float values, or if the dimension list length does not match the shape type requirements.

assignFrameLocal2(tagFrame, axis)

Assign a custom local axis-2 direction to a single frame element.

The supplied axis is orthogonalised against the frame's local axis 3 (the longitudinal direction) before being stored, so the resulting axis-2 is always perpendicular to the frame axis.

Parameters:

Name Type Description Default
tagFrame myInt64

Mesh tag of the frame element.

required
axis Vector3d

Desired local axis-2 direction as a :class:Vector3d. Must not be parallel to the frame axis (local axis 3).

required

Raises:

Type Description
EXAExceptions

If tagFrame is not an accepted integer type, if axis is not a :class:Vector3d, or if axis is parallel to the frame axis.

assignFrameMaterial(tagFrame, idMaterial)

Assign a material to a single frame element.

Parameters:

Name Type Description Default
tagFrame myInt64

Mesh tag of the frame element.

required
idMaterial int

Material id as registered in the material library.

required

Raises:

Type Description
EXAExceptions

See :meth:__check_material_assign for validation details.

assignFrameSectionShape(tagFrame, idShape)

Assign a cross-section shape to a single frame element.

Parameters:

Name Type Description Default
tagFrame myInt64

Mesh tag of the frame element.

required
idShape int

Section shape id as registered in the section library.

required

Raises:

Type Description
EXAExceptions

If tagFrame is not an accepted integer type, if idShape is not an int, or if idShape is not present in the section library.

assignFrameWinklerSupport(tagFrame, winkler_supports)

Assign a Winkler-type distributed support to a single frame element.

Unlike :meth:addMultiFrameWinklerSpring, which converts the subgrade modulus into equivalent nodal springs, this method stores the support parameters directly on the frame element for later export (e.g. to the solver template). The support is treated as evenly distributed along the frame length.

Parameters:

Name Type Description Default
tagFrame myInt64

Mesh tag of the frame element.

required
winkler_supports Tuple[float, float, bool]

A 3-tuple (stiffness_local_dir1, stiffness_local_dir2, only_compression) where the stiffnesses are in force/length² units and only_compression restricts the support to compressive contact only.

required

assignMultiElement(*args, **kwargs) staticmethod

Public alias for _assignMultiElement.

assignMultiFrameLocal2(axis, tagsMacro=None, tagsFrames=None)

Assign a custom local axis-2 direction to multiple frame elements.

Exactly one of tagsMacro or tagsFrames must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh frame elements that belong to those macro-elements (geometric objects).

Parameters:

Name Type Description Default
axis Vector3d

Desired local axis-2 direction as a :class:Vector3d.

required
tagsMacro Optional[List[myInt64]]

List of macro-element tags whose mesh frames are targeted.

None
tagsFrames Optional[List[myInt64]]

List of individual mesh frame element tags to target directly.

None

Raises:

Type Description
EXAExceptions

If both or neither of tagsMacro/tagsFrames are provided, or if any individual assignment fails (see :meth:assignFrameLocal2).

assignMultiFrameMaterial(idMaterial, tagsMacro=None, tagsFrames=None)

Assign a material to multiple frame elements.

Exactly one of tagsMacro or tagsFrames must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh frame elements that belong to those macro-elements (geometric objects).

Parameters:

Name Type Description Default
idMaterial int

Material id as registered in the material library.

required
tagsMacro Optional[List[myInt64]]

List of macro-element tags whose mesh frames are targeted.

None
tagsFrames Optional[List[myInt64]]

List of individual mesh frame element tags to target directly.

None

Raises:

Type Description
EXAExceptions

If both or neither of tagsMacro/tagsFrames are provided, or if any individual assignment fails (see :meth:assignFrameMaterial).

assignMultiFrameSectionShape(idShape, tagsMacro=None, tagsFrames=None)

Assign a cross-section shape to multiple frame elements.

Exactly one of tagsMacro or tagsFrames must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh frame elements that belong to those macro-elements (geometric objects).

Parameters:

Name Type Description Default
idShape int

Section shape id as registered in the section library.

required
tagsMacro Optional[List[myInt64]]

List of macro-element tags whose mesh frames are targeted.

None
tagsFrames Optional[List[myInt64]]

List of individual mesh frame element tags to target directly.

None

Raises:

Type Description
EXAExceptions

If both or neither of tagsMacro/tagsFrames are provided, or if any individual assignment fails (see :meth:assignFrameSectionShape).

assignMultiFrameWinklerSupport(winkler_supports, tagsMacro=None, tagsFrames=None)

Assign a Winkler-type distributed support to multiple frame elements.

Exactly one of tagsMacro or tagsFrames must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh frame elements that belong to those macro-elements (geometric objects).

Parameters:

Name Type Description Default
winkler_supports Tuple[float, float, bool]

A 3-tuple (stiffness_local_dir1, stiffness_local_dir2, only_compression) (see :meth:assignFrameWinklerSupport for details).

required
tagsMacro Optional[List[myInt64]]

List of macro-element tags whose mesh frames are targeted.

None
tagsFrames Optional[List[myInt64]]

List of individual mesh frame element tags to target directly.

None

Raises:

Type Description
EXAExceptions

If both or neither of tagsMacro/tagsFrames are provided.

assignMultiPlateFaceSupport(support, tagsMacro=None, tagsPlate=None)

Assign a face support to multiple plate elements.

Exactly one of tagsMacro or tagsPlate must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh plate elements that belong to those macro-elements (geometric objects).

Parameters:

Name Type Description Default
support PlateFaceSupport

A :class:PlateFaceSupport instance describing the foundation stiffness properties.

required
tagsMacro Optional[List[myInt64]]

List of macro-element tags whose mesh plates are targeted.

None
tagsPlate Optional[List[myInt64]]

List of individual mesh plate element tags to target directly.

None

Raises:

Type Description
EXAExceptions

If both or neither of tagsMacro/tagsPlate are provided, or if any individual assignment fails (see :meth:assignPlateFaceSupport).

assignMultiPlateLocal1(axis, tagsMacro=None, tagsPlate=None)

Assign a custom local axis-1 direction to multiple plate elements.

Exactly one of tagsMacro or tagsPlate must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh plate elements that belong to those macro-elements (geometric objects).

Parameters:

Name Type Description Default
axis Vector3d

Desired local axis-1 direction as a :class:Vector3d.

required
tagsMacro Optional[List[myInt64]]

List of macro-element tags whose mesh plates are targeted.

None
tagsPlate Optional[List[myInt64]]

List of individual mesh plate element tags to target directly.

None

Raises:

Type Description
EXAExceptions

If both or neither of tagsMacro/tagsPlate are provided, or if any individual assignment fails (see :meth:assignPlateLocal1).

assignMultiPlateMaterial(idMaterial, tagsMacro=None, tagsPlate=None)

Assign a material to multiple plate elements.

Exactly one of tagsMacro or tagsPlate must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh plate elements that belong to those macro-elements (geometric objects).

Parameters:

Name Type Description Default
idMaterial int

Material id as registered in the material library.

required
tagsMacro Optional[List[myInt64]]

List of macro-element tags whose mesh plates are targeted.

None
tagsPlate Optional[List[myInt64]]

List of individual mesh plate element tags to target directly.

None

Raises:

Type Description
EXAExceptions

If both or neither of tagsMacro/tagsPlate are provided, or if any individual assignment fails (see :meth:assignPlateMaterial).

assignMultiPlateThicknesses(thicknesses, tagsMacro=None, tagsPlate=None)

Assign bending and membrane thicknesses to multiple plate elements.

Exactly one of tagsMacro or tagsPlate must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh plate elements that belong to those macro-elements (geometric objects).

Parameters:

Name Type Description Default
thicknesses tuple[float, float]

A 2-tuple (bending_thickness, membrane_thickness) in model length units.

required
tagsMacro Optional[List[myInt64]]

List of macro-element tags whose mesh plates are targeted.

None
tagsPlate Optional[List[myInt64]]

List of individual mesh plate element tags to target directly.

None

Raises:

Type Description
EXAExceptions

If both or neither of tagsMacro/tagsPlate are provided, or if any individual assignment fails (see :meth:assignPlateThicknesses).

assignPlateFaceSupport(tagPlate, support)

Assign a face (Winkler-type) support to a single plate element.

A face support models a distributed elastic foundation acting on the plate surface, defined by normal and lateral subgrade stiffnesses.

Parameters:

Name Type Description Default
tagPlate myInt64

Mesh tag of the plate element.

required
support PlateFaceSupport

A :class:PlateFaceSupport instance describing the foundation stiffness properties.

required

Raises:

Type Description
EXAExceptions

If tagPlate is not an accepted integer type or if support is not a :class:PlateFaceSupport instance.

assignPlateLocal1(tagPlate, axis)

Assign a custom local axis-1 direction to a single plate element.

The supplied axis is projected onto the plate surface (i.e. orthogonalised against local axis 3) before being stored, so the resulting axis-1 always lies in the plane of the plate.

Parameters:

Name Type Description Default
tagPlate myInt64

Mesh tag of the plate element.

required
axis Vector3d

Desired local axis-1 direction as a :class:Vector3d. Must not be parallel to the plate normal (local axis 3).

required

Raises:

Type Description
EXAExceptions

If tagPlate is not an accepted integer type, if axis is not a :class:Vector3d, or if axis is parallel to the plate normal.

assignPlateMaterial(tagPlate, idMaterial)

Assign a material to a single plate element.

Parameters:

Name Type Description Default
tagPlate myInt64

Mesh tag of the plate element.

required
idMaterial int

Material id as registered in the material library.

required

Raises:

Type Description
EXAExceptions

See :meth:__check_material_assign for validation details.

assignPlateThicknesses(tagPlate, thicknesses)

Assign bending and membrane thicknesses to a single plate element.

Parameters:

Name Type Description Default
tagPlate myInt64

Mesh tag of the plate element.

required
thicknesses tuple[float, float]

A 2-tuple (bending_thickness, membrane_thickness) in model length units. Both values must be floats.

required

Raises:

Type Description
EXAExceptions

If tagPlate is not an accepted integer type, if thicknesses is not a 2-tuple, or if either value is not a float.

frameMaterial()

Return the material assignment for frame elements.

Returns:

Type Description
Dict[myInt64, int]

A dict mapping each frame mesh element tag to its material id.

frameSectionShape()

Return the section-shape assignment for frame elements.

Returns:

Type Description
Dict[myInt64, int]

A dict mapping each frame mesh element tag to its section shape id.

framesSupports()

Return the Winkler support assignment for frame elements.

Returns:

Type Description
Dict[myInt64, Tuple[float, float, bool]]

A dict mapping each frame mesh element tag to its Winkler support

Dict[myInt64, Tuple[float, float, bool]]

tuple (stiffness_local_dir1, stiffness_local_dir2, only_compression).

getFrameLocal1(tagFrame)

Return the local axis-1 unit vector of a frame element.

Computed as local2 × local3, completing the right-hand local coordinate system of the frame.

Parameters:

Name Type Description Default
tagFrame myInt64

Mesh tag of the frame element.

required

Returns:

Name Type Description
Normalised Vector3d

class:Vector3d for local axis 1.

getFrameLocal2(tagFrame)

Return the local axis-2 unit vector of a frame element.

Returns the user-assigned axis-2 if one has been set via :meth:assignFrameLocal2; otherwise falls back to the default computed from the frame orientation (see :meth:__getFrameLocal2Default).

Parameters:

Name Type Description Default
tagFrame myInt64

Mesh tag of the frame element.

required

Returns:

Name Type Description
Normalised Vector3d

class:Vector3d for local axis 2.

getFrameLocal3(tagFrame) staticmethod

Return the local axis-3 (longitudinal) unit vector of a frame element.

Local axis 3 runs from the start node to the end node of the frame, following the same convention as Strand7.

Parameters:

Name Type Description Default
tagFrame myInt64

Mesh tag of the frame element.

required

Returns:

Name Type Description
Normalised Vector3d

class:Vector3d aligned with the frame axis (N1 → N2).

Raises:

Type Description
EXAExceptions

If tagFrame is not present in the mesh.

getPlateLocal1(tagPlate)

Return the local axis-1 unit vector of a plate element.

Returns the user-assigned axis-1 if one has been set via :meth:assignPlateLocal1; otherwise falls back to the default computed from node positions (see :meth:__getPlateLocal1Default).

Parameters:

Name Type Description Default
tagPlate myInt64

Mesh tag of the plate element.

required

Returns:

Name Type Description
Normalised Vector3d

class:Vector3d for local axis 1.

getPlateLocal2(tagPlate)

Return the local axis-2 unit vector of a plate element.

Computed as local3 × local1, completing the right-hand local coordinate system of the plate.

Parameters:

Name Type Description Default
tagPlate myInt64

Mesh tag of the plate element.

required

Returns:

Name Type Description
Normalised Vector3d

class:Vector3d for local axis 2.

getPlateLocal3(tagPlate) staticmethod

Return the local axis-3 (normal) unit vector of a plate element.

Local axis 3 is the outward normal to the plate surface, computed as the cross product of the vectors (N1→N2) × (N2→N3), following the same convention as Strand7.

Parameters:

Name Type Description Default
tagPlate myInt64

Mesh tag of the plate element.

required

Returns:

Name Type Description
Normalised Vector3d

class:Vector3d normal to the plate surface.

Raises:

Type Description
EXAExceptions

If tagPlate is not present in the mesh.

plateMaterial()

Return the material assignment for plate elements.

Returns:

Type Description
Dict[myInt64, int]

A dict mapping each plate mesh element tag to its material id.

plateThicknesses()

Return the thickness assignment for plate elements.

Returns:

Type Description
Dict[myInt64, Tuple[float, float]]

A dict mapping each plate mesh element tag to a 2-tuple

Dict[myInt64, Tuple[float, float]]

(bending_thickness, membrane_thickness).

platesFaceSupports()

Return the face support assignment for plate elements.

Returns:

Type Description
Dict[myInt64, PlateFaceSupport]

A dict mapping each plate mesh element tag to its PlateFaceSupport.

sectionMaterials()

Return the material library.

Returns:

Type Description
Dict[int, FEMaterial]

A dict mapping each material id to its :class:FEMaterial instance.

sectionShapes()

Return the section-shape library.

Returns:

Type Description
Dict[int, SectionShape]

A dict mapping each section shape id to its :class:SectionShape instance.