Skip to content

pressure_independ_multi_yield

pressure_independ_multi_yield

Pressure-independent multi-yield soil plasticity (OpenSees PressureIndependMultiYield).

Attributes

__all__ module-attribute

__all__ = ['PressureIndependMultiYieldMaterial']

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.

PressureIndependMultiYieldMaterial

PressureIndependMultiYieldMaterial(user_name: str = 'Unnamed', **kwargs: Any)

Bases: Material

Nested-surface plasticity for soils without confining-stress-driven hardening.

Use this nDMaterial when layer strength is specified through reference moduli, cohesion, friction, and optionally a tabular backbone instead of the pressure-dependent coupling used by PressureDependMultiYieldMaterial.

Tcl form

nDMaterial PressureIndependMultiYield <tag> nd rho Gr Br cohesi peakShearStra frictionAng refPress pressDependCoe noYieldSurf [gamma Gs ...]; #

Note
  • Positive noYieldSurf allocates that many auto-generated surfaces.
  • Negative noYieldSurf requires pairs with abs(noYieldSurf) backbone points.
  • frictionAng defaults to 0, refPress defaults to 100, and pressDependCoe defaults to 0.

Attributes:

Name Type Description
params

Final soil parameters plus optional backbone list.

Example
from femora.core.model import Model

model = Model()
mat = model.material.nd.pressure_independ_multi_yield(
    user_name="pi_soil",
    nd=3,
    rho=2.0,
    refShearModul=1.1e5,
    refBulkModul=3.0e5,
    cohesi=5.0,
    peakShearStra=0.12,
    noYieldSurf=15,
)
print(mat.tag)

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

2 or 3 dimensional analysis flag.

required
rho

Saturated density, strictly positive.

required
refShearModul

Reference small-strain shear modulus, strictly positive.

required
refBulkModul

Reference bulk modulus, strictly positive.

required
cohesi

Apparent cohesion intercept, non-negative.

required
peakShearStra

Octahedral shear strain marker for peak strength.

required
frictionAng

Friction angle in degrees. Defaults to 0 when omitted.

required
refPress

Positive reference mean stress. Defaults to 100.

required
pressDependCoe

Non-negative confinement scaling coefficient.

required
noYieldSurf

Surface count or negative backbone selector.

required
pairs

Mandatory custom backbone list when noYieldSurf < 0.

required

Raises:

Type Description
ValueError

If a required keyword argument is missing.

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.

Methods:
to_tcl
to_tcl() -> str

Emit the Tcl declaration with optional backbone tail expansion.

Returns:

Name Type Description
str str

Tcl line including moduli, cohesion, friction defaults,

str

noYieldSurf, and interleaved backbone pairs when applicable.

Raises:

Type Description
ValueError

If the material was not registered with a manager.

updateMaterialStage
updateMaterialStage(state: str) -> str

Construct Tcl for elastic/plastic modulus staging plus inline comment tag.

Parameters:

Name Type Description Default
state str

"elastic" maps to stage 0 and "plastic" maps to stage 1. Other tokens return blank output.

required

Returns:

Name Type Description
str str

Tcl with ;# user_name suffix when a stage matched.

Raises:

Type Description
ValueError

When no tag has been assigned yet.

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

Build Tcl that updates material parameters element-by-element.

Parameters:

Name Type Description Default
parameter_name str

One of shearModulus, bulkModulus, cohesion, frictionAngle, or stressCorrection.

required
new_value Optional[float]

Scalar passed to -val for non-stress-correction modes. Ignored for stressCorrection.

None
element_tags Optional[List[int]]

OpenSees element IDs to touch.

None

Returns:

Name Type Description
str str

Multi-line Tcl script suitable for appending to staged analyses.

Raises:

Type Description
ValueError

If parameter_name is unsupported.

ValueError

If the material lacks a manager-assigned tag.