conspire/constitutive/fluid/plastic/
mod.rs1use crate::{
4 constitutive::ConstitutiveError,
5 math::{Scalar, TensorTuple, TensorTupleVec},
6 mechanics::DeformationGradientPlastic,
7};
8use std::fmt::Debug;
9
10pub type StateVariables = TensorTuple<DeformationGradientPlastic, Scalar>;
12
13pub type StateVariablesHistory = TensorTupleVec<DeformationGradientPlastic, Scalar>;
15
16pub trait Plastic
18where
19 Self: Clone + Debug,
20{
21 fn initial_yield_stress(&self) -> Scalar;
23 fn hardening_slope(&self) -> Scalar;
25 fn yield_stress(&self, equivalent_plastic_strain: Scalar) -> Result<Scalar, ConstitutiveError> {
31 Ok(self.initial_yield_stress() + self.hardening_slope() * equivalent_plastic_strain)
35 }
36}