conspire/constitutive/thermal/conduction/fourier/
mod.rs1#[cfg(test)]
2mod test;
3
4use super::{
5 Constitutive, HeatFlux, Parameters, Scalar, TemperatureGradient, Thermal, ThermalConduction,
6};
7
8#[derive(Debug)]
19pub struct Fourier<P> {
20 parameters: P,
21}
22
23impl<P> Fourier<P>
24where
25 P: Parameters,
26{
27 fn thermal_conductivity(&self) -> &Scalar {
28 self.parameters.get(0)
29 }
30}
31
32impl<P> Constitutive<P> for Fourier<P>
33where
34 P: Parameters,
35{
36 fn new(parameters: P) -> Self {
37 Self { parameters }
38 }
39}
40impl<P> Thermal for Fourier<P> where P: Parameters {}
41
42impl<P> ThermalConduction for Fourier<P>
43where
44 P: Parameters,
45{
46 fn heat_flux(&self, temperature_gradient: &TemperatureGradient) -> HeatFlux {
52 temperature_gradient * -self.thermal_conductivity()
53 }
54}