Material
Material
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. |
required |
material_name
|
str
|
Concrete OpenSees material name (e.g. |
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 |
user_name |
str
|
Label used by the manager's name lookup. |
params |
dict[str, Any]
|
Concrete component parameter storage. |
Methods:
| Name | Description |
|---|---|
to_tcl |
Render a material definition without executing it. |
updateMaterialStage |
Optionally render a stage transition for a constitutive model. |
set_parameter |
Optionally render a material-specific parameter update. |
get_param |
Read a value from the concrete material's parameter dictionary. |
Methods:
to_tcl
abstractmethod
Render a material definition without executing it.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Concrete solver definition using the assigned material tag. |
Note
Subclasses implement this contract. Register the material before rendering; concrete implementations commonly require a tag.
updateMaterialStage
Optionally render a stage transition for a constitutive model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
str
|
Stage selector interpreted by the concrete material. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Empty string in this base implementation. Stage-capable |
str
|
subclasses override this hook; arbitrary materials are not converted. |
set_parameter
set_parameter(parameter_name: str, new_value: Union[float, int, str, None] = None, element_tags: Optional[List[int]] = None) -> str
Optionally render a material-specific parameter update.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter_name
|
str
|
Solver parameter name. |
required |
new_value
|
float | int | str | None
|
Optional new value. |
None
|
element_tags
|
list[int] | None
|
Element targets for the command. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Empty string in this base implementation. Concrete overrides |
str
|
determine supported parameters and command syntax. |
get_param
Read a value from the concrete material's parameter dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
Exact parameter key; no alias normalization is applied. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Stored value, without copying it. |
Raises:
| Type | Description |
|---|---|
KeyError
|
The key is absent from |