pub struct MacroState {
pub density: f64,
pub momentum: [f64; 3],
pub energy: f64,
}Expand description
Macroscopic state at a single spatial cell: density, momentum, energy.
Fields§
§density: f64Mass density ρ = ∫ f dv³
momentum: [f64; 3]Momentum density J = ρu = ∫ v f dv³ (3 components)
energy: f64Energy density e = ½ ∫ |v|² f dv³
Implementations§
Source§impl MacroState
impl MacroState
Sourcepub fn thermal_energy(&self) -> f64
pub fn thermal_energy(&self) -> f64
Thermal energy density: e_th = e - ½ρ|u|².
Sourcepub fn temperature(&self) -> f64
pub fn temperature(&self) -> f64
Temperature T = P/ρ = (2/3) * e_th/ρ.
Trait Implementations§
Source§impl Clone for MacroState
impl Clone for MacroState
Source§fn clone(&self) -> MacroState
fn clone(&self) -> MacroState
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 moreAuto Trait Implementations§
impl Freeze for MacroState
impl RefUnwindSafe for MacroState
impl Send for MacroState
impl Sync for MacroState
impl Unpin for MacroState
impl UnsafeUnpin for MacroState
impl UnwindSafe for MacroState
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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