#[cfg(test)]
mod test;
use crate::{
constitutive::{
ConstitutiveError,
thermal::{Thermal, conduction::ThermalConduction},
},
math::IDENTITY_00,
mechanics::{HeatFlux, HeatFluxTangent, Scalar, TemperatureGradient},
};
#[derive(Clone, Debug)]
pub struct Fourier {
pub thermal_conductivity: Scalar,
}
impl Fourier {
fn thermal_conductivity(&self) -> Scalar {
self.thermal_conductivity
}
}
impl Thermal for Fourier {}
impl ThermalConduction for Fourier {
fn potential(
&self,
temperature_gradient: &TemperatureGradient,
) -> Result<Scalar, ConstitutiveError> {
Ok(0.5 * self.thermal_conductivity() * (temperature_gradient * temperature_gradient))
}
fn heat_flux(
&self,
temperature_gradient: &TemperatureGradient,
) -> Result<HeatFlux, ConstitutiveError> {
Ok(temperature_gradient * -self.thermal_conductivity())
}
fn heat_flux_tangent(
&self,
_temperature_gradient: &TemperatureGradient,
) -> Result<HeatFluxTangent, ConstitutiveError> {
Ok(IDENTITY_00 * -self.thermal_conductivity())
}
}