Birds don't have wings

This commit is contained in:
Ludvig Böklin 2021-05-23 08:12:57 +02:00
parent 0aee0e2f4b
commit a2afb75c83

View File

@ -162,7 +162,7 @@ impl Body {
let cdi = c_l.powi(2) / (PI * e * ar); let cdi = c_l.powi(2) / (PI * e * ar);
zero_lift_drag_coefficient(planform_area) zero_lift_drag_coefficient(planform_area)
+ self.parasite_drag_coefficient(wings) + self.parasite_drag_coefficient()
+ cdi + cdi
}; };
debug_assert!(c_d.is_sign_positive()); debug_assert!(c_d.is_sign_positive());
@ -171,7 +171,7 @@ impl Body {
c_l * *lift_dir + c_d * *rel_flow_dir c_l * *lift_dir + c_d * *rel_flow_dir
}, },
_ => self.parasite_drag_coefficient(wings) * *rel_flow_dir, _ => self.parasite_drag_coefficient() * *rel_flow_dir,
} }
} }
} }
@ -180,7 +180,7 @@ impl Body {
/// Skin friction is the drag arising from the shear forces between a fluid /// Skin friction is the drag arising from the shear forces between a fluid
/// and a surface, while pressure drag is due to flow separation. Both are /// and a surface, while pressure drag is due to flow separation. Both are
/// viscous effects. /// viscous effects.
fn parasite_drag_coefficient(&self, wings: Option<&Wings>) -> f32 { fn parasite_drag_coefficient(&self) -> f32 {
// Reference area and drag coefficient assumes best-case scenario of the // Reference area and drag coefficient assumes best-case scenario of the
// orientation producing least amount of drag // orientation producing least amount of drag
match self { match self {
@ -208,16 +208,12 @@ impl Body {
// Cross-section, zero-lift angle; exclude the wings (width * 0.2) // Cross-section, zero-lift angle; exclude the wings (width * 0.2)
Body::BirdMedium(_) | Body::BirdLarge(_) | Body::Dragon(_) => { Body::BirdMedium(_) | Body::BirdLarge(_) | Body::Dragon(_) => {
let dim = self.dimensions().map(|a| a * 0.5); let dim = self.dimensions().map(|a| a * 0.5);
let cd: f32 = if wings.is_none() { let cd: f32 = match self {
0.7
} else {
// "Field Estimates of Body Drag Coefficient on the Basis of Dives in Passerine // "Field Estimates of Body Drag Coefficient on the Basis of Dives in Passerine
// Birds", Anders Hedenström and Felix Liechti, 2001 // Birds", Anders Hedenström and Felix Liechti, 2001
match self { Body::BirdLarge(_) | Body::BirdMedium(_) => 0.2,
Body::BirdLarge(_) | Body::BirdMedium(_) => 0.2, // arbitrary
// arbitrary _ => 0.7,
_ => 0.7,
}
}; };
cd * PI * dim.x * 0.2 * dim.z cd * PI * dim.x * 0.2 * dim.z
}, },