wisdem / floris Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED. The latest floris is at https://github.com/nrel/floris
License: Apache License 2.0
DEPRECATED. The latest floris is at https://github.com/nrel/floris
License: Apache License 2.0
def _initial_flowfield(self):
return self.wind_speed * (self.z / self.hub_height)**self.wind_shear
It looks like turbulence intensity is unnecessarily tied to the Turbine object. Line 193 in FlowField sets the turbulence intensity for each turbine and then calls the turbine's calculate_turbulence_intensity
function at line 274. Furthermore, the definition of that function in Turbine line 218 calls for three unique turbulence intensities:
What are the distinctions between these turbulence intensities, can we make this simpler, and is it used correctly at the moment since flow_field_ti
and turbine.turbulence_intensity
are ultimately the same?
Is there a new way to create plots of the flow field?
I recommend creating a floris
subdirectory (such that the package will be called floris
), and nesting all modules below that. This will negate the need for the hacking of sys.path
, e.g.: https://github.com/WISDEM/FLORIS/blob/feature/userAPI/wakes/JensenJimenez.py#L3
After this, a setup.py
file can be created such that pip install .
will install floris
in the user's current Python environment.
The imports in the top level FLORIS.py
script would then become:
from floris.turbines.NREL5MW import NREL5MW
from floris.wakes.JensenJimenez import JensenJimenez
from floris.models.WakeCombination import WakeCombination
from floris.farms.TwoByTwo import TwoByTwo
from floris.io.InputReader import InputReader
# angle of deflection
xi_init = (1. / 2.) * np.cos(turbine.yaw_angle) * \
np.sin(turbine.yaw_angle) * turbine.Ct
Should this not be either cosine squared? Or Ct is corrected beforehand, in which case only the sine is applied?
Not critical obviously, but it does help distinguish module names from class names: https://www.python.org/dev/peps/pep-0008/#package-and-module-names
Having a TurbineMap object on the Farm and on the FlowField is a bit confusing and could lead to them getting out of sync. I propose working to get a single TurbineMap on the appropriate object, either Farm or FlowField, and passing data to the other as needed.
Currently, Floris
expects a JSON input file path, but if someone wanted to, e.g., run FLORIS in batch mode, do parameter sweeps, etc., it may be useful to define the entire farm within a script. I suggest allowing the exact same parsing as the input file but on a Python dictionary. I'm sure it's already there under the hood since the JSON is read into a dictionary anyway.
Should the be a default resolution for the full_flow_field function at line 173?
Is the eta
property on the Turbine object needed? This is an input to the turbine model in the input file, but it is not actually used in the Turbine object class or anywhere else in the code. Its set at line 76 in Turbine.py.
When I want to optimize my model using OptModules, I have to create this object from scratch based on the documentation from github and save it into the floris folder, right?. However, when I try to import the module from my code, for some reason its not finding it and I´m unable to import it. Could you give me a step by step to make this module work?
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.