Skip to content

elastic_isotropic

elastic_isotropic

Isotropic linear elastic continuum material for OpenSees nD elements.

Attributes

__all__ module-attribute

__all__ = ['ElasticIsotropicMaterial']

Classes

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.

Methods:
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.

ElasticIsotropicMaterial

ElasticIsotropicMaterial(user_name: str = 'Unnamed', *, E: float | None = None, nu: float | None = None, rho: float = 0.0, **_: Any)

Bases: Material

Homogeneous isotropic elastic material for continuum nD analysis.

This class represents the OpenSees ElasticIsotropic nD material model. The constitutive response is defined by Young's modulus and Poisson's ratio, with optional density for analyses that require material mass.

Tcl form

nDMaterial ElasticIsotropic <tag> <E> <nu> <rho>; # user_name

Note
  • Coordinate E, nu, and rho with the unit system used by the mesh and exported Tcl model.
  • rho defaults to 0.0 for stiffness-only definitions.

Attributes:

Name Type Description
tag Optional[int]

Manager-assigned identifier after registration with the owning material manager.

params Dict[str, float]

Validated parameter values keyed by E, nu, and rho.

Example
from femora.core.model import Model

model = Model()
mat = model.material.nd.elastic_isotropic(
    user_name="sand",
    E=3.0e7,
    nu=0.3,
    rho=2000.0,
)
print(mat.tag)

Create an elastic isotropic material with validated parameters.

Parameters:

Name Type Description Default
user_name str

Label included in the emitted Tcl comment and stored by the owning material manager.

'Unnamed'
E float | None

Young's modulus. Must be a positive numeric value.

None
nu float | None

Poisson's ratio. Must be numeric and in the range [0, 0.5).

None
rho float

Mass density. Must be a non-negative numeric value.

0.0
**_ Any

Additional keyword arguments accepted and ignored for forward-compatible factory calls.

{}

Raises:

Type Description
ValueError

If E or nu is missing, if any numeric parameter cannot be converted to float, if E is not positive, if nu is outside [0, 0.5), or if rho is negative.

Methods:
to_tcl
to_tcl() -> str

Render the OpenSees nDMaterial ElasticIsotropic command.

Returns:

Name Type Description
str str

Tcl command defining this material with its assigned tag and validated parameters, ending with ; # user_name.

Raises:

Type Description
ValueError

If this instance has no manager-assigned tag yet.