dtuwindenergy / topfarm Goto Github PK
View Code? Open in Web Editor NEWA repository for a wind plant layout optimisation tool based on FUSED-Wind and FUSED-Wake
License: GNU Affero General Public License v3.0
A repository for a wind plant layout optimisation tool based on FUSED-Wind and FUSED-Wake
License: GNU Affero General Public License v3.0
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
@navetcph has had some issue running the tutorial2_advanced.ipynb using the native installation.
I had an issue following the first basic example on https://topfarm.pages.windenergy.dtu.dk/TopFarm2/notebooks/design_variables.html. It gave ImportError: cannot import name 'RegularGridInterpolator' from 'scipy.interpolate.interpolate'. The newest scipy release (1.10.0) has 'RegularGridInterpolator' under 'scipy.interpolate'. Issue can be resolved by adjusting this in py_wake_wrapper.py.
This is a bug within xarray. We need to either wait until xarray fixes it or, if this affects people, add in a manual close. For now I will wait.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.