Classes

Here the software classes will be documented. i.e. The comments in the code and the available methods and such things.

FLORIS Class

This is the handle class definition. It shows inheritance and member functions.

class FLORISSE_M.coreFunctions.floris(layout, controlSet, model)

Bases: %handle, matlab.mixin.Copyable

FLORIS This is the main class of the FLORIS program This class iterated through all the turbines and determines their production and the behaviour of their wakes

compute_condition(turbIfIndex)

COMPUTE_CONDITION Compute the conditions at the rotor of this turbine This function uses the ambientInflow and upwind turbines whose wake hits the rotor to determine the specific conditions at the rotor of this turbine.

compute_result(turbNum)

COMPUTE_RESULT Compute CP, CT and power of turbine turbNum Compute CP, CT and power of turbine turbNum and create its wake

find_affected_by(turbWfIndex, turbIfIndex)

FIND_AFFECTED_BY Check which downwind turbines are affected by this turbine This function uses the wake of this turbine to check if any donwind turbines re affected by its operation. At first glance all turbines outside of 1200m wide downwind band are discarded. The remaining turbines go through a calculation to see if the wake affects them. The outline of a downwind turbine is discretized in 6.28/.05 = approx 125 points. If any of these points are inside the wake the turbine is said to have been affected.

floris(layout, controlSet, model)

FLORIS Construct an instance of this class Detailed explanation goes here

run()

RUN Iterate through the turbines and compute the flow and powers Detailed explanation goes here

Turbines

These are the turbines that are currently implemented in FLORIS. The first class is the turbine_prototype superclass, the actual turbines pass this class the relevant information to create a functioning turbine handle.

class FLORISSE_M.turbineDefinitions.turbine_type(rotorRadius, genEfficiency, hubHeight, pP, cpctMapFunc, allowableControlMethods, description)

Bases: handle

TURBINE_TYPE This class instantiates turbine_type objects. This class inherits from handle. This means that if multiple turbines in a layout use the same turbine type they all refer to the same actual object. Changing the Cp/Ct functions or controlmethods for the turbine_type will thus immediately make this same change to turbines that have the same type. A turbine_type should thus hold a description of a turbine. The parameters that vary per simulation such as power are stored elsewhere (TODO: explain where)

adjust_cp_ct_for_yaw(turbineControl, turbineResult)

Correct Cp and Ct for rotor misallignment

cPcTpower(condition, turbineControl, turbineResult)

cPcTpower returns a struct with the computed turbine characteristics Computes the power coefficient for this turbine depending on the condition at the rotor area and the controlset of the turbine

static calc_axial_induction(ct)

Calculate axial induction factor

turbine_type(rotorRadius, genEfficiency, hubHeight, pP, cpctMapFunc, allowableControlMethods, description)

TURBINE_TYPE Construct an instance of this class The turbine characters are saved as properties

controlMethod = None

The controlMethod that is being used in this turbine

description = None

Short description of the turbine

genEfficiency = None

Generator efficiency

hubHeight = None

height of the turbine nacelle

pP = None

Fitting parameter to adjust CP down for a turbine angle

rotorArea = None

Swept area of the rotor

rotorRadius = None

Length of a single turbine blade

FLORISSE_M.turbineDefinitions.dtu10mw.dtu10mw()

DTU10MW This functions creates a turbine type of the DTU10MW reference turbine More information can be found in [CHP+13].

FLORISSE_M.turbineDefinitions.mwt12.mwt12()

MWT12 This functions creates a turbine type of a miniature wind turbine This minitaure wind turbine is optimized to have a good Ct and Cp such that the wake deflection effect mimic those of large scale wind turbines. More information can be found in [BPorteA17].

FLORISSE_M.turbineDefinitions.nrel5mw.nrel5mw()

DTU10MW This functions creates a turbine type of the NREL5MW reference turbine More information can be found in [JBMS09].

FLORISSE_M.turbineDefinitions.TUM_G1.tum_g1()

TUM_G1 This functions creates a turbine type of a small scale wind turbine as used in TUM

AddedTurbulenceModels

This page documents the models which describe the amount of added turbulence in a wake

class FLORISSE_M.submodelDefinitions.addedTurbulence.added_ti_interface

ADDED_TI_INTERFACE This class defines the functions that classes which describe an added turbulence model have to implement

class FLORISSE_M.submodelDefinitions.addedTurbulence.crespo_hernandez(modelData, turbine, turbineCondition, turbineControl, turbineResult)

Bases: FLORISSE_M.submodelDefinitions.addedTurbulence.added_ti_interface

CRESPO_HERNANDEZ Added Turbuelence Intensity object, The paper [NPorteA15] describes several turbulence intensity models. The Crespo-Hernandez one is found to be the most accurate in their situation.

