Skip to content

drucker_prager

drucker_prager

Drucker-Prager plasticity model for OpenSees nD materials.

Attributes

__all__ module-attribute

__all__ = ['DruckerPragerMaterial']

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.

DruckerPragerMaterial

DruckerPragerMaterial(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, **_: Any)

Bases: Material

Pressure-sensitive elastoplastic solid with combined isotropic and kinematic hardening.

Maps to OpenSees DruckerPrager as an nDMaterial. The required arguments k, G, sigmaY, and rho correspond to the Tcl command slots for bulk modulus, shear modulus, initial yield intercept, and the material cohesion-like strength parameter rho. In this model, rho is not mass density; use density for mass density effects.

Tcl form

nDMaterial DruckerPrager <tag> k G sigmaY rho rhoBar Kinf Ko delta1 delta2 H theta density atmPressure; #

Note
  • rhoBar is constrained to [0, rho] by the current validation rules.
  • Coordinate atmPressure and density units with the bulk and shear modulus units used in the exported model.

Attributes:

Name Type Description
params

All validated Tcl arguments keyed by parameter name.

Example
from femora.core.model import Model

model = Model()
mat = model.material.nd.drucker_prager(
    user_name="dp_solid",
    k=2.0e5,
    G=9.6e4,
    sigmaY=2.5e3,
    rho=1.85,
    density=2100.0,
)
print(mat.tag)

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
**_ Any

Unused keyword placeholders for forward compatibility.

{}

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.

Methods:
to_tcl
to_tcl() -> str

Serialize this component as an OpenSees Tcl command.

Returns:

Name Type Description
str str

A single Tcl command string for this material, listing ``k G

str

sigmaY rhoplus the optional hardening tail ending indensity``

str

and atmPressure.

Raises:

Type Description
ValueError

If the material lacks a manager-assigned tag.