Skip to content

Material

Material

Material(material_type: str, material_name: str, user_name: str)

Bases: ABC

Abstract base class for manager-owned OpenSees material objects.

Material instances do not self-register and do not assign their own tags. A :class:~femora.core.material_manager.MaterialManager owns lifecycle operations, tag assignment, removal, and retagging for a local model context.

Parameters:

Name Type Description Default
material_type str

OpenSees material category (e.g. 'nDMaterial').

required
material_name str

Concrete OpenSees material name (e.g. 'ElasticIsotropic').

required
user_name str

User-specified label for this material instance.

required

Attributes:

Name Type Description
tag Optional[int]

Manager-assigned OpenSees material tag. Remains None until this object is added to a :class:~femora.core.material_manager.MaterialManager.

_owner object | None

Reference to the owning manager, or None when unmanaged.

Attributes

tag instance-attribute

tag: Optional[int] = None

_owner instance-attribute

_owner: object | None = None

material_type instance-attribute

material_type = material_type

material_name instance-attribute

material_name = material_name

user_name instance-attribute

user_name = user_name

params instance-attribute

params: Dict[str, Any] = {}

Methods:

_require_tag

_require_tag() -> int

Return the assigned tag, or raise if this material is unmanaged.

to_tcl abstractmethod

to_tcl() -> str

Render the OpenSees material definition command as a Tcl string.

updateMaterialStage

updateMaterialStage(state: str) -> str

Return an updateMaterialStage Tcl command, or empty string.

set_parameter

set_parameter(parameter_name: str, new_value: Union[float, int, str, None] = None, element_tags: Optional[List[int]] = None) -> str

Return a setParameter Tcl command, or empty string.

get_param

get_param(key: str) -> Any

Return the value of a stored parameter by key.

__repr__

__repr__() -> str

__str__

__str__() -> str