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: u32Number of fins, 1 to 64 (FinSet::MAX_COUNT).
planform: FinPlanformOutline of each fin.
thickness_m: f64Maximum thickness, m.
cross_section: FinCrossSectionSection shape.
tab: Option<FinTab>Optional tab below each root.
fillet: Option<FinFillet>Optional fillets along each root.
cant_rad: f64Cant angle, rad.
base_angle_rad: f64Roll angle of the first fin from x_B toward y_B, rad.
material: MaterialMaterial (bulk).
Implementations§
Source§impl FinSet
impl FinSet
Sourcepub const ROOT_ON_SURFACE_M: f64 = 1e-6
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.
Sourcepub const ROOT_SLIVER_SHARE: f64 = 1e-3
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).
Sourcepub const MAX_COUNT: u32 = 64
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.
Sourcepub fn check_level_root(&self) -> Result<(), DesignError>
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.
Sourcepub fn root_on_surface(&self, profile: &Profile, fore_m: f64) -> (f64, f64)
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.
Sourcepub fn root_radius_on(
&self,
profile: &Profile,
fore_m: f64,
) -> Result<f64, DesignError>
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.
Sourcepub fn validate(&self) -> Result<(), DesignError>
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.
Sourcepub fn single_fin(
&self,
body_radius_m: f64,
) -> Result<MassProperties, DesignError>
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.
Sourcepub fn mass_properties(
&self,
body_radius_m: f64,
) -> Result<MassProperties, DesignError>
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
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FinSet
impl<'de> Deserialize<'de> for FinSet
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 JsonSchema for FinSet
impl JsonSchema for FinSet
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more