conspire/constitutive/hybrid/hyperelastic_viscoplastic/additive/hyperelastic/
mod.rs1#[cfg(test)]
2mod test;
3
4use crate::{
5 constitutive::{
6 ConstitutiveError,
7 hybrid::ElasticViscoplasticAdditiveElastic,
8 solid::{hyperelastic::Hyperelastic, hyperelastic_viscoplastic::HyperelasticViscoplastic},
9 },
10 math::{Differentiable, Quantity, Tensor},
11 mechanics::{DeformationGradient, DeformationGradientPlastic},
12 units::EnergyDensity,
13};
14
15impl<C1, C2, Y1> HyperelasticViscoplastic<Y1> for ElasticViscoplasticAdditiveElastic<C1, C2, Y1>
16where
17 C1: HyperelasticViscoplastic<Y1>,
18 C2: Hyperelastic,
19 Y1: Differentiable + Tensor,
20{
21 fn helmholtz_free_energy_density(
27 &self,
28 deformation_gradient: &DeformationGradient,
29 deformation_gradient_p: &DeformationGradientPlastic,
30 ) -> Result<Quantity<EnergyDensity>, ConstitutiveError> {
31 Ok(self
32 .0
33 .helmholtz_free_energy_density(deformation_gradient, deformation_gradient_p)?
34 + self.1.helmholtz_free_energy_density(deformation_gradient)?)
35 }
36}