pub struct System3TMWithBC {
pub solver_type: SolverTypes,
pub m1: ThermalReservoir,
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: ThermalReservoir§m2: ThermalMass§h12: Conductanceh12 connects m1 to m2
m3: ThermalMass§h23: Conductance§t_report: Vec<f64>§state: SystemState§history: SystemStateHistoryVecImplementations§
Source§impl System3TMWithBC
impl System3TMWithBC
Sourcepub fn solve_step(&mut self)
pub fn solve_step(&mut self)
Runs solver_type specific step method that calls
[Self::step] in solver-specific manner
Trait Implementations§
Source§impl BareClone for System3TMWithBC
impl BareClone for System3TMWithBC
Source§fn bare_clone(&self) -> Self
fn bare_clone(&self) -> Self
Returns a copy
Source§impl Clone for System3TMWithBC
impl Clone for System3TMWithBC
Source§fn clone(&self) -> System3TMWithBC
fn clone(&self) -> System3TMWithBC
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 System3TMWithBC
impl Debug for System3TMWithBC
Source§impl Default for System3TMWithBC
impl Default for System3TMWithBC
Source§impl<'de> Deserialize<'de> for System3TMWithBC
impl<'de> Deserialize<'de> for System3TMWithBC
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 System3TMWithBC
impl HasStates for System3TMWithBC
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 PartialEq for System3TMWithBC
impl PartialEq for System3TMWithBC
Source§impl PartialOrd for System3TMWithBC
impl PartialOrd for System3TMWithBC
Source§impl Serialize for System3TMWithBC
impl Serialize for System3TMWithBC
Source§impl SolverBase for System3TMWithBC
impl SolverBase for System3TMWithBC
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 System3TMWithBC
impl SolverVariantMethods for System3TMWithBC
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 System3TMWithBC
Auto Trait Implementations§
impl Freeze for System3TMWithBC
impl RefUnwindSafe for System3TMWithBC
impl Send for System3TMWithBC
impl Sync for System3TMWithBC
impl Unpin for System3TMWithBC
impl UnwindSafe for System3TMWithBC
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