added_TI(x)

METHOD1 Summary of this method goes here Detailed explanation goes here

crespo_hernandez(modelData, turbine, turbineCondition, turbineControl, turbineResult)

CRESPO_HERNANDEZ Construct an instance of this class Detailed explanation goes here

Deflection Models

This page documents the deflection models that are currently implemented in FLORIS. The first class is the interface superclass, The actual deflection objects have to implement the function defined in the deflection interface.

class FLORISSE_M.submodelDefinitions.wakeDeflection.deflection_interface

DEFLECTION_INTERFACE This class defines the functions that classes which describe wake centerline deflection have to implement.

class FLORISSE_M.submodelDefinitions.wakeDeflection.jimenez_deflection(modelData, turbine, turbineCondition, turbineControl, turbineResult)

Bases: FLORISSE_M.submodelDefinitions.wakeDeflection.deflection_interface

JIMINEZ_DEFLECTION A wake centerline deflection model. This wake centerline deflection model is described in [JimenezCM09]. It uses the rotor misalignment to compute an intital wake deflection angle. This angle decreases downwin similarly to the decrease of the wake deficit. Integrating the tangent of the wake centerline angle yields the deflection.

deflection(x)

DEFLECTION Computes deflection dz and dx based on downwind distance x.

jimenez_deflection(modelData, turbine, turbineCondition, turbineControl, turbineResult)

JIMINEZ_DEFLECTION Instantiate a wake deflection object store all the relevant variables in the object so that they can be used in the wake deflection function

KdY = None

Deflection decreasing parameter

ad = None

lateral wake displacement bias parameter (a*Drotor + bx)

at = None

vertical wake displacement bias parameter (a*Drotor + bx)

bd = None

lateral wake displacement bias parameter (a*Drotor + bx)

bt = None

vertical wake displacement bias parameter (a*Drotor + bx)

rotorRadius = None

Length of a turbine blade

wakeDir = None

Direction into which the wake deflects

zetaInit = None

Initial wake centerline angle

class FLORISSE_M.submodelDefinitions.wakeDeflection.rans_deficit_deflection(modelData, turbine, turbineCondition, turbineControl, turbineResult)

Bases: FLORISSE_M.submodelDefinitions.wakeDeflection.deflection_interface

RANS_DEFICIT_DEFLECTION A wake centerline deflection model. This wake centerline deflection model is described in [BPorteA16]. The model assumes a strict distinction between the near wake and far wake. The near wake is modeled as a constant velocity core that transforms from a tophat into a gaussian. When the gaussian is fully formed the far wake starts. The wake centerline deflection follows this distinction. The wake centerline in the near wake has a constant angle. The far wake deflection is computed based on Ct and the wake expansion.

deflection(x)

DEFLECTION Computes deflection dz and dx based on downwind distance x. This function is vectorized in the x-direction. That makes the notation slightly obtuse but the relvant equations can be found in [BPorteA16]

rans_deficit_deflection(modelData, turbine, turbineCondition, turbineControl, turbineResult)

RANS_DEFICIT_DEFLECTION Instantiate a wake deflection object Compute and store all the variables that are required by the DEFLECTION function.

C = None

Ellipse covariance matrix

ad = None

lateral wake displacement bias parameter (a*Drotor + bx)

at = None

vertical wake displacement bias parameter (a*Drotor + bx)

bd = None

lateral wake displacement bias parameter (a*Drotor + bx)

bt = None

vertical wake displacement bias parameter (a*Drotor + bx)

ct = None

Thrust coefficient

delta_x0 = None

Displacement at the end of the near wake

ky = None

Horizontal wake expansion parameter

kz = None

Vertical wake expansion parameter

rotorRadius = None

Length of a turbine blade

sigNeutral_x0 = None

Wake standard deviation in the case of a wind-aligned turbine

theta_C0 = None

Skew angle in near wake

wakeDir = None

Direction into which the wake deflects

x0 = None

Start of the far wake

SummationModels

This page documents the wake summation models

FLORISSE_M.submodelDefinitions.wakeSummation.quadratic_ambient_velocity()

QUADRATIC_AMBIENT_VELOCITY Function that defines how wakes are added Square the relative volumetric flowrate deficit and multiply the freestream with that value to compute the velocity deficit

FLORISSE_M.submodelDefinitions.wakeSummation.quadratic_rotor_velocity()

QUADRATIC_ROTOR_VELOCITY Function that defines how wakes are added Square the relative volumetric flowrate deficit and multiply the average velocity of the upstream rotor with that value to compute the velocity deficit

Velocity Models

This page documents the wake velocity models that are currently implemented in FLORIS. The first class is the interface superclass, The actual velocity objects have to implement the functions defined in the velocity interface.

