pub struct LogProfile { /* private fields */ }Expand description
Log-law boundary layer: u(z) = u_ref · ln(z/z0) / ln(z_ref/z0), z > z0; zero below z0. Constant direction with height.
The field reads only the height (position_m.y), which must be the height above the ground;
HeightOffset converts another frame’s heights. Vertical wind is zero.
Implementations§
Source§impl LogProfile
impl LogProfile
Sourcepub fn new(
reference_speed_mps: f64,
reference_height_m: f64,
roughness_m: f64,
direction_from_deg: f64,
) -> Result<LogProfile, WindFieldError>
pub fn new( reference_speed_mps: f64, reference_height_m: f64, roughness_m: f64, direction_from_deg: f64, ) -> Result<LogProfile, WindFieldError>
Build a log-law profile.
reference_speed_mps must be finite and >= 0, reference_height_m finite and > 0,
roughness_m (z0) finite, > 0 and below the reference height, and
direction_from_deg finite.
Sourcepub fn reference_speed_mps(&self) -> f64
pub fn reference_speed_mps(&self) -> f64
Wind speed at the reference height, m/s.
Sourcepub fn reference_height_m(&self) -> f64
pub fn reference_height_m(&self) -> f64
Reference height, metres.
Sourcepub fn roughness_m(&self) -> f64
pub fn roughness_m(&self) -> f64
Aerodynamic roughness length z0, metres.
Sourcepub fn direction_from_deg(&self) -> f64
pub fn direction_from_deg(&self) -> f64
Wind-FROM direction, degrees (constant with height).
Trait Implementations§
Source§impl Clone for LogProfile
impl Clone for LogProfile
Source§fn clone(&self) -> LogProfile
fn clone(&self) -> LogProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LogProfile
Source§impl Debug for LogProfile
impl Debug for LogProfile
Source§impl PartialEq for LogProfile
impl PartialEq for LogProfile
impl StructuralPartialEq for LogProfile
Auto Trait Implementations§
impl Freeze for LogProfile
impl RefUnwindSafe for LogProfile
impl Send for LogProfile
impl Sync for LogProfile
impl Unpin for LogProfile
impl UnsafeUnpin for LogProfile
impl UnwindSafe for LogProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.