windse.WindFarmManager¶
The windfarm manager contains everything required to set up a windfarm.
-
class
windse.WindFarmManager.
EmptyWindFarm
(dom)¶
-
class
windse.WindFarmManager.
GenericWindFarm
(dom)¶ Bases:
object
A GenericProblem contains on the basic functions required by all problem objects.
Parameters: dom ( windse.DomainManager.GenericDomain()
) – a windse domain object.-
CalculateFarmBoundingBox
()¶ This functions takes into consideration the turbine locations, diameters, and hub heights to create lists that describe the extent of the windfarm. These lists are append to the parameters object.
-
CalculateHeights
()¶ This function calculates the absolute heights of each turbine.
-
CreateConstants
()¶ This functions converts lists of locations and axial inductions into dolfin.Constants. This is useful in optimization.
-
CreateLists
()¶ This function creates lists from single values. This is useful when the params.yaml file defines only one type of turbine.
-
DolfinTurbineForce
(fs, mesh, inflow_angle=0.0)¶ This function creates a turbine force by applying a spacial kernel to each turbine. This kernel is created from the turbines location, yaw, thickness, diameter, and force density. Currently, force density is limit to a scaled version of
\[r\sin(r),\]where \(r\) is the distance from the center of the turbine.
Parameters: - V (dolfin.FunctionSpace) – The function space the turbine force will use.
- mesh (dolfin.mesh) – The mesh
Returns: the turbine force.
Return type: tf (dolfin.Function)
Todo
- Setup a way to get the force density from file
-
PlotFarm
(show=False, filename='wind_farm', power=None)¶ This function plots the locations of each wind turbine and saves the output to output/…/plots/
Keyword Arguments: - show (bool): Default: True, Set False to suppress output but still save.
-
SaveActuatorDisks
(val=0)¶ This function saves the turbine force if exists to output/…/functions/
-
YawTurbine
(x, x0, yaw)¶ This function yaws the turbines when creating the turbine force.
Parameters: - x (dolfin.SpatialCoordinate) – the space variable, x
- x0 (list) – the location of the turbine to be yawed
- yaw (float) – the yaw value in radians
-
-
class
windse.WindFarmManager.
GridWindFarm
(dom)¶ Bases:
windse.WindFarmManager.GenericWindFarm
A GridWindFarm produces turbines on a grid. The params.yaml file determines how this grid is set up.
Example
In the .yaml file you need to define:
wind_farm: # # Description | Units HH: 90 # Hub Height | m RD: 126.0 # Turbine Diameter | m thickness: 10.5 # Effective Thickness | m yaw: 0.0 # Yaw | rads axial: 0.33 # Axial Induction | - ex_x: [-1500, 1500] # x-extent of the farm | m ex_y: [-1500, 1500] # y-extent of the farm | m grid_rows: 6 # Number of rows | - grid_cols: 6 # Number of columns | -
This will produce a 6x6 grid of turbines equally spaced within the region [-1500, 1500]x[-1500, 1500].
Parameters: dom ( windse.DomainManager.GenericDomain()
) – a windse domain object.
-
class
windse.WindFarmManager.
ImportedWindFarm
(dom)¶ Bases:
windse.WindFarmManager.GenericWindFarm
A ImportedWindFarm produces turbines located based on a text file. The params.yaml file determines how this grid is set up.
Example
In the .yaml file you need to define:
wind_farm: imported: true path: "inputs/wind_farm.txt"
The “wind_farm.txt” needs to be set up like this:
# x y HH Yaw Diameter Thickness Axial_Induction 200.00 0.0000 80.000 0.0000000000 126 10.5 0.33 800.00 0.0000 80.000 0.0000000000 126 10.5 0.33
The first row isn’t necessary. Each row defines a different turbine.
Parameters: dom ( windse.DomainManager.GenericDomain()
) – a windse domain object.
-
class
windse.WindFarmManager.
RandomWindFarm
(dom)¶ Bases:
windse.WindFarmManager.GenericWindFarm
A RandomWindFarm produces turbines located randomly with a defined range. The params.yaml file determines how this grid is set up.
Example
In the .yaml file you need to define:
wind_farm: # # Description | Units HH: 90 # Hub Height | m RD: 126.0 # Turbine Diameter | m thickness: 10.5 # Effective Thickness | m yaw: 0.0 # Yaw | rads axial: 0.33 # Axial Induction | - ex_x: [-1500, 1500] # x-extent of the farm | m ex_y: [-1500, 1500] # y-extent of the farm | m numturbs: 36 # Number of Turbines | - seed: 15 # Random Seed for Numpy | -
This will produce a 36 turbines randomly located within the region [-1500, 1500]x[-1500, 1500]. The seed is optional but useful for reproducing test.
Parameters: dom ( windse.DomainManager.GenericDomain()
) – a windse domain object.
Classes¶
-
class
windse.WindFarmManager.
EmptyWindFarm
(dom)
-
class
windse.WindFarmManager.
GenericWindFarm
(dom) Bases:
object
A GenericProblem contains on the basic functions required by all problem objects.
Parameters: dom ( windse.DomainManager.GenericDomain()
) – a windse domain object.-
CalculateFarmBoundingBox
() This functions takes into consideration the turbine locations, diameters, and hub heights to create lists that describe the extent of the windfarm. These lists are append to the parameters object.
-
CalculateHeights
() This function calculates the absolute heights of each turbine.
-
CreateConstants
() This functions converts lists of locations and axial inductions into dolfin.Constants. This is useful in optimization.
-
CreateLists
() This function creates lists from single values. This is useful when the params.yaml file defines only one type of turbine.
-
DolfinTurbineForce
(fs, mesh, inflow_angle=0.0) This function creates a turbine force by applying a spacial kernel to each turbine. This kernel is created from the turbines location, yaw, thickness, diameter, and force density. Currently, force density is limit to a scaled version of
\[r\sin(r),\]where \(r\) is the distance from the center of the turbine.
Parameters: - V (dolfin.FunctionSpace) – The function space the turbine force will use.
- mesh (dolfin.mesh) – The mesh
Returns: the turbine force.
Return type: tf (dolfin.Function)
Todo
- Setup a way to get the force density from file
-
PlotFarm
(show=False, filename='wind_farm', power=None) This function plots the locations of each wind turbine and saves the output to output/…/plots/
Keyword Arguments: - show (bool): Default: True, Set False to suppress output but still save.
-
SaveActuatorDisks
(val=0) This function saves the turbine force if exists to output/…/functions/
-
YawTurbine
(x, x0, yaw) This function yaws the turbines when creating the turbine force.
Parameters: - x (dolfin.SpatialCoordinate) – the space variable, x
- x0 (list) – the location of the turbine to be yawed
- yaw (float) – the yaw value in radians
-
-
class
windse.WindFarmManager.
GridWindFarm
(dom) Bases:
windse.WindFarmManager.GenericWindFarm
A GridWindFarm produces turbines on a grid. The params.yaml file determines how this grid is set up.
Example
In the .yaml file you need to define:
wind_farm: # # Description | Units HH: 90 # Hub Height | m RD: 126.0 # Turbine Diameter | m thickness: 10.5 # Effective Thickness | m yaw: 0.0 # Yaw | rads axial: 0.33 # Axial Induction | - ex_x: [-1500, 1500] # x-extent of the farm | m ex_y: [-1500, 1500] # y-extent of the farm | m grid_rows: 6 # Number of rows | - grid_cols: 6 # Number of columns | -
This will produce a 6x6 grid of turbines equally spaced within the region [-1500, 1500]x[-1500, 1500].
Parameters: dom ( windse.DomainManager.GenericDomain()
) – a windse domain object.
-
class
windse.WindFarmManager.
ImportedWindFarm
(dom) Bases:
windse.WindFarmManager.GenericWindFarm
A ImportedWindFarm produces turbines located based on a text file. The params.yaml file determines how this grid is set up.
Example
In the .yaml file you need to define:
wind_farm: imported: true path: "inputs/wind_farm.txt"
The “wind_farm.txt” needs to be set up like this:
# x y HH Yaw Diameter Thickness Axial_Induction 200.00 0.0000 80.000 0.0000000000 126 10.5 0.33 800.00 0.0000 80.000 0.0000000000 126 10.5 0.33
The first row isn’t necessary. Each row defines a different turbine.
Parameters: dom ( windse.DomainManager.GenericDomain()
) – a windse domain object.
-
class
windse.WindFarmManager.
RandomWindFarm
(dom) Bases:
windse.WindFarmManager.GenericWindFarm
A RandomWindFarm produces turbines located randomly with a defined range. The params.yaml file determines how this grid is set up.
Example
In the .yaml file you need to define:
wind_farm: # # Description | Units HH: 90 # Hub Height | m RD: 126.0 # Turbine Diameter | m thickness: 10.5 # Effective Thickness | m yaw: 0.0 # Yaw | rads axial: 0.33 # Axial Induction | - ex_x: [-1500, 1500] # x-extent of the farm | m ex_y: [-1500, 1500] # y-extent of the farm | m numturbs: 36 # Number of Turbines | - seed: 15 # Random Seed for Numpy | -
This will produce a 36 turbines randomly located within the region [-1500, 1500]x[-1500, 1500]. The seed is optional but useful for reproducing test.
Parameters: dom ( windse.DomainManager.GenericDomain()
) – a windse domain object.