fastsim_core::thermal

Struct ThermalState

Source
pub struct ThermalState {
Show 32 fields pub fc_te_deg_c: f64, pub fc_eta_temp_coeff: f64, pub fc_qdot_per_net_heat: f64, pub fc_qdot_kw: f64, pub fc_qdot_to_amb_kw: f64, pub fc_qdot_to_htr_kw: f64, pub fc_htc_to_amb: f64, pub fc_lambda: f64, pub fc_te_adiabatic_deg_c: f64, pub cab_te_deg_c: f64, pub cab_prev_te_deg_c: f64, pub cab_qdot_solar_kw: f64, pub cab_qdot_to_amb_kw: f64, pub cab_qdot_from_hvac_kw: f64, pub cab_hvac_pwr_aux_kw: f64, pub exh_mdot: f64, pub exh_hdot_kw: f64, pub exhport_exh_te_in_deg_c: f64, pub exhport_qdot_to_amb: f64, pub exhport_te_deg_c: f64, pub exhport_qdot_from_exh: f64, pub exhport_qdot_net: f64, pub cat_qdot: f64, pub cat_htc_to_amb: f64, pub cat_qdot_to_amb: f64, pub cat_te_deg_c: f64, pub cat_exh_te_in_deg_c: f64, pub cat_re_ext: f64, pub cat_qdot_from_exh: f64, pub cat_qdot_net: f64, pub amb_te_deg_c: f64, pub orphaned: bool,
}
Expand description

Struct containing thermal state variables for all thermal components

Fields§

§fc_te_deg_c: f64

fuel converter (engine) temperature [°C]

§fc_eta_temp_coeff: f64

fuel converter temperature efficiency correction

§fc_qdot_per_net_heat: f64

fuel converter heat generation per total heat release minus shaft power

§fc_qdot_kw: f64

fuel converter heat generation [kW]

§fc_qdot_to_amb_kw: f64

fuel converter convection to ambient [kW]

§fc_qdot_to_htr_kw: f64

fuel converter heat loss to heater core [kW]

§fc_htc_to_amb: f64

heat transfer coeff [W / (m ** 2 * K)] to amb after arbitration

§fc_lambda: f64

lambda (air/fuel ratio normalized w.r.t. stoich air/fuel ratio) – 1 is reasonable default

§fc_te_adiabatic_deg_c: f64

lambda-dependent adiabatic flame temperature

§cab_te_deg_c: f64

cabin temperature [°C]

§cab_prev_te_deg_c: f64

previous cabin temperature [°C]

§cab_qdot_solar_kw: f64

cabin solar load [kw]

§cab_qdot_to_amb_kw: f64

cabin convection to ambient [kw]

§cab_qdot_from_hvac_kw: f64

heat transfer to cabin from hvac system

§cab_hvac_pwr_aux_kw: f64

aux load from hvac

§exh_mdot: f64

exhaust mass flow rate [kg/s]

§exh_hdot_kw: f64

exhaust enthalpy flow rate [kw]

§exhport_exh_te_in_deg_c: f64

exhaust port (exhport) variables exhaust temperature at exhaust port inlet

§exhport_qdot_to_amb: f64

heat transfer from exhport to amb [kw]

§exhport_te_deg_c: f64

catalyst temperature [°C]

§exhport_qdot_from_exh: f64

convection from exhaust to exhport [W] positive means exhport is receiving heat

§exhport_qdot_net: f64

net heat generation in cat [W]

§cat_qdot: f64

catalyst heat generation [W]

§cat_htc_to_amb: f64

catalytic converter convection coefficient to ambient [W / (m ** 2 * K)]

§cat_qdot_to_amb: f64

heat transfer from catalyst to ambient [W]

§cat_te_deg_c: f64

catalyst temperature [°C]

§cat_exh_te_in_deg_c: f64

exhaust temperature at cat inlet

§cat_re_ext: f64

catalyst external reynolds number

§cat_qdot_from_exh: f64

convection from exhaust to cat [W] positive means cat is receiving heat

