feat(materials): Declare PerfectPlasticity as StatefulStrainDependent

- Add material_behavior(::PerfectPlasticity) = StatefulStrainDependent()
- Enables generic integration with state variable handling
- Requires displacement field and state for tangent computation
- Single line trait declaration, zero code duplication
This commit is contained in:
Jukka Aho
2025-11-19 10:03:45 +02:00
parent 589c80dce5
commit 7e1739a987
+3
View File
@@ -211,6 +211,9 @@ steel_perfect = PerfectPlasticity(E=200e9, ν=0.3, σ_y=250e6, H=0.0)
PerfectPlasticity(; E::Real, ν::Real, σ_y::Real, H::Real) =
PerfectPlasticity(Float64(E), Float64(ν), Float64(σ_y), Float64(H))
# Trait declaration: PerfectPlasticity has strain-dependent tangent and state
material_behavior(::PerfectPlasticity) = StatefulStrainDependent()
"""
compute_stress(material::PerfectPlasticity,
ε::SymmetricTensor{2,3},