class FLORISSE_M.submodelDefinitions.wakeVelocity.velocity_interface

VELOCITY_INTERFACE This superclass defines the methods that must be implemented to create a valid wake_velocity_deficit object

deficit_integral(deltax, dy, dz, rotRadius)

DEFICIT_INTEGRAL computes the wake deficit and overlap are that the wake has with the rotor

The below figure shows what the input parameters represent. The deficit function which should also be part of this wake velocity object has a velocity deficit profile which is computed around the wake centerline.

Diagram of function inputs
class FLORISSE_M.submodelDefinitions.wakeVelocity.self_similar_gaussian_velocity(modelData, turbine, turbineCondition, turbineControl, turbineResult)

Bases: FLORISSE_M.submodelDefinitions.wakeVelocity.velocity_interface

SELF_SIMILAR_GAUSSIAN_VELOCITY Wake velocity object implementing a symmetric Gaussian wake as described in [BPorteA16].

boundary(x, y, z)

BOUNDARY Determine if a coordinate is inside the wake

static bvcdf(Sigma_norm, R_norm, dS_norm, nMax)

function [series0] = bvcdf(Sigma_norm, R_norm, dS_norm, nMax) BVCDF computes the bivariate cumulative distribution function over a circular region

The document: TECHNICAL REPORT ECOM-2625 TABLES OF OFFSET CIRCLE PROBABILITIES FOR A NORMAL BIVARIATE ELLIPTICAL DISTRIBUTION explains how to compute the integral of a bivariate normal distribution by expanding the integral to a power series. The exact solution uses nMax = infty but the series converges so a few terms are enough to accurately approximate the integral

Inputs: Sigma_norm = Sigma of second dimension normalized by sigma in first R_norm = normalized radius of the circle by Sigma(1) dS_norm = normalized distance between circle and mean Gaus by Sigma(1)

bvcdf_wake(y, z, bladeR, varWake, FW_scalar)

bvcdf_wake uses the bvcdf function to compute the velocity deficit at the swept area of a turbine

deficit(x, y, z)

DEFICIT Compute the velocity deficit at a certain position

self_similar_gaussian_velocity(modelData, turbine, turbineCondition, turbineControl, turbineResult)

SELF_SIMILAR_GAUSSIAN_VELOCITY Construct an instance of this class

C = None

Ellipse covariance matrix

C0 = None

Relative velocity deficit in the near wake core

TI = None

Turbulence intensity at turbine

ct = None

Turbine thrust coefficient

ellipseA = None

Wake standard deviation ellipse

ky = None

Horizontal wake expansion parameter

kz = None

Vertical wake expansion parameter

sigNeutral_x0 = None

Wake standard deviation in the case of a wind-aligned turbine

thrustAngle = None

Turbine thrust angle

x0 = None

Start of the far wake

class FLORISSE_M.submodelDefinitions.wakeVelocity.zoned_velocity(modelData, turbine, turbineCondition, turbineControl, turbineResult)

Bases: FLORISSE_M.submodelDefinitions.wakeVelocity.velocity_interface

ZONED_VELOCITY Wake velocity object implementing the zoned wake model from Gebraad. More details can be found in [GTW+14].

boundary(x, y, z)

BOUNDARY Determine if a coordinate is inside the wake

cZones(x, zone)

Relative velocity deficit in wake zone [], scales axial induction

deficit(x, y, z)

DEFICIT Compute the velocity deficit at a certain position

static floris_intersect(R, r, d)

Calculates the overlap area between two circles on the same line, displaced with distance d and with radii R and r

rZones(x, zone)

Radius of wake zones [m]

zoned_velocity(modelData, turbine, turbineCondition, turbineControl, turbineResult)

ZONED_VELOCITY Construct an instance of this class

Ke = None

Base expansion coefficient

a = None

Axial induction factor

mU = None

Zone multiplier for recovery

me = None

Zone multiplier for expansion

wakeRadiusInit = None

Initial wake radius

class FLORISSE_M.submodelDefinitions.wakeVelocity.jensen_gaussian_velocity(modelData, turbine, turbineCondition, turbineControl, turbineResult)

Bases: FLORISSE_M.submodelDefinitions.wakeVelocity.velocity_interface

JENSEN_GAUSSIAN_VELOCITY Wake velocity object implementing a version of the jensen wake model as described in [Jen83]. That paper describes as a possible variant a cosine bell fitted tp the tophat velocity profile. The approach taken here is to fit a 2D gaussian to the wake tophat.

boundary(x, y, z)

BOUNDARY Determine if a coordinate is inside the wake

deficit(x, y, z)

DEFICIT Compute the velocity deficit at a certain position

