#[non_exhaustive]pub enum DeviceDrag {
DragArea {
cd_s_m2: f64,
},
Streamer {
length_m: f64,
width_m: f64,
surface_density_kg_m2: f64,
model: StreamerModel,
},
Tumble {
drag_area_m2: f64,
body_profile_m2: f64,
fin_area_m2: f64,
},
Canopy {
nominal_diameter_m: f64,
drag_coefficient: f64,
kind: Option<CanopyType>,
},
}Expand description
What gives a device its drag area C_D S.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DragArea
A drag area given directly, m² (RocketPy’s cd_s).
Streamer
A streamer: a strip of fabric length_m by width_m, whose drag area comes from
model (StreamerModel).
Fields
surface_density_kg_m2: f64The fabric’s surface density, kg/m² (StreamerModel::OpenRocket uses it).
model: StreamerModelWhich correlation gives its drag area.
Tumble
A body descending broadside, tumbling, with no device open: the drag area of its body tubes
and fins. Build it with DeviceDrag::tumbling, which computes it from the airframe.
Fields
Canopy
A canopy of nominal diameter D₀ with C_D0 on the nominal area S₀ = π D₀²/4
(Knacke’s convention, printed page 5-2).
Implementations§
Source§impl DeviceDrag
impl DeviceDrag
Sourcepub fn tumbling(assembly: &Assembly) -> Result<DeviceDrag, SimError>
pub fn tumbling(assembly: &Assembly) -> Result<DeviceDrag, SimError>
The drag area of assembly tumbling: C_D,f A_f + C_D,bt A_bt (the OpenRocket technical
documentation v13.05, §3.5, eq. 3.98 and 3.99, printed pages 53 to 55).
A_btis the body’s side profile area, the integral of its outer diameter along the axis,∫ d dx, taken over each body component’s own profile (a curved nose’s or transition’s by quadrature,hpr_design::revolve). Shoulders are inside the airframe and add nothing.A_fis, for each fin set, one fin’s planform area times the efficiency factor for its fin count (TUMBLE_FIN_EFFICIENCY). Launch lugs and rail buttons add nothing, and an airframe with tube fins is refused: they are a large part of its broadside area and the model has no factor for them.- A pod’s body components and fins count as the airframe’s do, once per pod: the documentation’s model has no term for them, and none for one part shading another.
It sums every stage, so it is the whole stack tumbling. For a spent booster on its
own, which is what the documentation’s model was written for, use
Self::tumbling_stages with that body’s stages.
The constants were fitted to 22 m drop tests of five models 44 to 103 mm across and 6.8 to
160 g, descending at 5.0 to 6.6 m/s, and predict those terminal velocities within 3 to 14%.
Bodies much larger or faster than that are outside the fit: above a Reynolds number of
about 3e5 a cylinder’s crossflow drag falls by roughly half (docs/physics/recovery.md).
§Errors
SimError::Design if a fin planform’s area or a nose cone’s or transition’s profile can’t
be computed, and SimError::Domain if the airframe presents no area at all, carries tube
fins, or has a fin set of more than the eight fins Table 3.4 covers.
Sourcepub fn tumbling_stages(
assembly: &Assembly,
_: (usize, usize),
) -> Result<DeviceDrag, SimError>
pub fn tumbling_stages( assembly: &Assembly, _: (usize, usize), ) -> Result<DeviceDrag, SimError>
The drag area of the stages first..=last of assembly tumbling on their own, which is
what a separated body does (Separation). Self::tumbling is this over every stage.
It covers whole stages only: for an ejected piece that is part of a stage
(crate::Ejection) use crate::Simulation::tumbling_piece, which sums the piece’s
own components.
§Errors
As Self::tumbling.
Sourcepub const fn streamer(
length_m: f64,
width_m: f64,
surface_density_kg_m2: f64,
) -> DeviceDrag
pub const fn streamer( length_m: f64, width_m: f64, surface_density_kg_m2: f64, ) -> DeviceDrag
A streamer length_m by width_m of a fabric of surface_density_kg_m2, by the default
model (StreamerModel::Filippone).
Sourcepub const fn canopy(kind: CanopyType, nominal_diameter_m: f64) -> DeviceDrag
pub const fn canopy(kind: CanopyType, nominal_diameter_m: f64) -> DeviceDrag
A canopy of nominal_diameter_m with its type’s default C_D0
(CanopyType::drag_coefficient).
Sourcepub fn drag_area_m2(&self) -> f64
pub fn drag_area_m2(&self) -> f64
The fully open drag area C_D S, m².
Sourcepub const fn nominal_diameter_m(&self) -> Option<f64>
pub const fn nominal_diameter_m(&self) -> Option<f64>
The nominal diameter D₀, m, where the device has one.
Sourcepub const fn canopy_type(&self) -> Option<CanopyType>
pub const fn canopy_type(&self) -> Option<CanopyType>
The canopy type, where the device has one.
Trait Implementations§
Source§impl Clone for DeviceDrag
impl Clone for DeviceDrag
Source§fn clone(&self) -> DeviceDrag
fn clone(&self) -> DeviceDrag
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 DeviceDrag
Source§impl Debug for DeviceDrag
impl Debug for DeviceDrag
Source§impl<'de> Deserialize<'de> for DeviceDrag
impl<'de> Deserialize<'de> for DeviceDrag
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeviceDrag, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeviceDrag, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DeviceDrag
impl PartialEq for DeviceDrag
Source§fn eq(&self, other: &DeviceDrag) -> bool
fn eq(&self, other: &DeviceDrag) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DeviceDrag
impl Serialize for DeviceDrag
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for DeviceDrag
Auto Trait Implementations§
impl Freeze for DeviceDrag
impl RefUnwindSafe for DeviceDrag
impl Send for DeviceDrag
impl Sync for DeviceDrag
impl Unpin for DeviceDrag
impl UnsafeUnpin for DeviceDrag
impl UnwindSafe for DeviceDrag
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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