Exported Functions

Defining the wind directions

FLORIDyn.getWindDirTFunction
getWindDirT(::Direction_Constant, WindDir, iT, _)

Return wind direction in SOWFA-degrees for the requested turbine(s).

Arguments

  • WindDir: The wind direction (scalar).
  • iT: Index or indices of the turbines (can be an integer or array).
  • _: Placeholder for unused argument.

Returns

  • phi: Array of wind direction values, same size as iT.
source
getWindDirT(::Direction_Constant_wErrorCov, WindDir, iT)

Return wind direction in SOWFA-deg for the requested turbine(s).

Arguments

  • WindDir: Struct with fields
    • Data::Float64: wind direction value
    • CholSig::AbstractMatrix: Cholesky factor of covariance matrix (nT x nT)
  • iT: Vector of turbine indices (can be any indexable collection)

Returns

  • phi: Vector of wind directions for the selected turbines, including random perturbation
source
getWindDirT(::Direction_Interpolation, WindDir, iT, t)

Direction_Interpolation

Returns the wind direction at the respective turbine(s). Uniform interpolation version - all turbines experience the same changes.

Arguments:

  • WindDir: Nx2 Array, columns are time and phi (wind direction)
  • iT: single value or array with turbine index/indices
  • t: time of request

Returns:

  • phi: Array of wind directions for each turbine in iT
source
getWindDirT(::Direction_Interpolation_wErrorCov, WindDir, iT, t)

Returns the wind direction at the respective turbine(s). Uniform interpolation version - all turbines experience the same changes.

Arguments:

  • WindDir.Data = (t,phi) pairs between which is linearly interpolated
  • WindDir.ColSig = nT x nT, col(Covariance Matrix)
  • iT: single value or array with turbine index/indices
  • t: time of request

Returns:

  • phi: Array of wind directions for each turbine in iT
source
getWindDirT(::Direction_InterpTurbine, WindDir, iT, t)

Return wind direction in SOWFA-degrees for the requested turbine(s).

Arguments

  • WindDir::Matrix{Float64}: Each row is [time, phi_T0, phi_T1, ...].
  • iT::Union{Int, AbstractVector{Int}}: Index or indices of turbines (1-based).
  • t::Float64: Time of request.

Returns

  • phi::Vector{Float64}: Wind direction(s) for the selected turbine(s) at time t.
source
getWindDirT(::Direction_InterpTurbine_wErrorCov, WindDir, iT, t)

Return wind direction in SOWFA-deg for the requested turbine(s).

Arguments

  • WindDir: A struct with fields:
    • Data (Matrix): Each row is [time, phiT0, phiT1, ... phi_Tn]
    • CholSig (Matrix): Cholesky factor of the covariance matrix
  • iT: Index or indices of the turbines (can be integer or array)
  • t: Time of request (Float64)

Returns

  • phi: Wind direction(s) for requested turbine(s), perturbed with noise.
source
getWindDirT(::Direction_RW_with_Mean, WindDirNow, WindDir)

Returns the wind direction at the respective turbine(s).

Arguments

  • WindDirNow: Current value (vector)
  • WindDir: Struct with fields:
    • Init: Mean direction (vector or scalar)
    • CholSig: Cholesky factor of covariance matrix (matrix)
    • MeanPull: Scalar mean reversion factor

Returns

  • phi: Updated wind direction(s) (vector)
source
FLORIDyn.getWindDirT_EnKFFunction
getWindDirT_EnKF(::Direction_EnKF_InterpTurbine, WindDir, iT, t)

DirectionEnKFInterpTurbine

Return wind direction in SOWFA-deg for the requested turbine(s).

Arguments

  • WindDir::AbstractMatrix: Matrix where each row is [time, phiT0, phiT1, ... phi_Tn]
  • iT: Index or indices of the turbines (can be integer or vector)
  • t: Time of request (scalar)

Returns

  • phi: Wind direction(s) at time t for turbine(s) iT
source