[−][src]Struct lmb_engine_simulator::core::system_builder::SystemBuilder
Implementations
impl SystemBuilder
[src]
pub fn new() -> SystemBuilder
[src]
Creates a SystemBuilder
. This object is used to construct the desired system to simulate.
The construction is made by the object methods exclusively.
Once the building is finished, the system can be built using build_system()
method.
pub fn build_system(self) -> System
[src]
Build a System
. SystemBuilder
objects is consumed in the process.
pub fn add_engine<'a>(&'a mut self, file_name: &str, gas: &Gas) -> &'a mut Self
[src]
Add a Engine
and its components from a .json
file and Gas
object. The mandatory components are cylinders
and valves
.
The variable gas
is clone into the zero_dim::Cylinder
objects.
pub fn add_environment<'a>(
&'a mut self,
elem_name: &str,
gas: &Gas
) -> &'a mut Self
[src]
&'a mut self,
elem_name: &str,
gas: &Gas
) -> &'a mut Self
Add a zero_dim::Enrivonment
. It has constant temperature and pressure and infinite mass
pub fn add_reservoir<'a>(
&'a mut self,
elem_name: &str,
volume: f64,
gas: &Gas
) -> &'a mut Self
[src]
&'a mut self,
elem_name: &str,
volume: f64,
gas: &Gas
) -> &'a mut Self
Add a zero_dim::Reservoir
. It corresponds to a plenum or a constant volume chamber. The input volume
must be in cubic centimeters [cm³].
pub fn add_orifice<'a>(
&'a mut self,
elem_name: &str,
diam: f64,
discharge_coeff: f64,
conn: Vec<&str>
) -> &'a mut Self
[src]
&'a mut self,
elem_name: &str,
diam: f64,
discharge_coeff: f64,
conn: Vec<&str>
) -> &'a mut Self
Add a connector::Orifice
connector. It connects two ZeroDim
through a hole of diameter diam
in mm.
The discharge coefficient must be between 0 and 1.
pub fn connect_from_to<'a>(
&'a mut self,
connector: &str,
elem_name: &str
) -> &'a mut Self
[src]
&'a mut self,
connector: &str,
elem_name: &str
) -> &'a mut Self
Connect a connector
object to an element object. The inputs must be the name of the connector and element as &str
Auto Trait Implementations
impl !RefUnwindSafe for SystemBuilder
[src]
impl !Send for SystemBuilder
[src]
impl !Sync for SystemBuilder
[src]
impl Unpin for SystemBuilder
[src]
impl !UnwindSafe for SystemBuilder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,