#[non_exhaustive]pub struct BodyGeometry {
pub length_m: f64,
pub fore_area_m2: f64,
pub aft_area_m2: f64,
pub volume_m3: f64,
pub planform_area_m2: f64,
pub planform_centroid_m: f64,
pub aft_angle_rad: f64,
}Expand description
The aerodynamic geometry of one body component, in its own frame (fore end at 0, stations positive aft).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.length_m: f64Length, m.
fore_area_m2: f64Cross-section area at the fore end, m².
aft_area_m2: f64Cross-section area at the aft end, m².
volume_m3: f64Volume enclosed by the outer surface, m³.
planform_area_m2: f64Side-view (planform) area, m².
planform_centroid_m: f64Centroid of the planform area, m aft of the fore end.
aft_angle_rad: f64Angle of the outer surface to the axis at the aft end, atan(dr/dx), rad: positive where
the radius grows aft, and ±π/2 where the profile ends in a blunt tip (the aft end of a
narrowing elliptical or Haack transition).
Implementations§
Source§impl BodyGeometry
impl BodyGeometry
Sourcepub fn cylinder(length_m: f64, radius_m: f64) -> Result<Self, AeroError>
pub fn cylinder(length_m: f64, radius_m: f64) -> Result<Self, AeroError>
A cylinder of radius_m and length_m.
§Errors
AeroError::Domain for a non-positive or non-finite dimension.
Sourcepub fn from_profile(profile: &Profile) -> Result<Self, AeroError>
pub fn from_profile(profile: &Profile) -> Result<Self, AeroError>
A nose cone’s or transition’s geometry from its outer profile, filled
(hpr_design::revolve).
§Errors
Numerical errors from the volume integral, and AeroError::Domain if the result is out
of range.
Sourcepub fn validate(&self) -> Result<(), AeroError>
pub fn validate(&self) -> Result<(), AeroError>
Checks that every field is finite and in range.
§Errors
AeroError::Domain for a non-finite or negative value, or a length, volume or planform
area that isn’t positive.
Sourcepub fn normal_force_slope(&self, reference_area_m2: f64) -> f64
pub fn normal_force_slope(&self, reference_area_m2: f64) -> f64
Normal-force slope at α → 0, per radian: (C_Nα)_B = (2/A_ref)[A(l) − A(0)]
(Barrowman 1967 eq. 3-65; Niskanen 2009 eq. 3.19). Negative for a boattail.
Sourcepub fn moment_slope_m(&self, reference_area_m2: f64) -> f64
pub fn moment_slope_m(&self, reference_area_m2: f64) -> f64
Moment slope about the fore end at α → 0, m per radian:
(C_Nα)_B X_B = (2/A_ref)[l A(l) − V] (Niskanen 2009 eq. 3.25 times the reference length).
Sourcepub fn center_of_pressure_m(&self) -> Option<f64>
pub fn center_of_pressure_m(&self) -> Option<f64>
Center of pressure of the potential-flow term, m aft of the fore end:
X_B = [l A(l) − V] / [A(l) − A(0)] (Barrowman 1966 eq. 28; Niskanen 2009 eq. 3.28).
None when the two end areas are equal, where the body has no potential-flow normal force.
Sourcepub fn lift_coefficient(
&self,
reference_area_m2: f64,
alpha_rad: f64,
factor: f64,
) -> f64
pub fn lift_coefficient( &self, reference_area_m2: f64, alpha_rad: f64, factor: f64, ) -> f64
The body-lift normal-force coefficient at alpha_rad with factor factor:
C_N = factor · (A_plan/A_ref) sin² α (Niskanen 2009 eq. 3.26), acting at
BodyGeometry::planform_centroid_m (eq. 3.27). The factor is
crate::crossflow::BodyLift::factor’s: Jorgensen’s η C_dn, or Galejs’s
BODY_LIFT_K.
Trait Implementations§
Source§impl Clone for BodyGeometry
impl Clone for BodyGeometry
Source§fn clone(&self) -> BodyGeometry
fn clone(&self) -> BodyGeometry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BodyGeometry
Source§impl Debug for BodyGeometry
impl Debug for BodyGeometry
Source§impl<'de> Deserialize<'de> for BodyGeometry
impl<'de> Deserialize<'de> for BodyGeometry
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>,
Source§impl PartialEq for BodyGeometry
impl PartialEq for BodyGeometry
Source§fn eq(&self, other: &BodyGeometry) -> bool
fn eq(&self, other: &BodyGeometry) -> bool
self and other values to be equal, and is used by ==.