Skip to main content

DragConditions

Struct DragConditions 

Source
#[non_exhaustive]
pub struct DragConditions { pub reynolds_per_m: f64, pub thrusting: bool, pub thrusting_motor_area_m2: f64, pub thrusting_pod_motor_areas_m2: [f64; 4], }
Expand description

What the drag buildup needs beyond the crate::Flow.

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.
§reynolds_per_m: f64

Freestream Reynolds number per meter, V/ν, 1/m. The buildup multiplies it by the rocket’s length (Niskanen 2009 eq. 3.12, p. 42).

§thrusting: bool

Whether a motor is thrusting. It selects an override table’s power-on curve.

§thrusting_motor_area_m2: f64

Total cross-section area of the motors thrusting into the aft base, m², subtracted from the base area (Niskanen 2009 pp. 50–51). Zero while coasting. It leaves out motors in pods.

§thrusting_pod_motor_areas_m2: [f64; 4]

Total cross-section area of the thrusting motors in pods, m², one total for each pod set that holds motor mounts, in the order of hpr_design::Layout::motor_pod_sets: each pod’s share, its set’s total over the set’s pods, comes off its own base. Zero while none thrusts; at most MOTOR_POD_SETS sets.

Implementations§

Source§

impl DragConditions

Source

pub fn coasting(reynolds_per_m: f64) -> Self

Coasting at reynolds_per_m.

Source

pub fn thrusting(reynolds_per_m: f64, motor_area_m2: f64) -> Self

Thrusting at reynolds_per_m, with motors of total cross-section motor_area_m2 in the aft base (zero when the area is unknown: then the base drag gets no relief).

Source

pub fn with_pod_motors(self, pod_motor_areas_m2: [f64; 4]) -> Self

These conditions with thrusting motors in pods, of total cross-section pod_motor_areas_m2[k] in the kth pod set holding motor mounts, each pod’s share off its own base (Self::thrusting_pod_motor_areas_m2). The area in the aft base (Self::thrusting) is the airframe’s motors’ alone.

Source

pub fn validate(&self) -> Result<(), AeroError>

Checks that the Reynolds number and the area are finite and non-negative, and that a coasting rocket has no thrusting area.

§Errors

AeroError::Domain otherwise.

Trait Implementations§

Source§

impl Clone for DragConditions

Source§

fn clone(&self) -> DragConditions

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 Copy for DragConditions

Source§

impl Debug for DragConditions

Source§

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

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

impl<'de> Deserialize<'de> for DragConditions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for DragConditions

Source§

fn eq(&self, other: &DragConditions) -> 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 DragConditions

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 DragConditions

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.