Skip to content

Commit

Permalink
Merge pull request #13 from NREL/develop
Browse files Browse the repository at this point in the history
Include rated power in yaw correction to master
  • Loading branch information
paulf81 authored Jun 13, 2019
2 parents 20094e0 + a17dba3 commit c23fd0e
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
29 changes: 24 additions & 5 deletions floris/simulation/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ def average_velocity(self):
"""
return np.cbrt(np.mean(self.velocities**3))


@property
def Cp(self):
"""
Expand All @@ -413,6 +414,8 @@ def Cp(self):
calculated as the cube root of the mean cubed velocity in the
rotor area.
Note, the velocity is scalled to an effective velocity by the yaw
Returns:
float: The power coefficient of a turbine at the current
operating conditions.
Expand All @@ -422,7 +425,11 @@ def Cp(self):
>>> Cp = floris.farm.turbines[0].Cp()
"""
return self._fCp(self.average_velocity)
# Compute the yaw effective velocity
pW = self.pP / 3.0 # Convert from pP to pW
yaw_effective_velocity = self.average_velocity * cosd(self.yaw_angle) ** pW

return self._fCp(yaw_effective_velocity)

@property
def Ct(self):
Expand Down Expand Up @@ -460,12 +467,24 @@ def power(self):
>>> power = floris.farm.turbines[0].power()
"""
cptmp = self.Cp \
* cosd(self.yaw_angle)**self.pP \
* cosd(self.tilt_angle)**self.pT

# Update to power calculation which replaces the fixed pP exponent with
# an exponent pW, that changes the effective wind speed input to the power
# calculation, rather than scaling the power. This better handles power
# loss to yaw in above rated conditions
#
# based on the paper "Optimising yaw control at wind farm level" by
# Ervin Bossanyi

# Compute the yaw effective velocity
pW = self.pP / 3.0 # Convert from pP to w
yaw_effective_velocity = self.average_velocity * cosd(self.yaw_angle) ** pW

# Now compute the power
cptmp = self.Cp #Note Cp is also now based on yaw effective velocity
return 0.5 * self.air_density * (np.pi * self.rotor_radius**2) \
* cptmp * self.generator_efficiency \
* self.average_velocity**3
* yaw_effective_velocity**3

@property
def aI(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/curl_regression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def baseline(self, turbine_index):

def yawed_baseline(self, turbine_index):
baseline = [
(0.4632707, 0.7626735 , 1780240.6778116, 0.2559082, 7.9727208),
(0.4632734, 0.7626735, 1780250.9240069, 0.2559082, 7.9727208),
(0.4539774, 0.8325224, 761784.3584749, 0.2953798, 6.0342075)
]
return baseline[turbine_index]
Expand Down
2 changes: 1 addition & 1 deletion tests/gauss_regression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def baseline(self, turbine_index):

def yawed_baseline(self, turbine_index):
baseline = [
(0.4632706, 0.7626695, 1780851.3400887, 0.2559061, 7.9736330),
(0.4632733, 0.7626695, 1780861.5909742, 0.2559061, 7.9736330),
(0.4519389, 0.8403914, 696267.1270400, 0.3002448, 5.8647976)
]
return baseline[turbine_index]
Expand Down
2 changes: 1 addition & 1 deletion tests/jensen_jimenez_regression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def baseline(self, turbine_index):

def yawed_baseline(self, turbine_index):
baseline = [
(0.4632706, 0.7626695, 1780851.3400887, 0.2559061, 7.9736330),
(0.4632733, 0.7626695, 1780861.5909742, 0.2559061, 7.9736330),
(0.4554894, 0.8266861, 813067.4207660, 0.2918451, 6.1598540)
]
return baseline[turbine_index]
Expand Down
2 changes: 1 addition & 1 deletion tests/multizone_jimenez_regression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def baseline(self, turbine_index):

def yawed_baseline(self, turbine_index):
baseline = [
(0.4632706, 0.7626695, 1780851.3400887, 0.2559061, 7.9736330),
(0.4632733, 0.7626695, 1780861.5909742, 0.2559061, 7.9736330),
(0.4420041, 0.8650277, 535742.2576472, 0.3163071, 5.4141570)
]
return baseline[turbine_index]
Expand Down

0 comments on commit c23fd0e

Please sign in to comment.