conspire/constitutive/thermal/conduction/fourier/
mod.rs

1#[cfg(test)]
2mod test;
3
4use super::{HeatFlux, Scalar, TemperatureGradient, Thermal, ThermalConduction};
5
6/// The Fourier thermal conduction constitutive model.
7///
8/// **Parameters**
9/// - The thermal conductivity $`k`$.
10///
11/// **External variables**
12/// - The temperature gradient $`\nabla T`$.
13///
14/// **Internal variables**
15/// - None.
16#[derive(Debug)]
17pub struct Fourier {
18    /// The thermal conductivity $`k`$.
19    pub thermal_conductivity: Scalar,
20}
21
22impl Fourier {
23    fn thermal_conductivity(&self) -> &Scalar {
24        &self.thermal_conductivity
25    }
26}
27
28impl Thermal for Fourier {}
29
30impl ThermalConduction for Fourier {
31    /// Calculates and returns the heat flux.
32    ///
33    /// ```math
34    /// \mathbf{q}(\nabla T) = -k\nabla T
35    /// ```
36    fn heat_flux(&self, temperature_gradient: &TemperatureGradient) -> HeatFlux {
37        temperature_gradient * -self.thermal_conductivity()
38    }
39}