Skip to content

NDMaterialManager

NDMaterialManager

NDMaterialManager(manager: 'MaterialManager')

Create multidimensional materials through model.material.nd.

Factories construct a concrete material and register it with the parent MaterialManager, assigning its tag and enforcing a unique user name. Use a consistent stress/density unit system; no unit conversion is applied. Component pages describe constitutive parameters and assumptions.

Example
from femora import Model

model = Model()
soil = model.material.nd.elastic_isotropic(
    user_name="soil", E=108000.0, nu=1.0 / 3.0, rho=1.8,
)
assert model.material.get_by_name("soil") is soil
Note

name is an explicit compatibility alias for user_name. A supplied non-None name takes precedence; prefer one spelling per call. Distinct materials should have distinct names, including when using defaults. Registration and constructor validation can raise errors.

Methods:

Name Description
elastic_isotropic

Create an elastic isotropic material with validated parameters.

j2_cyclic_bounding_surface

Create a J2 cyclic bounding surface material with validated parameters.

drucker_prager

Create a Drucker-Prager material object with validated inputs.

pressure_depend_multi_yield

Construct the material from keyword arguments matching OpenSees naming.

linear_elastic_ggmax

Create a LinearElasticGGmax material with backbone validation rules.

pressure_independ_multi_yield

Validate soil keyword arguments before storing them for Tcl export.

Methods:

elastic_isotropic

elastic_isotropic(user_name: str = 'Unnamed', E: float = 1.0, nu: float = 0.3, rho: float = 0.0, *, name: str | None = None) -> ElasticIsotropicMaterial

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

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

1.0
nu float

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

0.3
rho float

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

0.0

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.

Returns:

Name Type Description
material ElasticIsotropicMaterial

Registered material with a model-local tag.

Note

The keyword-only name alias overrides user_name when non-None. Unknown keywords are rejected; component validation remains authoritative.

j2_cyclic_bounding_surface

j2_cyclic_bounding_surface(user_name: str = 'Unnamed', *, G: float | None = None, K: float | None = None, Su: float | None = None, Den: float | None = None, h: float | None = None, m: float | None = None, h0: float | None = None, chi: float | None = None, beta: float = 0.5, name: str | None = None) -> J2CyclicBoundingSurfaceMaterial

Create a J2 cyclic bounding surface material with validated parameters.

Parameters:

Name Type Description Default
user_name str

Instance label appended to Tcl and stored by the owning manager.

'Unnamed'
G float | None

Shear modulus, strictly positive.

None
K float | None

Bulk modulus, strictly positive.

None
Su float | None

Undrained shear strength, strictly positive.

None
Den float | None

Mass density for inertia or body-force coupling, >= 0.

None
h float | None

Hardening parameter controlling plastic modulus evolution.

None
m float | None

Hardening exponent shaping the nonlinear hardening curve.

None
h0 float | None

Initial or reference hardening level.

None
chi float | None

Viscous damping coefficient used by the OpenSees model.

None
beta float

Implicit-explicit blending weight on [0, 1].

0.5

Raises:

Type Description
ValueError

If any mandatory parameter is missing.

ValueError

If a numeric parameter cannot be converted to float.

ValueError

If G, K, or Su is not positive, if Den is negative, or if beta falls outside [0, 1].

Returns:

Name Type Description
material J2CyclicBoundingSurfaceMaterial

Registered material with a model-local tag.

Note

The keyword-only name alias overrides user_name when non-None. Unknown keywords are rejected; component validation remains authoritative.

drucker_prager

drucker_prager(user_name: str = 'Unnamed', *, k: float | None = None, G: float | None = None, sigmaY: float | None = None, rho: float | None = None, rhoBar: float | None = None, Kinf: float | None = None, Ko: float | None = None, delta1: float | None = None, delta2: float | None = None, H: float | None = None, theta: float | None = None, density: float | None = None, atmPressure: float | None = None, name: str | None = None) -> DruckerPragerMaterial

Create a Drucker-Prager material object with validated inputs.

Parameters:

