Template Function es::power_law_speed¶
- Defined in File velocity.h
Function Documentation¶
-
template <typename T, typename Talf>
Tes
::
power_law_speed
(T const &z, const double u_ref, const double z_ref, Talf const &alpha)¶ Compute speed profile according to the power law.
Templated so that it can be called with active scalars (allows use of autodiff), doubles/floats, Eigen::Arrays (directly) or Eigen::VectorXds (via template specialisation) of z values (to obtain shear profile u/dz) and/or alpha values (to obtain variational jacobean for fitting parameter alpha).
Power law speed is computed as:
\[ \frac{\overline{U}}{\overline{U}_{ref}} = \left(\frac{z}{z_{ref}}\right)^{\alpha} \]- Parameters
z
: Height(s) in m at which you want to get speed.u_ref
: Reference speed in m/sz_ref
: Reference height in malpha
: Power law exponent. Must be of same type as input z (allows autodifferentiation).