conspire/constitutive/solid/
mod.rs

1//! Solid constitutive models.
2
3pub mod elastic;
4pub mod elastic_hyperviscous;
5pub mod hyperelastic;
6pub mod hyperviscoelastic;
7pub mod thermoelastic;
8pub mod thermohyperelastic;
9pub mod viscoelastic;
10
11const TWO_THIRDS: Scalar = 2.0 / 3.0;
12const FIVE_THIRDS: Scalar = 5.0 / 3.0;
13
14use crate::{
15    constitutive::{Constitutive, ConstitutiveError},
16    math::{
17        ContractFirstSecondIndicesWithSecondIndicesOf, ContractSecondIndexWithFirstIndexOf,
18        IDENTITY, IDENTITY_00, Rank2, Tensor, TensorArray, ZERO_10,
19    },
20    mechanics::{
21        CauchyRateTangentStiffness, CauchyStress, CauchyTangentStiffness, Deformation,
22        DeformationGradient, DeformationGradientRate, DeformationGradientRates,
23        DeformationGradients, FirstPiolaKirchhoffRateTangentStiffness, FirstPiolaKirchhoffStress,
24        FirstPiolaKirchhoffTangentStiffness, Scalar, SecondPiolaKirchhoffRateTangentStiffness,
25        SecondPiolaKirchhoffStress, SecondPiolaKirchhoffTangentStiffness, Times,
26    },
27};
28use std::fmt::Debug;
29
30impl<C> Constitutive for C where C: Solid {}
31
32/// Required methods for solid constitutive models.
33pub trait Solid
34where
35    Self: Debug,
36{
37    /// Returns the bulk modulus.
38    fn bulk_modulus(&self) -> &Scalar;
39    /// Returns the shear modulus.
40    fn shear_modulus(&self) -> &Scalar;
41}