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.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_DELs(solver, inflow_angle=0.0, first_call=False, **kwargs)
The “alm_DELs” objective function computes the damage equivalen loading (DEL) using actuator lines by applying the rainflow counting algorithm to the moment arm of the turbine. Can be used for multiple turbines.
- Keyword Arguments:
alm_DEL_type – flapwise flapwise - out-of-plane bending moment
- windse.objective_functions.box_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:
p0 – the corner of the box with the smallest values
p1 – the corner of the box with the largest values
- 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:
orientation – 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.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. It does this by creating a small, spherical Gaussian centered at the point x0. The gaussian has a characteristic width of mesh.hmax() to ensure it captures enough points for a meaningful measurement of the streamwise velocity.
- Keyword Arguments:
location – where the deficit is evaluated
radius – the radius of the sphere (default: “radius” is the radius of the rotors)
- 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.velocity_function(solver, inflow_angle=0.0, first_call=False, **kwargs)
Description of objective function
- Keyword Arguments:
velocity_path – location of the velocity profile csv file, columns: vel_x, vel_y, vel_z, x, y, z, and a 1 row header
- windse.objective_functions.velocity_target(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:
p0 – the corner of the box with the smallest values
p1 – the corner of the box with the largest values
- 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)