Struct palarust::units::Converter
[−]
[src]
pub struct Converter { /* fields omitted */ }
Units converter between physical and lattice units. It takes the characteristic length and velocity in physical and lattice units. Also takes the non dimensional Reynolds number Re=u L / nu.
Methods
impl Converter
[src]
fn new(u_phys: f64, l_phys: f64, u_lb: f64, l_lb: usize, re: f64) -> Self
fn get_u_lb<'a>(&'a self) -> &'a f64
Returns the characteristic velocity in lattice units
fn get_l_lb<'a>(&'a self) -> &'a usize
Returns the characteristic length in lattice units
fn get_dx(&self) -> f64
Returns the dx=l_phys/l_lb of the simulation
fn get_dt(&self) -> f64
Returns the dt=u_lb / u_phys * dx of the simulation
fn get_nu_phys(&self) -> f64
Returns the kinematic viscosity in physical units
fn get_nu_lb(&self) -> f64
Returns the kinematic viscosity in lattice units
fn get_rel_freq(&self) -> f64
Returns the relaxation frequency in lattice units
fn get_iter(&self, t_phys: f64) -> usize
Returns an interation from a time in physical units
fn get_n(&self, l: f64) -> usize
Returns a length in lattice units
fn get_size(&self, lx: f64, ly: f64) -> (usize, usize)
Returns a tuple of lengths in lattice units