Skip to main content

ComponentDragTerms

Struct ComponentDragTerms 

Source
#[non_exhaustive]
pub struct ComponentDragTerms {
Show 19 fields pub id: String, pub friction_area_ratio: f64, pub relative_roughness: f64, pub step: Option<PressureDragTerm>, pub shoulder: Option<PressureDragTerm>, pub unsupported: Option<String>, pub mach_limit: Option<(f64, &'static str)>, pub boattail_area_ratio: f64, pub fore_step_down_area_ratio: f64, pub stated: Option<f64>, pub boattail: Option<BoattailTerm>, pub in_wake_of: Option<WakeTerm>, pub base_behind: Option<BaseBehindBoattail>, pub fins: Option<FinPressureTerms>, pub parasitic_area_ratio: f64, pub base_area_m2: f64, pub copies: u32, pub in_pod: bool, pub motor_pod_set: Option<usize>,
}
Expand description

A component’s precomputed drag terms, built by crate::AeroModel::new. Areas are divided by the reference area.

Serialize-only, like crate::AeroModel.

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.
§id: String

The component’s id.

§friction_area_ratio: f64

Friction area (a body’s axial projection, both sides of every fin) times the body form factor or the fin thickness factor: the friction drag is C_fc times this (eq. 3.85).

§relative_roughness: f64

Relative roughness R_s/L of the component’s finish on the rocket’s length.

§step: Option<PressureDragTerm>

Pressure drag of a step up in radius at the fore end, or of a bare front face: a flat face (PressureDragCurve::step).

§shoulder: Option<PressureDragTerm>

Pressure drag of a nose or shoulder: its own increase in area.

§unsupported: Option<String>

Why the buildup refuses this component, if it does: a nose or shoulder shape with no transonic drag data (a bulged secant ogive, a Haack series past C = ⅓). The model still builds, so the normal force and a drag table work; crate::AeroModel::drag without a table returns AeroError::Unsupported for it.

§mach_limit: Option<(f64, &'static str)>

The top of the component’s own Mach range, and its model’s name, where it has one below the buildup’s: tube fins’ (crate::tube_fins::TUBE_FIN_MACH_LIMIT). The buildup returns AeroError::Mach for this component at it and above.

§boattail_area_ratio: f64

A step down in radius at the fore end: its decrease in area, a boattail of no length (eq. 3.88 at γ = 0), times the base drag coefficient.

§fore_step_down_area_ratio: f64

The part of Self::boattail_area_ratio that is a step down from the body component ahead: that component’s aft face. A drag override on that component replaces it; one on this component keeps it (hpr_design::DragOverride; ADR-167, a part’s drag override as OpenRocket flies it).

§stated: Option<f64>

A drag coefficient stated in place of this component’s own drag, for one copy, every instance counted (hpr_design::DragOverride): zero for a part whose parent’s or stage’s override covers it. When set, the component’s drag is this and its Self::fore_step_down_area_ratio’s, and nothing else.

§boattail: Option<BoattailTerm>

A transition that narrows over a length: its own pressure drag as a boattail, blended by the turn toward its share of the boattails it continues (BoattailTerm), so parts of one straight cone drag as the cone.

§in_wake_of: Option<WakeTerm>

A lip in a boattail’s wake, drawn as a step up, a shoulder or both, with tubes, steps or parts between fading it: its step’s and shoulder’s pressure drag scaled by one less their fractions (WakeTerm).

§base_behind: Option<BaseBehindBoattail>

The boattails the aft base may take relief from, when a boattail lies ahead of it with only parts between that leave some: the base drag’s factor (Boattail::base_pressure_ratio, BaseBehindBoattail).

§fins: Option<FinPressureTerms>

A fin set’s pressure-drag inputs, or a tube fin set’s walls as square-edged fins’.

§parasitic_area_ratio: f64

Launch lugs’ and rail buttons’ areas (a lug’s times its length factor), times the stagnation drag coefficient (eq. 3.95–3.96).

§base_area_m2: f64

Area of the aft base, m²: the last body component’s aft area, zero for the rest. A pod’s last body component has its pod’s base.

§copies: u32

How many copies of the component fly: one pod per copy for a part in a pod set (hpr_design::PlacedComponent::copies), 1 for any other. Every term is one copy’s, and the component’s drag is their sum.

§in_pod: bool

Whether the component is in a pod: its base takes no part of the airframe’s thrusting motors’ area (DragConditions::thrusting_motor_area_m2).

§motor_pod_set: Option<usize>

Where its pod set is among those that hold motor mounts (hpr_design::Layout::motor_pod_sets), if it is in one: each copy’s base then takes its share of that set’s thrusting motors’ area (DragConditions::thrusting_pod_motor_areas_m2).

Trait Implementations§

Source§

impl Clone for ComponentDragTerms

Source§

fn clone(&self) -> ComponentDragTerms

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ComponentDragTerms

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ComponentDragTerms

Source§

fn eq(&self, other: &ComponentDragTerms) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ComponentDragTerms

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ComponentDragTerms

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.