jensen_gaussian_velocity(modelData, turbine, turbineCondition, turbineControl, turbineResult)

JENSEN_GAUSSIAN_VELOCITY Construct an instance of this class

Ke = None

Base expansion coefficient

P_normcdf_lb = None

normcdf(-sd,0,1)

P_normcdf_ub = None

normcdf(sd,0,1)

a = None

Axial induction factor

gv = None

Gaussian variable, ratio between wake radius and standard deviation

sd = None

Number of std. devs to which the gaussian wake extends

wakeRadiusInit = None

Initial wake radius

class FLORISSE_M.submodelDefinitions.wakeVelocity.larsen_velocity(modelData, turbine, turbineCondition, turbineControl, turbineResult)

Bases: FLORISSE_M.submodelDefinitions.wakeVelocity.velocity_interface

LARSEN_VELOCITY Wake velocity object implementing the larsen wake model. More details can be found in [Lar88].

boundary(x, y, z)

BOUNDARY Determine if a coordinate is inside the wake

deficit(x, y, z)

DEFICIT Compute the velocity deficit at a certain position

larsen_velocity(modelData, turbine, turbineCondition, turbineControl, turbineResult)

LARSEN_VELOCITY Construct an instance of this class

Area = None

Initial wake cut-through area [m]

c1Lars = None

Larsen wake coefficient

ct = None

Turbine thrust coefficient

x0 = None

Larsen distance coefficient

Ambient Flow Classes

This page documents the classes that make ambient flow objects which are currently implemented in FLORIS. The first class is the interface superclass, The actual ambient flow objects have to implement the function and properties defined in the ambient flow interface.

FLORISSE_M.submodelDefinitions.wakeVelocity.ambient_inflow_interface
FLORISSE_M.submodelDefinitions.wakeVelocity.ambient_inflow_uniform
FLORISSE_M.submodelDefinitions.wakeVelocity.ambient_inflow_log

[BPorteA16](1, 2, 3) Majid Bastankhah and Fernando Porté-Agel. Experimental and theoretical study of wind turbine wakes in yawed conditions. Journal of Fluid Mechanics, 806:506–541, 2016. URL: http://www.journals.cambridge.org/abstract{\_}S0022112016005954, doi:10.1017/jfm.2016.595.
[BPorteA17]Majid Bastankhah and Fernando Porté-Agel. A New Miniature Wind Turbine for Wind Tunnel. MDPI, Energies, 2017. doi:10.3390/en10070908.
[CHP+13]Lars Christian, Morten Hartvig, José Pedro, Albergaria Amaral, Frederik Zahle, Robert Bitsche, Taeseong Kim, Anders Yde, Lars Christian Henriksen, Morten H Hansen, José Blasques, Mac Gaunaa, and Anand Natarajan. The DTU 10-MW Reference Wind Turbine. Danish Wind Power Research 2013, 2013.
[GTW+14]P. M O Gebraad, F. W. Teeuwisse, J. W. Wingerden, P. A. Fleming, S. D. Ruben, J. R. Marden, and L. Y. Pao. A data-driven model for wind plant power optimization by yaw control. Proceedings of the American Control Conference, pages 3128–3134, 2014. doi:10.1109/ACC.2014.6859118.
[Jen83]N O Jensen. A note on wind generator interaction. Risø-M-2411 Risø National Laboratory Roskilde, pages 1–16, 1983. URL: http://www.risoe.dk/rispubl/VEA/veapdf/ris-m-2411.pdf, arXiv:arXiv:1011.1669v3, doi:Riso-M-2411.
[JimenezCM09]Ángel Jiménez, Antonio Crespo, and Emilio Migoya. Application of a LES technique to characterize the wake deflection of a wind turbine in yaw. Wind Energy, 13(6):559–572, dec 2009. URL: http://doi.wiley.com/10.1002/we.380, doi:10.1002/we.380.
[JBMS09]J. Jonkman, S. Butterfield, W. Musial, and G. Scott. Definition of a 5-MW Reference Wind Turbine for Offshore System Development. NREL website, 2009. URL: http://www.osti.gov/servlets/purl/947422-nhrlni/, doi:10.2172/947422.
[Lar88]G.C. Larsen. A Simple Wake Calculation Procedure. Risø-M, No. 2760:58, 1988. URL: http://orbit.dtu.dk/ws/files/55567186/ris{\_}m{\_}2760.pdf.
[NPorteA15]Amin Niayifar and Fernando Porté-Agel. A new analytical model for wind farm power prediction. Journal of Physics: Conference Series, 625:012039, 2015. URL: http://stacks.iop.org/1742-6596/625/i=1/a=012039?key=crossref.e168aebfa3a17acad4b99cb0176487cc, doi:10.1088/1742-6596/625/1/012039.