conspire/constitutive/thermal/conduction/fourier/
mod.rs#[cfg(test)]
mod test;
use super::{
Constitutive, HeatFlux, Parameters, Scalar, TemperatureGradient, Thermal, ThermalConduction,
};
#[derive(Debug)]
pub struct Fourier<'a> {
parameters: Parameters<'a>,
}
impl Fourier<'_> {
fn thermal_conductivity(&self) -> &Scalar {
&self.parameters[0]
}
}
impl<'a> Constitutive<'a> for Fourier<'a> {
fn new(parameters: Parameters<'a>) -> Self {
Self { parameters }
}
}
impl<'a> Thermal<'a> for Fourier<'a> {}
impl<'a> ThermalConduction<'a> for Fourier<'a> {
fn heat_flux(&self, temperature_gradient: &TemperatureGradient) -> HeatFlux {
temperature_gradient * -self.thermal_conductivity()
}
}