conspire/constitutive/hybrid/hyperelastic/multiplicative/viscoplastic/
mod.rs1#[cfg(test)]
2mod test;
3
4use crate::{
5 constitutive::{
6 ConstitutiveError,
7 fluid::viscoplastic::Viscoplastic,
8 hybrid::ElasticMultiplicativeViscoplastic,
9 solid::{hyperelastic::Hyperelastic, hyperelastic_viscoplastic::HyperelasticViscoplastic},
10 },
11 math::Tensor,
12 mechanics::{DeformationGradient, DeformationGradientPlastic, Scalar},
13};
14
15impl<C1, C2, Y2> HyperelasticViscoplastic<Y2> for ElasticMultiplicativeViscoplastic<C1, C2, Y2>
16where
17 C1: Hyperelastic,
18 C2: Viscoplastic<Y2>,
19 Y2: Tensor,
20{
21 fn helmholtz_free_energy_density(
22 &self,
23 deformation_gradient: &DeformationGradient,
24 deformation_gradient_p: &DeformationGradientPlastic,
25 ) -> Result<Scalar, ConstitutiveError> {
26 let deformation_gradient_e = deformation_gradient * deformation_gradient_p.inverse();
27 self.0
28 .helmholtz_free_energy_density(&deformation_gradient_e.into())
29 }
30}