pub struct LogLawWind { /* private fields */ }Expand description
A wind whose speed follows the neutral logarithmic law above ground, from one direction:
V(z) = V_ref ln(z / z₀) / ln(z_ref / z₀), z = H − H_ground > z₀; V = 0 for 0 ≤ z ≤ z₀with roughness length z₀. Sources: MIL-F-8785C §3.7.3.2 (with z_ref = 20 ft), and the
neutral surface-layer law V = (u*/κ) ln(z/z₀) of WMO-No. 8 (2023), Vol. I, chapter 5 annex,
whose Davenport–Wieringa classes give z₀ = 0.03 m for open grassland. Heights below ground
are flagged; see docs/physics/wind.md.
Implementations§
Source§impl LogLawWind
impl LogLawWind
Sourcepub fn new(
reference_speed_m_s: f64,
reference_height_agl_m: f64,
roughness_length_m: 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, roughness_length_m: f64, direction_from_rad: f64, ground_msl_m: f64, ) -> Result<Self, AtmosError>
A logarithmic profile through reference_speed_m_s at reference_height_agl_m above a
ground at ground_msl_m with roughness length roughness_length_m, blowing from
direction_from_rad.
§Errors
AtmosError::Domain if the speed is negative, the roughness length is not positive, the
reference height is not above the roughness length, 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 roughness_length_m(&self) -> f64
pub fn roughness_length_m(&self) -> f64
Roughness length z₀, 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 LogLawWind
impl Clone for LogLawWind
Source§fn clone(&self) -> LogLawWind
fn clone(&self) -> LogLawWind
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 LogLawWind
Source§impl Debug for LogLawWind
impl Debug for LogLawWind
Source§impl<'de> Deserialize<'de> for LogLawWind
impl<'de> Deserialize<'de> for LogLawWind
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 LogLawWind
impl PartialEq for LogLawWind
Source§fn eq(&self, other: &LogLawWind) -> bool
fn eq(&self, other: &LogLawWind) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for LogLawWind
impl Serialize for LogLawWind
impl StructuralPartialEq for LogLawWind
Source§impl Wind for LogLawWind
impl Wind for LogLawWind
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