§cat_qdot_net: f64

net heat generation in cat [W]

§amb_te_deg_c: f64

ambient temperature

§orphaned: bool

Implementations§

Source§

impl ThermalState

Source

pub fn new( amb_te_deg_c: Option<f64>, fc_te_deg_c_init: Option<f64>, cab_te_deg_c_init: Option<f64>, exhport_te_deg_c_init: Option<f64>, cat_te_deg_c_init: Option<f64>, ) -> Self

Trait Implementations§

Source§

impl Clone for ThermalState

Source§

fn clone(&self) -> ThermalState

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ThermalState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ThermalState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ThermalState

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for ThermalState

Source§

fn eq(&self, other: &ThermalState) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SerdeAPI for ThermalState

Source§

const ACCEPTED_BYTE_FORMATS: &'static [&'static str] = _

Source§

const ACCEPTED_STR_FORMATS: &'static [&'static str] = _

Source§

const RESOURCE_PREFIX: &'static str = ""

Source§

const CACHE_FOLDER: &'static str = ""

Source§

fn init(&mut self) -> Result<()>

Specialized code to execute upon initialization
Source§

fn list_resources() -> Vec<String>

List available (compiled) resources (stored in the rust binary) Read more
Source§

fn from_resource<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>

Read (deserialize) an object from a resource file packaged with the fastsim-core crate Read more
Source§

fn to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<()>

Write (serialize) an object to a file. Supported file extensions are listed in ACCEPTED_BYTE_FORMATS. Creates a new file if it does not already exist, otherwise truncates the existing file. Read more
Source§

fn to_writer<W: Write>(&self, wtr: W, format: &str) -> Result<()>

Source§

fn from_file<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>

Read (deserialize) an object from a file. Supported file extensions are listed in ACCEPTED_BYTE_FORMATS. Read more
Source§

fn to_str(&self, format: &str) -> Result<String>

Write (serialize) an object into a string Read more
Source§

fn from_str<S: AsRef<str>>( contents: S, format: &str, skip_init: bool, ) -> Result<Self>

Read (deserialize) an object from a string Read more
Source§

fn from_reader<R: Read>(rdr: R, format: &str, skip_init: bool) -> Result<Self>

Deserialize an object from anything that implements std::io::Read Read more
Source§

fn to_json(&self) -> Result<String>

Write (serialize) an object to a JSON string
Source§

fn from_json<S: AsRef<str>>(json_str: S, skip_init: bool) -> Result<Self>

Read (deserialize) an object to a JSON string Read more
Source§

fn to_yaml(&self) -> Result<String>

Write (serialize) an object to a YAML string
Source§

fn from_yaml<S: AsRef<str>>(yaml_str: S, skip_init: bool) -> Result<Self>

Read (deserialize) an object from a YAML string Read more
Source§

fn to_toml(&self) -> Result<String>

Source§

fn from_toml<S: AsRef<str>>(toml_str: S, skip_init: bool) -> Result<Self>

Source§

fn from_url<S: AsRef<str>>(url: S, skip_init: bool) -> Result<Self>

Instantiates an object from a url. Accepts yaml and json file types Read more
Source§

fn to_cache<P: AsRef<Path>>(&self, file_path: P) -> Result<()>

Takes an instantiated Rust object and saves it in the FASTSim data directory in a rust_objects folder.
WARNING: If there is a file already in the data subdirectory with the same name, it will be replaced by the new file. Read more
Source§

fn from_cache<P: AsRef<Path>>(file_path: P, skip_init: bool) -> Result<Self>

Instantiates a Rust object from the subdirectory within the FASTSim data directory corresponding to the Rust Object (“vehices” for a RustVehice, “cycles” for a RustCycle, and the root folder of the data directory for all other objects). Read more
Source§

impl Serialize for ThermalState

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ThermalState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DeserializeOwnedAlias for T

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> SendAlias for T

Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,

Source§

impl<T> SerializeAlias for T
where T: Serialize,

Source§

impl<T> SyncAlias for T