windse.objective_functions

The objective function live in the windse/objective_functions folder. These functions should be called using the dictionary objective_funcs[<name>](solver, *args, **kwargs), where <name> is the function name.

Functions

windse.objective_functions.2d_power(solver, inflow_angle=0.0, first_call=False, **kwargs)

The “2d_power” objective function calculates the power using actuator disks, by computing the integral of turbine force dotted with velocity. Additionally, some modification are made to account for the fact the simulation is 2D.

windse.objective_functions.KE_entrainment(solver, inflow_angle=0.0, first_call=False, **kwargs)

The “KE_entrainment” objective function computed the vertical kinetic entrainment behind a single turbine

Keyword Arguments:
 ke_location – location of measurement, hub, rotor, tip (only rotor works for now)
windse.objective_functions.alm_power(solver, inflow_angle=0.0, first_call=False, **kwargs)

The “alm_power” objective function computes the power using actuator lines by dotting the turbine force in the rotor plane with the moment arm of the turbine blade multiplied by angular velocity. Can be used for multiple turbines.

Keyword Arguments:
 alm_power_type – real or fake; real - dotting the turbine force with the moment arm of the turbine blade fake - simply multiply the turbine force by the velocity
windse.objective_functions.cyld_kernel(solver, inflow_angle=0.0, first_call=False, **kwargs)

This is a blockage metric that measures the velocity within a Gaussian cylinder located upstream from each turbine and aligned with the rotor’s rotational axis or overhead from each turbine and aligned with the mast. The cylindrical Gaussian field is formed by intersecting a radial Gaussian and a streamwise Gaussian.

Keyword Arguments:
 
  • type – The orientation of the Gaussian cylinder, “upstream” for Gaussians shifted to measure the velocity directly upstream from each turbine, “above” to orient the Gaussians over the top of each turbine.
  • radius – The radius of the cylinder, expressed in units of rotor diameter (RD). The default of 0.5 sets the radius to match the turbine radius, 0.5*RD
  • length – The length of the cylinder, expressed in units of rotor diameter (RD). The default of 3.0 means the measurement volume has an axial length of 3*RD.
  • sharpness – The sharpness value controls the severity with which the Gaussian field drops to zero outside the volume of the Gaussian cylinder. The sharpness value must be an even number. Smaller values result in smoother transitions over longer length scales, larger values result in more abrupt transitions. For very large values, the transition becomes a near step change which may not have valid values of the derivative. The default setting of 6 is a good starting point.
windse.objective_functions.mean_point_blockage(solver, inflow_angle=0.0, first_call=False, **kwargs)

This is a simple blockage metric that evaluates the velocity deficit at a single location above the mean location of all turbine in the farm.

Keyword Arguments:
 z_value – z location to evaluate
windse.objective_functions.plane_blockage(solver, inflow_angle=0.0, first_call=False, **kwargs)

This is a simple blockage metric that integrates the velocity deficit in a plane in front of or above the farm.

Keyword Arguments:
 
  • axis – the orientation of the plane, “z” for above, “x” for in front
  • thickness – how thick of a plane to integrate over
  • center – distance along the axis where the plane is centered
windse.objective_functions.point_blockage(solver, inflow_angle=0.0, first_call=False, **kwargs)

This is a simple blockage metric that evaluates the velocity deficit at a single location in the farm.

Keyword Arguments:
 location – where the deficit is evaluated
windse.objective_functions.power(solver, inflow_angle=0.0, first_call=False, annotate=True, **kwargs)

The “power” objective function calculates the power using actuator disks, by computing the integral of turbine force dotted with velocity.

windse.objective_functions.wake_center(solver, inflow_angle=0.0, first_call=False, **kwargs)

The “wake_center” objective function computes the wake n rotor diameters downstream from a single turbine. This calculation is perform by centering a cylinder oriented along the streamwise direction downstream and calculating the center of mass of the velocity deficit, or centroid.

Keyword Arguments:
 
  • wake_RD – Number of rotor diameters downstream where the centroid will be computed
  • wake_length – The streamwise length for the area of integration (not used)
  • wake_radius – The radius of the cylinder (not used)