Name Type Description Default
user_name str

Stored in Tcl suffix comments and enforced unique among managed materials.

'Unnamed'
k float | None

Bulk modulus analogue in the Tcl command, strictly greater than zero.

None
G float | None

Shear modulus analogue in the Tcl command, strictly greater than zero.

None
sigmaY float | None

Initial yield intercept, strictly positive.

None
rho float | None

Cohesion-like Drucker-Prager strength parameter, strictly positive.

None
rhoBar float | None

Optional cap on dilatancy evolution. Defaults to rho and must satisfy 0 <= rhoBar <= rho.

None
Kinf float | None

Optional long-run isotropic strengthening magnitude, >= 0.

None
Ko float | None

Additional isotropic evolution parameter, >= 0.

None
delta1 float | None

Isotropic modulus expansion coefficient, >= 0.

None
delta2 float | None

Softening or decay coefficient, >= 0.

None
H float | None

Combined hardening modulus, >= 0.

None
theta float | None

Blend in [0, 1] between isotropic and kinematic mechanisms.

None
density float | None

Optional mass density, >= 0.

None
atmPressure float | None

Reference pressure for modulus updates, >= 0.

None

Raises:

Type Description
ValueError

If a required parameter is missing.

ValueError

If a numeric value cannot be converted to float.

ValueError

If any validated value falls outside the supported interval.

Returns:

Name Type Description
material DruckerPragerMaterial

Registered material with a model-local tag.

Note

The keyword-only name alias overrides user_name when non-None. Unknown keywords are rejected; component validation remains authoritative.

pressure_depend_multi_yield

pressure_depend_multi_yield(user_name: str = 'Unnamed', *, nd: int, rho: float, refShearModul: float, refBulkModul: float, frictionAng: float, peakShearStra: float, refPress: float, pressDependCoe: float, PTAng: float, contrac: float, dilat1: float, dilat2: float, liquefac1: float, liquefac2: float, liquefac3: float, e: float = 0.6, cs1: float = 0.9, cs2: float = 0.02, cs3: float = 0.7, pa: float = 101.0, c: float = 0.3, noYieldSurf: int = 20, pairs: list[float] | list[tuple[float, float]] | None = None, name: str | None = None) -> PressureDependMultiYieldMaterial

Construct the material from keyword arguments matching OpenSees naming.

Parameters:

Name Type Description Default
user_name str

Label placed in the trailing Tcl comment once managed.

'Unnamed'
nd int

Spatial dimension flag, either 2 or 3.

required
rho float

Saturated mass density, strictly positive in model units.

required
refShearModul float

Reference low-strain shear modulus at refPress.

required
refBulkModul float

Reference bulk modulus at refPress.

required
frictionAng float

Peak friction angle in degrees.

required
peakShearStra float

Octahedral shear strain at peak strength, strictly positive.

required
refPress float

Reference mean effective stress, strictly positive.

required
pressDependCoe float

Non-negative confinement dependence coefficient.

required
PTAng float

Phase-transformation angle in degrees.

required
contrac float

Contractive plasticity parameter.

required
dilat1 float

First dilatancy parameter.

required
dilat2 float

Second dilatancy parameter.

required
liquefac1 float

Liquefaction parameter 1.

required
liquefac2 float

Liquefaction parameter 2.

required
liquefac3 float

Liquefaction parameter 3.

required
noYieldSurf int

Surface count or negative custom-backbone selector.

20
pairs list[float] | list[tuple[float, float]] | None

Custom backbone data required when noYieldSurf < 0.

None
e float

Optional void ratio, default 0.6.

0.6
cs1 float

Optional critical-state coefficient, default 0.9.

0.9
cs2 float

Optional critical-state coefficient, default 0.02.

0.02
cs3 float

Optional critical-state coefficient, default 0.7.

0.7
pa float

Optional atmospheric or reference pressure, default 101.0.

101.0
c float

Optional cohesion-like intercept, default 0.3.

0.3

Raises:

Type Description
ValueError

If a supplied parameter fails component validation.

ValueError

