In [10]:
%load_ext autoreload
%autoreload 2
from windIO.Plant import WTLayout
import numpy as np


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

In [11]:
# Some plotly imports
import plotly as pl
from plotly.graph_objs import *
from plotly.offline import init_notebook_mode, iplot
init_notebook_mode() # run at the start of every ipython notebook to use plotly.offline
                     # this injects the plotly.js source files into the notebook
print(pl.__version__) # requires version >= 1.9.0


1.9.5

In [ ]:
file_name = 'hornsrev.yml'

In [13]:
wtl = WTLayout(file_name)

In [14]:
wtl.plot_location()



In [15]:
wtl.plot_layout()



In [16]:
turbine = wtl['turbine_types'][0]
ct = np.array(turbine['c_t_curve'])
iplot(Figure(data=[{
               'x':ct[:,0], 
               'y':ct[:,1]}],
     layout={
        'xaxis':{'title':"Wind Speed [m/s]"},
        'yaxis':{'title':'$C_T$'},
        'title': '$C_T$ curve of the %s'%(turbine['name']),            
        }
      ))



In [17]:
from plotly.graph_objs import *
turbine = wtl['turbine_types'][0]
power = np.array(turbine['power_curve'])
iplot(Figure(data=[{
               'x':power[:,0], 
               'y':power[:,1]}],
     layout={
        'xaxis':{'title':"Wind Speed [m/s]"},
        'yaxis':{'title':'Power [kW]'},
        'title': 'Power Curve of the %s'%(turbine['name']),
        }
      ))



In [ ]:


In [ ]: