pub struct PowerLawWind { /* private fields */ }Expand description
A wind whose speed grows with height above ground as a power law, from one direction:
V(z) = V_ref (z / z_ref)^α, z = H − H_ground > 0; V = 0 for z ≤ 0Source: NASA/TM-2008-215633, Terrestrial Environment (Climatic) Criteria Guidelines for Use
in Aerospace Vehicle Development (2008), §2.2.5.2, eq. 2.1, pinned as nasa-tm-2008-215633.
There it describes peak winds below 150 m, with z_ref = 18.3 m and exponents from 0.14 to
about 0.2 (Table 2-1); docs/physics/wind.md says how to choose one. Heights below ground are
flagged. Heights above the surface layer are not, although the law keeps growing there: pair
it with winds aloft.
Implementations§
Source§impl PowerLawWind
impl PowerLawWind
Sourcepub fn new(
reference_speed_m_s: f64,
reference_height_agl_m: f64,
exponent: f64,
direction_from_rad: f64,
ground_msl_m: f64,
) -> Result<Self, AtmosError>
pub fn new( reference_speed_m_s: f64, reference_height_agl_m: f64, exponent: f64, direction_from_rad: f64, ground_msl_m: f64, ) -> Result<Self, AtmosError>
A power-law profile through reference_speed_m_s at reference_height_agl_m above a
ground at ground_msl_m, with exponent exponent, blowing from direction_from_rad.
§Errors
AtmosError::Domain if the speed is negative, the reference height is not positive,
the exponent is negative, or any value is not finite.
Sourcepub fn reference_speed_m_s(&self) -> f64
pub fn reference_speed_m_s(&self) -> f64
Wind speed at the reference height, m/s.
Sourcepub fn reference_height_agl_m(&self) -> f64
pub fn reference_height_agl_m(&self) -> f64
Reference height above ground, m.
Sourcepub fn direction_from_rad(&self) -> f64
pub fn direction_from_rad(&self) -> f64
Direction the wind blows from, in [0, 2π), rad.
Sourcepub fn ground_msl_m(&self) -> f64
pub fn ground_msl_m(&self) -> f64
Height of the ground above mean sea level, m.
Trait Implementations§
Source§impl Clone for PowerLawWind
impl Clone for PowerLawWind
Source§fn clone(&self) -> PowerLawWind
fn clone(&self) -> PowerLawWind
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 PowerLawWind
Source§impl Debug for PowerLawWind
impl Debug for PowerLawWind
Source§impl<'de> Deserialize<'de> for PowerLawWind
impl<'de> Deserialize<'de> for PowerLawWind
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 PartialEq for PowerLawWind
impl PartialEq for PowerLawWind
Source§fn eq(&self, other: &PowerLawWind) -> bool
fn eq(&self, other: &PowerLawWind) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PowerLawWind
impl Serialize for PowerLawWind
impl StructuralPartialEq for PowerLawWind
Source§impl Wind for PowerLawWind
impl Wind for PowerLawWind
Source§fn wind(&self, height_msl_m: f64) -> Result<WindSample, AtmosError>
fn wind(&self, height_msl_m: f64) -> Result<WindSample, AtmosError>
height_msl_m above mean sea level. Read more