pub struct ThermalReservoir {
pub state: ThermalMassState,
pub history: ThermalMassStateHistoryVec,
}
Expand description
ThermalReservoir component with capacitance, state, and history
Fields§
§state: ThermalMassState
§history: ThermalMassStateHistoryVec
Implementations§
Source§impl ThermalReservoir
impl ThermalReservoir
Sourcepub fn save_state(&mut self)
pub fn save_state(&mut self)
Saves self.state
to self.history
and propagtes to save_state
in
Trait Implementations§
Source§impl BareClone for ThermalReservoir
impl BareClone for ThermalReservoir
Source§fn bare_clone(&self) -> Self
fn bare_clone(&self) -> Self
Returns a copy
Source§impl Clone for ThermalReservoir
impl Clone for ThermalReservoir
Source§fn clone(&self) -> ThermalReservoir
fn clone(&self) -> ThermalReservoir
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ThermalReservoir
impl Debug for ThermalReservoir
Source§impl Default for ThermalReservoir
impl Default for ThermalReservoir
Source§fn default() -> ThermalReservoir
fn default() -> ThermalReservoir
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ThermalReservoir
impl<'de> Deserialize<'de> for ThermalReservoir
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 HasState for ThermalReservoir
impl HasState for ThermalReservoir
Source§fn set_state(&mut self, val: f64)
fn set_state(&mut self, val: f64)
sets value
val
of potential variable (e.g. temperature, pressure, voltage)Source§fn state(&self) -> f64
fn state(&self) -> f64
returns value of potential variable (e.g. temperature, pressure, voltage)
Source§fn step_deriv(&mut self, val: f64)
fn step_deriv(&mut self, val: f64)
incremenents value of time derivative of pontental variable
Source§fn step_state_by_dt(&mut self, dt: &f64)
fn step_state_by_dt(&mut self, dt: &f64)
increments value of potential variable by multiplying
dt * self.derive()
and adding to previous valueSource§fn step_state(&mut self, val: f64)
fn step_state(&mut self, val: f64)
increments value of states by
val
VecSource§impl PartialEq for ThermalReservoir
impl PartialEq for ThermalReservoir
Source§impl PartialOrd for ThermalReservoir
impl PartialOrd for ThermalReservoir
Source§impl Serialize for ThermalReservoir
impl Serialize for ThermalReservoir
impl StructuralPartialEq for ThermalReservoir
Auto Trait Implementations§
impl Freeze for ThermalReservoir
impl RefUnwindSafe for ThermalReservoir
impl Send for ThermalReservoir
impl Sync for ThermalReservoir
impl Unpin for ThermalReservoir
impl UnwindSafe for ThermalReservoir
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SerdeAPI for Twhere
T: Serialize + for<'a> Deserialize<'a>,
impl<T> SerdeAPI for Twhere
T: Serialize + for<'a> Deserialize<'a>,
Source§fn to_file(&self, filename: &str) -> Result<(), Error>
fn to_file(&self, filename: &str) -> Result<(), Error>
Save current data structure to file. Method adaptively calls serialization methods
dependent on the suffix of the file given as str. Read more
Source§fn from_file(filename: &str) -> Result<Self, Error>where
Self: Sized + for<'de> Deserialize<'de>,
fn from_file(filename: &str) -> Result<Self, Error>where
Self: Sized + for<'de> Deserialize<'de>,
Read from file and return instantiated struct. Method adaptively calls deserialization
methods dependent on the suffix of the file name given as str.
Function returns a dynamic Error Result if it fails. Read more