Code Monkey home page Code Monkey logo

floris's Issues

Turbine turbulence intensity

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:

  • flow_field_ti
  • wake model's initial ti
  • turbulence intensity at the turbine

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?

Structure as a typical (installable) Python package

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

Question about Jimenez model

# 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?

Double TurbineMap

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.

Allow input dictionary in Floris initialization

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.

Turbine.eta...

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.

OptModules

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?

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.