Buildings.Electrical.BaseClasses.WindTurbine

Information

This package contains base classes that are used model the WindTurbine models.

Package Content

Name Description
Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbine PartialWindTurbine Partial model of a wind turbine with power output based on table as a function of wind speed
Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbineBase PartialWindTurbineBase Base class for turbine model that contains basic parameters

Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbine Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbine

Partial model of a wind turbine with power output based on table as a function of wind speed

Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbine

Information

Model of a wind turbine whose power is computed as a function of wind-speed as defined in a table.

Input to the model is the local wind speed. The model requires the specification of a table that maps wind speed in meters per second to generated power Pt in Watts. The model has a parameter called scale with a default value of one that can be used to scale the power generated by the wind turbine. The generated electrical power is

P = Pt scale

For example, the following specification (with default scale=1) of a wind turbine

  WindTurbine_Table tur(
    table=[3.5, 0;
           5.5,   100;
           12, 900;
           14, 1000;
           25, 1000]) "Wind turbine";

yields the performance shown below. In this example, the cut-in wind speed is 3.5 meters per second, and the cut-out wind speed is 25 meters per second, as entered by the first and last entry of the wind speed column. Below and above these wind speeds, the generated power is zero.

alt-image

Extends from Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbineBase (Base class for turbine model that contains basic parameters).

Parameters

TypeNameDefaultDescription
Realscale1Scaling factor, used to allow adjusting the power output without changing the table
BooleantableOnFilefalsetrue, if table is defined on file or in function usertab
Realtable[:, 2][3.5, 0; 5.5, 0.1; 12, 0.9; ...Table of generated power (first column is wind speed, second column is power)
StringtableName"NoName"Table name on file or in function usertab (see documentation)
StringfileName"NoName"File where matrix is stored
replaceable package PhaseSystemBuildings.Electrical.PhaseSy...Phase system
Terminalterminalterminal(redeclare package P...Generalized terminal
Wind correction
Realh Height over ground
HeighthRef10Reference height for wind measurement [m]
RealnWin0.4Height exponent for wind profile calculation
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]

Connectors

TypeNameDescription
input RealInputvWinSteady wind speed [m/s]
output RealOutputPGenerated power [W]
replaceable package PhaseSystemPhase system
TerminalterminalGeneralized terminal

Modelica definition

model PartialWindTurbine "Partial model of a wind turbine with power output based on table as a function of wind speed" extends Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbineBase; replaceable package PhaseSystem = Buildings.Electrical.PhaseSystems.PartialPhaseSystem constrainedby Buildings.Electrical.PhaseSystems.PartialPhaseSystem "Phase system"; replaceable Buildings.Electrical.Interfaces.Terminal terminal( redeclare package PhaseSystem = PhaseSystem) "Generalized terminal"; protected Modelica.Blocks.Tables.CombiTable1Ds per( final tableOnFile=tableOnFile, final table=cat(1, cat(1, [0, 0], table), [vOut+10*Modelica.Constants.eps, 0; vOut+20*Modelica.Constants.eps, 0]), final tableName=tableName, final fileName=fileName, final columns=2:2, final smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments) "Performance table that maps wind speed to electrical power output"; Modelica.Blocks.Math.Gain gain(final k=scale) "Gain, used to allow a user to easily scale the power"; DC.Sources.BaseClasses.WindCorrection cor( final h=h, final hRef=hRef, final n=nWin) "Correction for wind"; initial equation assert(abs(table[1,2]) < Modelica.Constants.eps, "First data point of performance table must be at cut-in wind speed, and be equal to 0 Watts. Received + " + String(table[1,1]) + " m/s with " + String(table[1,2]) + " Watts"); equation assert(gain.y>=0, "Wind power must be positive"); connect(per.y[1],gain. u); connect(vWin,cor. vRef); connect(cor.vLoc,per. u); connect(gain.y, P); end PartialWindTurbine;

Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbineBase Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbineBase

Base class for turbine model that contains basic parameters

Buildings.Electrical.BaseClasses.WindTurbine.PartialWindTurbineBase

Information

This partial model contains the minimum set of parameters necessary to describe a wind turbine. The model defines also an output P for the power generated by the wind turbine.

Parameters

TypeNameDefaultDescription
Realscale1Scaling factor, used to allow adjusting the power output without changing the table
BooleantableOnFilefalsetrue, if table is defined on file or in function usertab
Realtable[:, 2][3.5, 0; 5.5, 0.1; 12, 0.9; ...Table of generated power (first column is wind speed, second column is power)
StringtableName"NoName"Table name on file or in function usertab (see documentation)
StringfileName"NoName"File where matrix is stored
Wind correction
Realh Height over ground
HeighthRef10Reference height for wind measurement [m]
RealnWin0.4Height exponent for wind profile calculation
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]

Connectors

TypeNameDescription
input RealInputvWinSteady wind speed [m/s]
output RealOutputPGenerated power [W]

Modelica definition

partial model PartialWindTurbineBase "Base class for turbine model that contains basic parameters" final parameter Modelica.Units.SI.Velocity vIn=table[1, 1] "Cut-in steady wind speed"; final parameter Modelica.Units.SI.Velocity vOut=table[size(table, 1), 1] "Cut-out steady wind speed"; parameter Real scale(min=0)=1 "Scaling factor, used to allow adjusting the power output without changing the table"; parameter Real h "Height over ground"; parameter Modelica.Units.SI.Height hRef=10 "Reference height for wind measurement"; parameter Real nWin(min=0) = 0.4 "Height exponent for wind profile calculation"; parameter Boolean tableOnFile=false "true, if table is defined on file or in function usertab"; parameter Real table[:,2]= [3.5, 0; 5.5, 0.1; 12, 0.9; 14, 1; 25, 1] "Table of generated power (first column is wind speed, second column is power)"; parameter String tableName="NoName" "Table name on file or in function usertab (see documentation)"; parameter String fileName="NoName" "File where matrix is stored"; parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=110) "Nominal voltage (V_nominal >= 0)"; Modelica.Blocks.Interfaces.RealInput vWin(unit="m/s") "Steady wind speed"; Modelica.Blocks.Interfaces.RealOutput P(unit="W") "Generated power"; end PartialWindTurbineBase;