use twine_core::TimeIntegrable;
use uom::si::f64::{Pressure, SpecificHeatCapacity, ThermodynamicTemperature, Time};
use crate::{model::ideal_gas::IdealGasFluid, units::SpecificGasConstant};
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub struct IdealGasCustom {
pub name: Option<String>,
pub specific_gas_constant: SpecificGasConstant,
pub cp: SpecificHeatCapacity,
pub reference_temperature: ThermodynamicTemperature,
pub reference_pressure: Pressure,
}
impl IdealGasFluid for IdealGasCustom {
fn gas_constant(&self) -> SpecificGasConstant {
self.specific_gas_constant
}
fn cp(&self) -> SpecificHeatCapacity {
self.cp
}
fn reference_temperature(&self) -> ThermodynamicTemperature {
self.reference_temperature
}
fn reference_pressure(&self) -> Pressure {
self.reference_pressure
}
}
impl TimeIntegrable for IdealGasCustom {
type Derivative = ();
fn step(self, _derivative: Self::Derivative, _dt: Time) -> Self {
self
}
}