Commit bd9fd134 authored by Frederik Zahle's avatar Frederik Zahle
Browse files

added power curve plot

parent ae92bf72
......@@ -60,11 +60,47 @@ class SEAM_PowerCurve(Component):
for j in range(self.n_wsp):
P_turb[i] = P_turb[i] + P_raw[j] * NormDist[i-1, j] / ProbSum[i-1]
self.P_aero = P_aero * 10.e-3
self.P_raw = P_raw * 10.e-3
self.P_aero = P_aero * 1.e-3
self.ideal_power_curve = P_raw * 1.e-3
self.power_curve = P_turb * 1.e-3
self.wind_curve = wsp
def plot(self, fig):
"""
function to generate Bokeh plot for web GUI.
Also callable from an ipython notebook
parameters
----------
fig: object
Bokeh bokeh.plotting.figure object
returns
-------
fig: object
Bokeh bokeh.plotting.figure object
"""
try:
# formatting
fig.title = 'Power curve'
fig.xaxis[0].axis_label = 'Wind speed [m/s]'
fig.yaxis[0].axis_label = 'Power production [kW]'
# fatigue, ultimate and final thickness line plots
fig.line(self.wind_curve, self.ideal_power_curve, line_color='orange',
line_width=3,
legend='Ideal')
fig.line(self.wind_curve, self.power_curve, line_color='green',
line_width=3,
legend='With turbulence')
fig.legend[0].orientation = 'bottom_right'
except:
pass
return fig
class SEAM_AEP(Component):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment