Skip to main content

FinSet

Struct FinSet 

Source
pub struct FinSet {
    pub count: u32,
    pub planform: FinPlanform,
    pub thickness_m: f64,
    pub cross_section: FinCrossSection,
    pub tab: Option<FinTab>,
    pub fillet: Option<FinFillet>,
    pub cant_rad: f64,
    pub base_angle_rad: f64,
    pub material: Material,
}
Expand description

A set of identical fins spaced evenly around the body.

Fields§

§count: u32

Number of fins, 1 to 64 (FinSet::MAX_COUNT).

§planform: FinPlanform

Outline of each fin.

§thickness_m: f64

Maximum thickness, m.

§cross_section: FinCrossSection

Section shape.

§tab: Option<FinTab>

Optional tab below each root.

§fillet: Option<FinFillet>

Optional fillets along each root.

§cant_rad: f64

Cant angle, rad.

§base_angle_rad: f64

Roll angle of the first fin from x_B toward y_B, rad.

§material: Material

Material (bulk).

Implementations§

Source§

impl FinSet

Source

pub const ROOT_ON_SURFACE_M: f64 = 1e-6

How far a root’s point may stand off the surface of the nose cone or transition it sits on, m: a micron, well inside any build tolerance and far outside the rounding of a file’s seventeen digits.

Source

pub const ROOT_SLIVER_SHARE: f64 = 1e-3

The most planform, as a share of the fin’s, that a root’s straight pieces may cut off or add across a curved surface: 0.1%, a tenth of the 1% to which cargo xtask ork holds a design’s mass to OpenRocket’s. On the cockpit of OpenRocket’s Pods–airframes and winglets, OpenRocket’s own 20 pieces come to 0.032%, the .ork reader’s 64 to 0.0031%, and one straight piece, the chord, to 11.4% of its area (12.8% more than the fin’s).

Source

pub const MAX_COUNT: u32 = 64

The most fins a set may have, the same bound as crate::PodSet::MAX_COUNT.

The set’s mass properties build one body per fin and add them up, so a count is an allocation and a loop: four billion fins would ask for hundreds of gigabytes and never return, where a refusal is an error. 64 is far more than any rocket carries: the most fins in one set among the .ork designs hpr’s checks read is 8 (a one-off count over 78 designs, not a committed survey), the aerodynamics take 1 to 8 (the fin–fin interference factors of the OpenRocket technical documentation 13.05, eq. 3.54, from MIL-HDBK-762(MI) p. 5-24, and its tumbling efficiencies, Table 3.4, stop at 8), and the .ork reader leaves out any part counted more than 64 times. A set of 9 to 64 fins is weighed; the aerodynamics refuse it with their own error.

Source

pub fn check_level_root(&self) -> Result<(), DesignError>

Checks that the set can sit on a body tube: its root is level, ending at h = 0 with no root points.

§Errors

DesignError::Geometry for a root that isn’t level.

Source

pub fn root_on_surface(&self, profile: &Profile, fore_m: f64) -> (f64, f64)

How the root sits on a nose cone’s or transition’s surface, with its leading edge fore_m aft of the body’s forward end: the farthest any of its points stands off it, m, and the planform its straight pieces cut off or add across the curve, m². A point at [x, h] is on the surface when h = r(x_LE + x) − r(x_LE). Each piece’s sliver is the parabolic segment (2/3) δ Δx, with δ the surface’s distance from the piece’s midpoint, which is exact to leading order in Δx for a smooth surface.

Source

pub fn root_radius_on( &self, profile: &Profile, fore_m: f64, ) -> Result<f64, DesignError>

The radius of a nose cone’s or transition’s surface at the root leading edge, fore_m aft of the body’s forward end, after checking that the set can sit there: the root within the body’s length, its points within FinSet::ROOT_ON_SURFACE_M of the surface, its pieces’ slivers within FinSet::ROOT_SLIVER_SHARE of the fin’s area (FinSet::root_on_surface), and no tab or fillet, whose models take a body tube. The root’s height is measured from that radius.

§Errors

DesignError::Geometry for a set that can’t sit on the body as given.

Source

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

Checks the set’s count, dimensions and planform.

§Errors

DesignError::Domain for no fins or more than Self::MAX_COUNT (what is "fin count (1 to 64)", the value the count), a bad dimension, cant or base angle, and DesignError::Geometry for a planform or tab that doesn’t close or fit.

Source

pub fn single_fin( &self, body_radius_m: f64, ) -> Result<MassProperties, DesignError>

Mass properties of one fin (and its tab) at roll angle 0 and no cant, in the fin-set frame, on a body of radius body_radius_m.

§Errors

As FinSet::validate, plus DesignError::Domain for a negative body radius or a fillet more than FILLET_RATIO_MAX times the body radius, and DesignError::Numerics if an integral fails.

Source

pub fn mass_properties( &self, body_radius_m: f64, ) -> Result<MassProperties, DesignError>

Mass properties of the whole set in its frame, on a body of radius body_radius_m.

§Errors

As FinSet::single_fin.

Trait Implementations§

Source§

impl Clone for FinSet

Source§

fn clone(&self) -> FinSet

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 FinSet

Source§

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

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

impl<'de> Deserialize<'de> for FinSet

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 JsonSchema for FinSet

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for FinSet

Source§

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

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 FinSet

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.