If a numeric Tcl argument cannot be converted correctly.

ValueError

If any validated value falls outside the supported range.

Returns:

Name Type Description
material PressureDependMultiYieldMaterial

Registered material with a model-local tag.

Note

name overrides user_name when non-None. Missing required keywords and unknown keywords raise TypeError at this factory boundary.

linear_elastic_ggmax

linear_elastic_ggmax(user_name: str = 'Unnamed', *, G: float | None = None, K_or_nu: float | None = None, rho: float = 0.0, curveType: int = 1, pairs: Sequence[tuple[float, float]] | Sequence[float] | None = None, param1: float | None = None, param2: float | None = None, param3: float | None = None, name: str | None = None) -> LinearElasticGGmaxMaterial

Create a LinearElasticGGmax material with backbone validation rules.

Parameters:

Name Type Description Default
user_name str

Unique label referenced in Tcl export comments under the owning material manager.

'Unnamed'
G float | None

Small-strain shear modulus G_max, strictly greater than zero.

None
K_or_nu float | None

Interpreted by OpenSees as Poisson's ratio in the special range, otherwise as bulk modulus.

None
rho float

Saturated density for mass coupling, required to be non-negative.

0.0
curveType int

Integer backbone selector {0, 1, 2, 3}.

1
pairs Sequence[tuple[float, float]] | Sequence[float] | None

User-defined backbone data for curveType == 0, either as a sequence of (gamma, G/Gmax) tuples or a flattened sequence [gamma1, GG1, gamma2, GG2, ...].

None
param1 float | None

Curve-specific scalar used by built-in backbone types.

None
param2 float | None

Darendeli-specific parameter used when curveType == 3.

None
param3 float | None

Darendeli-specific parameter used when curveType == 3.

None

Raises:

Type Description
ValueError

If G or K_or_nu is missing.

ValueError

If rho is negative or curveType is unsupported.

ValueError

If user-defined backbone data are malformed.

Returns:

Name Type Description
material LinearElasticGGmaxMaterial

Registered material with a model-local tag.

Note

The keyword-only name alias overrides user_name when non-None. Unknown keywords are rejected; component validation remains authoritative.

pressure_independ_multi_yield

pressure_independ_multi_yield(user_name: str = 'Unnamed', *, nd: int, rho: float, refShearModul: float, refBulkModul: float, cohesi: float, peakShearStra: float, frictionAng: float = 0.0, refPress: float = 100.0, pressDependCoe: float = 0.0, noYieldSurf: int = 20, pairs: list[float] | list[tuple[float, float]] | None = None, name: str | None = None) -> PressureIndependMultiYieldMaterial

Validate soil keyword arguments before storing them for Tcl export.

Parameters:

Name Type Description Default
user_name str

Comment annotation and manager registry key.

'Unnamed'
nd int

2 or 3 dimensional analysis flag.

required
rho float

Saturated density, strictly positive.

required
refShearModul float

Reference small-strain shear modulus, strictly positive.

required
refBulkModul float

Reference bulk modulus, strictly positive.

required
cohesi float

Apparent cohesion intercept, non-negative.

required
peakShearStra float

Octahedral shear strain marker for peak strength.

required
frictionAng float

Friction angle in degrees. Defaults to 0 when omitted.

0.0
refPress float

Positive reference mean stress. Defaults to 100.

100.0
pressDependCoe float

Non-negative confinement scaling coefficient.

0.0
noYieldSurf int

Surface count or negative backbone selector.

20
pairs list[float] | list[tuple[float, float]] | None

Mandatory custom backbone list when noYieldSurf < 0.

None

Raises:

Type Description
ValueError

If a supplied parameter fails component validation.

ValueError

If a numeric value cannot be converted correctly.

ValueError

If any validated value falls outside the supported range.

ValueError

If pairs is malformed or invalid when required.

Returns:

Name Type Description
material PressureIndependMultiYieldMaterial

Registered material with a model-local tag.

Note

name overrides user_name when non-None. Missing required keywords and unknown keywords raise TypeError at this factory boundary.