#[non_exhaustive]pub struct Flow {
pub mach: f64,
pub alpha_rad: f64,
pub roll_rad: f64,
}Expand description
The air-relative flow at one instant.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mach: f64Mach number: in [0, 5) for the normal force and the drag buildup.
alpha_rad: f64Total angle of attack between the body axis +z_B and the air-relative velocity, rad, in
[0, π]. The models are small-angle models (see docs/physics/aero.md).
roll_rad: f64Roll angle of the lateral airflow, rad from x_B toward y_B: the direction in which the
air crosses the body. Only fin sets of one or two fins depend on it.
Implementations§
Source§impl Flow
impl Flow
Sourcepub fn new(mach: f64, alpha_rad: f64, roll_rad: f64) -> Self
pub fn new(mach: f64, alpha_rad: f64, roll_rad: f64) -> Self
A flow at mach, angle of attack alpha_rad and lateral-flow roll roll_rad. Checked
when used (Flow::validate).
Sourcepub fn validate(&self) -> Result<(), AeroError>
pub fn validate(&self) -> Result<(), AeroError>
Checks the Mach number against the normal force’s range, and the angles.
§Errors
AeroError::Mach outside [0, 5) (NORMAL_FORCE_MACH_LIMIT), and
AeroError::Domain for an angle of attack outside [0, π] or a non-finite roll.
Trait Implementations§
impl Copy for Flow
Source§impl<'de> Deserialize<'de> for Flow
impl<'de> Deserialize<'de> for Flow
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
impl StructuralPartialEq for Flow
Auto Trait Implementations§
impl Freeze for Flow
impl RefUnwindSafe for Flow
impl Send for Flow
impl Sync for Flow
impl Unpin for Flow
impl UnsafeUnpin for Flow
impl UnwindSafe for Flow
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