Git Product home page Git Product logo

topfarm's People

Contributors

dykesk avatar gitter-badger avatar jennirinker avatar jp5000 avatar rethore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

topfarm's Issues

Problem running the tutorial

This cell is generating an error:

Loading all the input data
In [4]:
datadir = './'
dat = loadtxt(datadir+'WaterDepth1.dat')
X, Y = meshgrid(linspace(0., 1000., 50), linspace(0., 1000., 50))
depth = array(zip(X.flatten(), Y.flatten(), dat.flatten()))
borders = array([[200, 200], [150, 500], [200, 800], [600, 900], [700, 700], [900, 500], [800, 200], [500, 100], [200, 200]])
baseline = array([[587.5, 223.07692308], [525., 346.15384615], [837.5, 530.76923077], [525., 530.76923077], [525., 838.46153846], [837.5, 469.23076923]])
​
wt_desc = WTDescFromWTG(datadir+'V80-2MW-offshore.wtg').wt_desc
wt_layout = GenericWindFarmTurbineLayout([WTPC(wt_desc=wt_desc, position=pos) for pos in baseline])
​
​
# The wind rose
weibull_array = np.array([[  0.00000000e+00,   3.59673400e-02,  9.22422800e+00,   2.38867200e+00],
                         [  3.00000000e+01,   3.94977300e-02,   9.86435600e+00,   2.44726600e+00],
                         [  6.00000000e+01,   5.17838000e-02,   9.65220200e+00,   2.41992200e+00],
                         [  9.00000000e+01,   6.99794900e-02,   9.98217800e+00,   2.58789100e+00],
                         [  1.20000000e+02,   8.36383000e-02,   1.00946000e+01,   2.74804700e+00],
                         [  1.50000000e+02,   6.43412500e-02,   9.64369000e+00,   2.59179700e+00],
                         [  1.80000000e+02,   8.64220000e-02,   9.63377500e+00,   2.58007800e+00],
                         [  2.10000000e+02,   1.17690000e-01,   1.05678600e+01,   2.54492200e+00],
                         [  2.40000000e+02,   1.51555100e-01,   1.14525200e+01,   2.46679700e+00],
                         [  2.70000000e+02,   1.47361100e-01,   1.17423700e+01,   2.60351600e+00],
                         [  3.00000000e+02,   1.00109800e-01,   1.16923200e+01,   2.62304700e+00],
                         [  3.30000000e+02,   5.16542400e-02,   1.01385800e+01,   2.32226600e+00]])
wind_rose = WeibullWindRoseVT()
wind_rose.wind_directions = weibull_array[:,0]
wind_rose.frequency = weibull_array[:,1]
wind_rose.k = weibull_array[:,3]
wind_rose.A = weibull_array[:,2]
​
# Minimum distance between turbines
dist_WT_D = 3.0

Traceback:

E:root:'' is a reserved or invalid name
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-4-5ca424573668> in <module>()
      7
      8 wt_desc = WTDescFromWTG(datadir+'V80-2MW-offshore.wtg').wt_desc
----> 9 wt_layout = GenericWindFarmTurbineLayout([WTPC(wt_desc=wt_desc, position=pos) for pos in baseline])
     10
     11

c:\users\moserw\projects\toolsdev\openmdao-0.10.3.2\src\fusedwind\src\fusedwind\plant_flow\vt.pyc in __init__(self, wt_list)
    525         super(GenericWindFarmTurbineLayout, self).__init__()
    526         for wt in wt_list:
--> 527             self.add_wt(wt)
    528
    529     def add_wt(self, wt):

c:\users\moserw\projects\toolsdev\openmdao-0.10.3.2\src\fusedwind\src\fusedwind\plant_flow\vt.pyc in add_wt(self, wt)
    535         """
    536         wt.name = wt.name.replace('-','_')
--> 537         self.add(wt.name, VarTree(wt))
    538         self.wt_names.append(wt.name)
    539

c:\Users\moserw\Projects\ToolsDev\openmdao-0.10.3.2\Lib\site-packages\openmdao.main-0.10.3.2-py2.7.egg\openmdao\main\vartree.pyc in add(self, name, obj)
    131             msg = "a VariableTree may only contain Variables or VarTrees"
    132             self.raise_exception(msg, TypeError)
--> 133         return super(VariableTree, self).add(name, obj)
    134
    135     def add_trait(self, name, trait, refresh=True):

c:\Users\moserw\Projects\ToolsDev\openmdao-0.10.3.2\Lib\site-packages\openmdao.main-0.10.3.2-py2.7.egg\openmdao\main\container.pyc in add(self, name, obj)
    587         Returns the added object.
    588         """
--> 589         removed = self._prep_for_add(name, obj)
    590
    591         if has_interface(obj, IContainer):

c:\Users\moserw\Projects\ToolsDev\openmdao-0.10.3.2\Lib\site-packages\openmdao.main-0.10.3.2-py2.7.egg\openmdao\main\container.pyc in _prep_for_add(self, name, obj)
    553         elif not is_legal_name(name):
    554             self.raise_exception("'%s' is a reserved or invalid name" % name,
--> 555                                  NameError)
    556
    557         removed = False

c:\Users\moserw\Projects\ToolsDev\openmdao-0.10.3.2\Lib\site-packages\openmdao.main-0.10.3.2-py2.7.egg\openmdao\main\container.pyc in raise_exception(self, msg, exception_class)
   1449             full_msg = '%s: %s' % (self.get_pathname(), msg)
   1450         self._logger.error(msg)
-> 1451         raise exception_class(full_msg)
   1452
   1453     def reraise_exception(self, msg='', info=None):

NameError: : '' is a reserved or invalid name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.