pub struct System3TM {
pub solver_type: SolverTypes,
pub m1: ThermalMass,
pub m2: ThermalMass,
pub h12: Conductance,
pub m3: ThermalMass,
pub h23: Conductance,
pub t_report: Vec<f64>,
pub state: SystemState,
pub history: SystemStateHistoryVec,
}Expand description
System of connected components
Fields§
§solver_type: SolverTypes§m1: ThermalMass§m2: ThermalMass§h12: Conductanceh12 connects m1 to m2
m3: ThermalMass§h23: Conductance§t_report: Vec<f64>§state: SystemState§history: SystemStateHistoryVecImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for System3TM
impl<'de> Deserialize<'de> for System3TM
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 HasStates for System3TM
impl HasStates for System3TM
Source§fn set_states(&mut self, val: Vec<f64>)
fn set_states(&mut self, val: Vec<f64>)
sets values of states
Source§fn step_states_by_dt(&mut self, dt: &f64)
fn step_states_by_dt(&mut self, dt: &f64)
assuming set_derivs has been called, steps
value of states by deriv * dt
Source§fn step_states(&mut self, val: Vec<f64>)
fn step_states(&mut self, val: Vec<f64>)
assuming set_derivs has been called, steps
value of states by deriv * dt
Source§fn set_derivs(&mut self, val: &[f64])
fn set_derivs(&mut self, val: &[f64])
sets values of derivatives of states
Source§fn step_derivs(&mut self, val: Vec<f64>)
fn step_derivs(&mut self, val: Vec<f64>)
steps derivs by val
Source§impl PartialOrd for System3TM
impl PartialOrd for System3TM
Source§impl SolverBase for System3TM
impl SolverBase for System3TM
Source§fn reset_derivs(&mut self)
fn reset_derivs(&mut self)
reset all time derivatives to zero for start of solve_step
Source§fn update_derivs(&mut self)
fn update_derivs(&mut self)
Updates time derivatives of states.
This method must be user defined in solver macro args.
Source§fn sc(&self) -> Option<&AdaptiveSolverConfig>
fn sc(&self) -> Option<&AdaptiveSolverConfig>
Returns
solver_conf, if applicableSource§fn sc_mut(&mut self) -> Option<&mut AdaptiveSolverConfig>
fn sc_mut(&mut self) -> Option<&mut AdaptiveSolverConfig>
Returns mut
solver_conf, if applicableSource§fn state(&self) -> &SystemState
fn state(&self) -> &SystemState
Returns Self::state
Source§impl SolverVariantMethods for System3TM
impl SolverVariantMethods for System3TM
Source§fn heun(&mut self, dt: &f64)
fn heun(&mut self, dt: &f64)
Heun’s Method (starts out with Euler’s method but adds an extra step)
See Heun’s Method (the first listed Heun’s method, not the one also known as Ralston’s Method):
https://en.wikipedia.org/wiki/Heun%27s_method
Source§fn midpoint(&mut self, dt: &f64)
fn midpoint(&mut self, dt: &f64)
Midpoint Method
See: https://en.wikipedia.org/wiki/Midpoint_method
Source§fn ralston(&mut self, dt: &f64)
fn ralston(&mut self, dt: &f64)
Ralston’s Method
See Ralston’s Method: https://en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods#Ralston.27s_method
Source§fn rk23_bogacki_shampine(&mut self, dt_max: &f64) -> f64
fn rk23_bogacki_shampine(&mut self, dt_max: &f64) -> f64
solves time step with adaptive Bogacki Shampine Method (variant of RK23) and returns ‘dt’ used
see: https://en.wikipedia.org/wiki/Bogacki%E2%80%93Shampine_method
fn rk23_bogacki_shampine_step(&mut self, dt: f64) -> (Vec<f64>, Vec<f64>)
Source§fn rk4fixed(&mut self, dt: &f64)
fn rk4fixed(&mut self, dt: &f64)
solves time step with 4th order Runge-Kutta method.
See RK4 method: https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Examples
Source§fn rk45_cash_karp(&mut self, dt_max: &f64) -> f64
fn rk45_cash_karp(&mut self, dt_max: &f64) -> f64
solves time step with adaptive Cash-Karp Method (variant of RK45) and returns
dt used
https://en.wikipedia.org/wiki/Cash%E2%80%93Karp_methodfn rk45_cash_karp_step(&mut self, dt: f64) -> (Vec<f64>, Vec<f64>)
impl StructuralPartialEq for System3TM
Auto Trait Implementations§
impl Freeze for System3TM
impl RefUnwindSafe for System3TM
impl Send for System3TM
impl Sync for System3TM
impl Unpin for System3TM
impl UnwindSafe for System3TM
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