[][src]Struct lmb_engine_simulator::core::system_builder::SystemBuilder

pub struct SystemBuilder { /* fields omitted */ }

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]

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]

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]

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]

Connect a connector object to an element object. The inputs must be the name of the connector and element as &str

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.