Skip to main content

conspire/constitutive/fluid/hyperviscous/
mod.rs

1//! Hyperviscous fluid constitutive models.
2
3#[cfg(feature = "autodiff")]
4pub mod autodiff;
5
6mod newtonian;
7mod saint_venant_kirchhoff;
8
9pub use self::{newtonian::Newtonian, saint_venant_kirchhoff::SaintVenantKirchhoff};
10
11use crate::{
12    constitutive::{ConstitutiveError, fluid::viscous::Viscous},
13    math::{Quantity, Scalar},
14    mechanics::{DeformationGradient, DeformationGradientRate},
15    units::Dissipation,
16};
17
18const TWO_THIRDS: Scalar = 2.0 / 3.0;
19
20/// Required methods for hyperviscous fluid constitutive models.
21pub trait Hyperviscous
22where
23    Self: Viscous,
24{
25    /// Calculates and returns the viscous dissipation.
26    ///
27    /// ```math
28    /// \psi = \psi(\mathbf{F},\dot{\mathbf{F}})
29    /// ```
30    fn viscous_dissipation(
31        &self,
32        deformation_gradient: &DeformationGradient,
33        deformation_gradient_rate: &DeformationGradientRate,
34    ) -> Result<Quantity<Dissipation>, ConstitutiveError>;
35}