#[non_exhaustive]pub struct Air {}Implementations§
Source§impl Air
impl Air
Sourcepub fn get_density(
te_air: Option<Temperature>,
h: Option<Length>,
) -> MassDensity
pub fn get_density( te_air: Option<Temperature>, h: Option<Length>, ) -> MassDensity
Returns density of air with computational optimizations for default inputs
Source: https://www.grc.nasa.gov/WWW/K-12/rocket/atmosmet.html
Note that if None is passed for either argument, function evaluation should be faster
§Equations used
- T = 15.04 - 0.00649 * h
- p = 101.29 * ((T + 273.1) / 288.08) ^ 5.256
§Arguments
te_air- ambient temperature of air, defaults to 22 Ch- elevation above sea level, defaults to 180 m
Sourcepub fn get_therm_cond(te_air: Temperature) -> Result<ThermalConductivity>
pub fn get_therm_cond(te_air: Temperature) -> Result<ThermalConductivity>
Sourcepub fn get_specific_heat_cp(te_air: Temperature) -> Result<SpecificHeatCapacity>
pub fn get_specific_heat_cp(te_air: Temperature) -> Result<SpecificHeatCapacity>
Sourcepub fn get_specific_enthalpy(te_air: Temperature) -> Result<SpecificEnergy>
pub fn get_specific_enthalpy(te_air: Temperature) -> Result<SpecificEnergy>
Sourcepub fn get_specific_energy(te_air: Temperature) -> Result<SpecificEnergy>
pub fn get_specific_energy(te_air: Temperature) -> Result<SpecificEnergy>
Sourcepub fn get_pr(te_air: Temperature) -> Result<Ratio>
pub fn get_pr(te_air: Temperature) -> Result<Ratio>
Sourcepub fn get_dyn_visc(te_air: Temperature) -> Result<DynamicViscosity>
pub fn get_dyn_visc(te_air: Temperature) -> Result<DynamicViscosity>
Sourcepub fn get_te_from_h(h: SpecificEnergy) -> Result<Temperature>
pub fn get_te_from_h(h: SpecificEnergy) -> Result<Temperature>
Sourcepub fn get_te_from_u(u: SpecificEnergy) -> Result<Temperature>
pub fn get_te_from_u(u: SpecificEnergy) -> Result<Temperature>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Air
impl<'de> Deserialize<'de> for Air
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 SerdeAPI for Air
impl SerdeAPI for Air
const ACCEPTED_BYTE_FORMATS: &'static [&'static str] = _
const ACCEPTED_STR_FORMATS: &'static [&'static str] = _
const RESOURCES_DIR: &'static Dir<'_> = _
const RESOURCES_SUBDIR: &'static str = ""
Source§fn from_resource<P: AsRef<Path>>(
filepath: P,
skip_init: bool,
) -> Result<Self, Error>
fn from_resource<P: AsRef<Path>>( filepath: P, skip_init: bool, ) -> Result<Self, Error>
Read (deserialize) an object from a resource file packaged with the
fastsim-core crate Read moreSource§fn list_resources() -> Result<Vec<PathBuf>, Error>
fn list_resources() -> Result<Vec<PathBuf>, Error>
List the available resources in the resources directory Read more
Source§fn to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<(), Error>
fn to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<(), Error>
Write (serialize) an object to a file.
Supported file extensions are listed in
ACCEPTED_BYTE_FORMATS.
Creates a new file if it does not already exist, otherwise truncates the existing file. Read moreSource§fn from_file<P: AsRef<Path>>(
filepath: P,
skip_init: bool,
) -> Result<Self, Error>
fn from_file<P: AsRef<Path>>( filepath: P, skip_init: bool, ) -> Result<Self, Error>
Read (deserialize) an object from a file.
Supported file extensions are listed in
ACCEPTED_BYTE_FORMATS. Read moreSource§fn to_writer<W: Write>(&self, wtr: W, format: &str) -> Result<(), Error>
fn to_writer<W: Write>(&self, wtr: W, format: &str) -> Result<(), Error>
Write (serialize) an object into anything that implements
std::io::Write Read moreSource§fn from_reader<R: Read>(
rdr: &mut R,
format: &str,
skip_init: bool,
) -> Result<Self, Error>
fn from_reader<R: Read>( rdr: &mut R, format: &str, skip_init: bool, ) -> Result<Self, Error>
Deserialize an object from anything that implements
std::io::Read Read moreSource§fn to_str(&self, format: &str) -> Result<String>
fn to_str(&self, format: &str) -> Result<String>
Write (serialize) an object into a string Read more
Source§fn from_str<S: AsRef<str>>(
contents: S,
format: &str,
skip_init: bool,
) -> Result<Self>
fn from_str<S: AsRef<str>>( contents: S, format: &str, skip_init: bool, ) -> Result<Self>
Read (deserialize) an object from a string Read more
Source§fn from_json<S: AsRef<str>>(json_str: S, skip_init: bool) -> Result<Self>
fn from_json<S: AsRef<str>>(json_str: S, skip_init: bool) -> Result<Self>
Read (deserialize) an object from a JSON string Read more
Source§fn from_msg_pack(msg_pack: &[u8], skip_init: bool) -> Result<Self>
fn from_msg_pack(msg_pack: &[u8], skip_init: bool) -> Result<Self>
Read (deserialize) an object from a message pack Read more
impl StructuralPartialEq for Air
Auto Trait Implementations§
impl Freeze for Air
impl RefUnwindSafe for Air
impl Send for Air
impl Sync for Air
impl Unpin for Air
impl UnwindSafe for Air
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more