conspire/constitutive/fluid/plastic/
mod.rs1use crate::units::Stress;
4use crate::{constitutive::ConstitutiveError, math::Quantity};
5use std::fmt::Debug;
6
7pub trait Plastic
9where
10 Self: Clone + Debug,
11{
12 fn initial_yield_stress(&self) -> Quantity<Stress>;
14 fn hardening_slope(&self) -> Quantity<Stress>;
16 fn yield_stress(
22 &self,
23 equivalent_plastic_strain: Quantity,
24 ) -> Result<Quantity<Stress>, ConstitutiveError> {
25 Ok(self.initial_yield_stress() + self.hardening_slope() * equivalent_plastic_strain)
26 }
27}