use crate::system::defs::base::*;
use crate::system::defs::mechanics::*;
use crate::{quantity, unit};
use typenum::*;
quantity!(HeatCapacity: M P1, L P2, T N2, I Z0, Th N1, N Z0, J Z0); quantity!(Entropy: M P1, L P2, T N2, I Z0, Th N1, N Z0, J Z0);
unit!(compound: JoulePerKelvin, "J/K", [(Joule, P1), (Kelvin, N1)]);
quantity!(SpecificHeat: M Z0, L P2, T N2, I Z0, Th N1, N Z0, J Z0);
unit!(compound: JoulePerKilogramKelvin, "J/(kg·K)", [(Joule, P1), (Kilogram, N1), (Kelvin, N1)]);
unit!(compound: KilojoulePerKilogramKelvin, "kJ/(kg·K)", [(Kilojoule, P1), (Kilogram, N1), (Kelvin, N1)]);
quantity!(ThermalConductivity: M P1, L P1, T N3, I Z0, Th N1, N Z0, J Z0);
unit!(compound: WattPerMetreKelvin, "W/(m·K)", [(Watt, P1), (Metre, N1), (Kelvin, N1)]);
unit!(compound: MilliwattPerMetreKelvin, "mW/(m·K)", [(Milliwatt, P1), (Metre, N1), (Kelvin, N1)]);
quantity!(ThermalResistance: M N1, L N2, T P3, I Z0, Th P1, N Z0, J Z0);
unit!(compound: KelvinPerWatt, "K/W", [(Kelvin, P1), (Watt, N1)]);
quantity!(ThermalResistivity: M N1, L N1, T P3, I Z0, Th P1, N Z0, J Z0);
unit!(compound: MetreKelvinPerWatt, "m·K/W", [(Metre, P1), (Kelvin, P1), (Watt, N1)]);
quantity!(ThermalDiffusivity: M Z0, L P2, T N1, I Z0, Th Z0, N Z0, J Z0);
quantity!(HeatTransferCoefficient: M P1, L Z0, T N3, I Z0, Th N1, N Z0, J Z0);
unit!(compound: WattPerSquareMetreKelvin, "W/(m²·K)", [(Watt, P1), (Metre, N2), (Kelvin, N1)]);
quantity!(ThermalExpansionCoefficient: M Z0, L Z0, T Z0, I Z0, Th N1, N Z0, J Z0);
unit!(compound: PerKelvin, "K⁻¹", [(Kelvin, N1)]);
#[cfg(test)]
mod tests {
use super::*;
use crate::common::verify_unit;
verify_unit!(JoulePerKelvin, HeatCapacity, 1.0);
verify_unit!(JoulePerKelvin, Entropy, 1.0);
verify_unit!(JoulePerKilogramKelvin, SpecificHeat, 1.0);
verify_unit!(KilojoulePerKilogramKelvin, SpecificHeat, 1e3);
verify_unit!(WattPerMetreKelvin, ThermalConductivity, 1.0);
verify_unit!(MilliwattPerMetreKelvin, ThermalConductivity, 1e-3);
verify_unit!(KelvinPerWatt, ThermalResistance, 1.0);
verify_unit!(MetreKelvinPerWatt, ThermalResistivity, 1.0);
verify_unit!(WattPerSquareMetreKelvin, HeatTransferCoefficient, 1.0);
verify_unit!(PerKelvin, ThermalExpansionCoefficient, 1.0);
}