pub fn drag_force(
density: f64,
velocity: f64,
drag_coefficient: f64,
area: f64,
) -> Option<f64>Expand description
Computes drag force from density, velocity, drag coefficient, and area.
Formula: F_d = 0.5 * ρ * v² * C_d * A
Returns None when density, drag_coefficient, or area is negative, when any input is
not finite, or when the computed result is not finite.
§Examples
use use_fluid::drag_force;
let force = drag_force(1.225, 10.0, 0.47, 1.0).unwrap();
assert!((force - 28.7875).abs() < 1.0e-9);