Commit 8fd3d670 authored by Frederik Zahle's avatar Frederik Zahle
Browse files

added a plot

parent bd9fd134
......@@ -134,12 +134,44 @@ class SEAM_AEP(Component):
NHours[i] = 8760. * ((1 - np.exp(-np.exp(self.WeibullC * np.log((wsp[i] + 0.5) / self.WeibullA)))) - \
(1 - np.exp(-np.exp(self.WeibullC * np.log((wsp[i] - 0.5) / self.WeibullA)))))
AEPprWSP = P_turb * NHours
AEPSum = np.sum(AEPprWSP/1000000.)
self.aep_pr_wsp = P_turb * NHours
AEPSum = np.sum(self.aep_pr_wsp * 1.e-6)
self.aep = AEPSum
self.total_aep = AEPSum * self.NYears
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 = 'Energy production'
fig.xaxis[0].axis_label = 'Wind speed [m/s]'
fig.yaxis[0].axis_label = 'Energy production [kWh]'
# fatigue, ultimate and final thickness line plots
fig.line(self.wind_curve, self.aep_pr_wsp, line_color='orange',
line_width=3)
fig.legend[0].orientation = 'top_right'
except:
pass
return fig
class SEAMAEP(Assembly):
......
Markdown is supported
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