pub struct ThermalMass {
pub c: f64,
pub state: ThermalMassState,
pub history: ThermalMassStateHistoryVec,
}
Expand description
ThermalMass component with capacitance, state, and history
Fields§
§c: f64
thermal capacitance [J/K]
state: ThermalMassState
§history: ThermalMassStateHistoryVec
Implementations§
Source§impl ThermalMass
impl ThermalMass
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 ThermalMass
impl BareClone for ThermalMass
Source§fn bare_clone(&self) -> Self
fn bare_clone(&self) -> Self
Returns a copy
Source§impl Clone for ThermalMass
impl Clone for ThermalMass
Source§fn clone(&self) -> ThermalMass
fn clone(&self) -> ThermalMass
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 ThermalMass
impl Debug for ThermalMass
Source§impl Default for ThermalMass
impl Default for ThermalMass
Source§fn default() -> ThermalMass
fn default() -> ThermalMass
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ThermalMass
impl<'de> Deserialize<'de> for ThermalMass
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 ThermalMass
impl HasState for ThermalMass
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 ThermalMass
impl PartialEq for ThermalMass
Source§impl PartialOrd for ThermalMass
impl PartialOrd for ThermalMass
Source§impl Serialize for ThermalMass
impl Serialize for ThermalMass
impl StructuralPartialEq for ThermalMass
Auto Trait Implementations§
impl Freeze for ThermalMass
impl RefUnwindSafe for ThermalMass
impl Send for ThermalMass
impl Sync for ThermalMass
impl Unpin for ThermalMass
impl UnwindSafe for ThermalMass
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