conspire/constitutive/thermal/conduction/fourier/
mod.rs1#[cfg(test)]
2mod test;
3
4use crate::{
5 constitutive::{
6 ConstitutiveError,
7 thermal::{Thermal, conduction::ThermalConduction},
8 },
9 math::IDENTITY_00,
10 mechanics::{HeatFlux, HeatFluxTangent, Scalar, TemperatureGradient},
11};
12
13#[derive(Clone, Debug)]
24pub struct Fourier {
25 pub thermal_conductivity: Scalar,
27}
28
29impl Fourier {
30 fn thermal_conductivity(&self) -> Scalar {
31 self.thermal_conductivity
32 }
33}
34
35impl Thermal for Fourier {}
36
37impl ThermalConduction for Fourier {
38 fn potential(
44 &self,
45 temperature_gradient: &TemperatureGradient,
46 ) -> Result<Scalar, ConstitutiveError> {
47 Ok(0.5 * self.thermal_conductivity() * (temperature_gradient * temperature_gradient))
48 }
49 fn heat_flux(
55 &self,
56 temperature_gradient: &TemperatureGradient,
57 ) -> Result<HeatFlux, ConstitutiveError> {
58 Ok(temperature_gradient * -self.thermal_conductivity())
59 }
60 fn heat_flux_tangent(
66 &self,
67 _temperature_gradient: &TemperatureGradient,
68 ) -> Result<HeatFluxTangent, ConstitutiveError> {
69 Ok(IDENTITY_00 * -self.thermal_conductivity())
70 }
71}