pub struct MassElement {
pub mass_kg: f64,
pub cg_m: f64,
pub axial_inertia_kg_m2: f64,
pub transverse_inertia_kg_m2: f64,
}Expand description
A mass on the motor axis, with its moments of inertia about its own center of mass.
Fields§
§mass_kg: f64Mass, kg.
cg_m: f64Center of mass along the motor axis, m from the nozzle exit toward the forward end.
axial_inertia_kg_m2: f64Moment of inertia about the motor axis, through the element’s center of mass, kg·m².
transverse_inertia_kg_m2: f64Moment of inertia about a transverse axis through the element’s center of mass, kg·m².
Implementations§
Source§impl MassElement
impl MassElement
Sourcepub fn thin_tube(mass_kg: f64, cg_m: f64, radius_m: f64, length_m: f64) -> Self
pub fn thin_tube(mass_kg: f64, cg_m: f64, radius_m: f64, length_m: f64) -> Self
A thin-walled tube of radius radius_m and length length_m centered at cg_m:
I_a = m r², I_t = m (r²/2 + L²/12).
Sourcepub fn hollow_cylinder(
mass_kg: f64,
cg_m: f64,
outer_radius_m: f64,
inner_radius_m: f64,
length_m: f64,
) -> Self
pub fn hollow_cylinder( mass_kg: f64, cg_m: f64, outer_radius_m: f64, inner_radius_m: f64, length_m: f64, ) -> Self
A hollow cylinder of outer radius outer_radius_m, inner radius inner_radius_m and
length length_m, centered at cg_m: I_a = ½ m (R² + r²),
I_t = m ((R² + r²)/4 + L²/12). An inner radius of zero gives a solid cylinder.
Sourcepub fn combine<'a>(
elements: impl IntoIterator<Item = &'a MassElement> + Clone,
) -> Self
pub fn combine<'a>( elements: impl IntoIterator<Item = &'a MassElement> + Clone, ) -> Self
The elements combined into one: total mass, mass-weighted center, and inertias moved to that center with the parallel-axis theorem. With zero total mass the center is the plain average of the element positions (or 0 with no elements) and the inertias are summed; a NaN mass gives a NaN center.
Sourcepub fn transverse_inertia_about(&self, z_m: f64) -> f64
pub fn transverse_inertia_about(&self, z_m: f64) -> f64
The transverse moment of inertia about an axis through z_m instead of the center of mass,
kg·m² (the parallel-axis theorem).
Trait Implementations§
Source§impl Clone for MassElement
impl Clone for MassElement
Source§fn clone(&self) -> MassElement
fn clone(&self) -> MassElement
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 MassElement
Source§impl Debug for MassElement
impl Debug for MassElement
Source§impl<'de> Deserialize<'de> for MassElement
impl<'de> Deserialize<'de> for MassElement
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 MassElement
impl JsonSchema for MassElement
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 moreSource§impl PartialEq for MassElement
impl PartialEq for MassElement
Source§fn eq(&self, other: &MassElement) -> bool
fn eq(&self, other: &MassElement) -> bool
self and other values to be equal, and is used by ==.