Code Monkey home page Code Monkey logo

orbit's Introduction

WISDEM®

Actions Status Coverage Status Documentation Status

The Wind-Plant Integrated System Design and Engineering Model (WISDEM®) is a set of models for assessing overall wind plant cost of energy (COE). The models use wind turbine and plant cost and energy production as well as financial models to estimate COE and other wind plant system attributes. WISDEM® is accessed through Python, is built using OpenMDAO, and uses several sub-models that are also implemented within OpenMDAO. These sub-models can be used independently but they are required to use the overall WISDEM® turbine design capability. Please install all of the pre-requisites prior to installing WISDEM® by following the directions below. For additional information about the NWTC effort in systems engineering that supports WISDEM® development, please visit the official NREL systems engineering for wind energy website.

Author: NREL WISDEM Team

Documentation

See local documentation in the docs-directory or access the online version at https://wisdem.readthedocs.io/en/master/

Packages

WISDEM® is a family of modules. The core modules are:

  • CommonSE includes several libraries shared among modules
  • FloatingSE works with the floating platforms
  • DrivetrainSE sizes the drivetrain and generator systems (formerly DriveSE and GeneratorSE)
  • TowerSE is a tool for tower (and monopile) design
  • RotorSE is a tool for rotor design
  • NREL CSM is the regression-based turbine mass, cost, and performance model
  • ORBIT is the process-based balance of systems cost model for offshore plants
  • LandBOSSE is the process-based balance of systems cost model for land-based plants
  • Plant_FinanceSE runs the financial analysis of a wind plant

The core modules draw upon some utility packages, which are typically compiled code with python wrappers:

  • Airfoil Preppy is a tool to handle airfoil polar data
  • CCBlade is the BEM module of WISDEM
  • pyFrame3DD brings libraries to handle various coordinate transformations
  • MoorPy is a quasi-static mooring line model
  • pyOptSparse provides some additional optimization algorithms to OpenMDAO

Installation

Installation with Anaconda is the recommended approach because of the ability to create self-contained environments suitable for testing and analysis. WISDEM® requires Anaconda 64-bit. However, the conda command has begun to show its age and we now recommend the one-for-one replacement with the Miniforge3 distribution, which is much more lightweight and more easily solves for the WISDEM package dependencies.

Installation as a "library"

To use WISDEM's modules as a library for incorporation into other scripts or tools, WISDEM is available via conda install wisdem or pip install wisdem, assuming that you have already setup your python environment. Note that on Windows platforms, we suggest using conda exclusively.

Installation for direct use

These instructions are for interaction with WISDEM directly, the use of its examples, and the direct inspection of its source code.

The installation instructions below use the environment name, "wisdem-env," but any name is acceptable. For those working behind company firewalls, you may have to change the conda authentication with conda config --set ssl_verify no. Proxy servers can also be set with conda config --set proxy_servers.http http://id:pw@address:port and conda config --set proxy_servers.https https://id:pw@address:port. To setup an environment based on a different Github branch of WISDEM, simply substitute the branch name for master in the setup line.

  1. Setup and activate the Anaconda environment from a prompt (Anaconda3 Power Shell on Windows or Terminal.app on Mac)

    conda config --add channels conda-forge
    conda install git
    git clone https://github.com/WISDEM/WISDEM.git
    cd WISDEM
    conda env create --name wisdem-env -f environment.yml
    conda activate wisdem-env
    
  2. In order to directly use the examples in the repository and peek at the code when necessary, we recommend all users install WISDEM in developer / editable mode using the instructions here. If you really just want to use WISDEM as a library and lean on the documentation, you can always do conda install wisdem and be done. Note the differences between Windows and Mac/Linux build systems. For Linux, we recommend using the native compilers (for example, gcc and gfortran in the default GNU suite).

    conda install -y petsc4py mpi4py                 # (Mac / Linux only)
    conda install -y gfortran                        # (Mac only without Homebrew or Macports compilers)
    conda install -y m2w64-toolchain libpython       # (Windows only)
    pip install --no-deps -e . -v
    

NOTE: To use WISDEM again after installation is complete, you will always need to activate the conda environment first with conda activate wisdem-env

For Windows users, we recommend installing git and the m2w64 packages in separate environments as some of the libraries appear to conflict such that WISDEM cannot be successfully built from source. The git package is best installed in the base environment.

Run Unit Tests

Each package has its own set of unit tests. These can be run in batch with the test_all.py script located in the top level test-directory.

Feedback

For software issues please use https://github.com/WISDEM/WISDEM/issues. For functionality and theory related questions and comments please use the NWTC forum for Systems Engineering Software Questions.

orbit's People

Contributors

dmulash avatar gbarter avatar jakenunemaker avatar johnjasa avatar nriccobo avatar pre-commit-ci[bot] avatar rhammond2 avatar rrolph575 avatar sbredenk avatar

Stargazers

 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

orbit's Issues

Revise aggregation of capex line items from each module

All capex line items are in the design modules and don't get accounted for if the user foregoes the design module for their own design.

Ideas:

  • Move capex line items to the start of the installation phases
  • Include capex calculation in both modules and set priority if both are included

Expand documentation

TODO:

  • Review module documentation against recent changes
  • Add example fixed and floating project config files
  • Add documentation for outputs available in ProjectManager
  • Add documentation for how to use ParametricManager

WindIO Turbine Library?

It could be useful to summon the ORBIT turbine library from a python package. This would involve moving the turbine library (https://github.com/WISDEM/ORBIT/tree/dev/library/turbines) to within the installed ORBIT package.

WindIO has suggested a turbine schema which seems well suited for this application: https://github.com/IEAWindTask37/windIO/blob/main/windIO/plant/turbine.yaml. If you wind up hosting this python turbine library, would you be open to using the WindIO schema? We could update it to include the additional fields that ORBIT requires.

I notice that these turbines could be translated into a more refined schema and moved to an installable python package: https://github.com/NREL/turbine-models/. Do you have any interest in including these definitions? It would be straight-forward to translate these data into the windIO turbine schema.

Custom Project Layout Expected in the Cables Library Folder

The following two pieces of the custom array design are searching for a project layout in the cables folder. Given the current library structure, I think it might make sense to search for the layout data in project/plant, and to maintain compatibility search for it in cables if it's not found in the project/plant folder.

export_library_specs("cables", save_name, rows, file_ext="csv")

self.location_data = extract_library_specs(
"cables", windfarm, file_type="csv"
)

The primary reason for the requested change is to be compatible with other similar software, such as WOMBAT that use the same library structure for compatibility.

Using zero valued coordinates for `CustomArraySystemDesign` in distance mode results in nan values and failed simulations.

Description

When I run with zero-valued coordinates I get nan values from the CustomArraySystemDesign. This has the effect of leaving the turbines, cables and/or substation(s) out of the plots of the system and also failing in simulation. I have attached the cable layout csv that I was using when I git this error and the resulting layout plot. @RHammond2 helped me figure out what was going on, but the issue is still there. The workaround is of course just using non-zero coordinates.

Error Message

File "/home/anaconda3/envs/env/lib/python3.10/site-packages/marmot/agent.py", line 124, in task
delay = self.env.find_operational_window(ceil(duration), constraints)
File "/home/anaconda3/envs/env/lib/python3.10/site-packages/marmot/environment.py", line 162, in find_operational_window
if not self.state.size > 0:
File "/home/anaconda3/envs/env/lib/python3.10/site-packages/marmot/environment.py", line 111, in state
return self._state[ceil(self.now) :]
ValueError: cannot convert float NaN to integer

Attachments

cable_layout.csv
MicrosoftTeams-image (7)

Syntax warning due to comparison of literals using is

find ORBIT -iname '*.py' | xargs -P4 -I{}  python3.8 -Wall -m py_compile {}                                          
ORBIT/phases/install/monopile_install/common.py:345: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if connection is "bolted":
ORBIT/phases/install/monopile_install/common.py:348: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif connection is "grouted":
ORBIT/phases/install/oss_install/common.py:140: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if connection is "bolted":
ORBIT/phases/install/oss_install/common.py:143: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif connection is "grouted":

Custom Array Design Breaks for More Than 2 Substations

The use of i += string + 1 fails to increment correctly once the number of substations is greater than 2, whereas a simple change of i = string + 1 would correctly account for more than 2 substations.

For instance, with 3 substations and 7 strings on each substation, the value of i at the beginning of each outermost for loop is:

  1. 0: correct because it's the initial value for the first substation
  2. 7: correct because string 0 on the second substation will 7 strings + 1 to get the 7th index
  3. 21: incorrect because string 0 on the third substation should be 14 (2 x (7 strings + 1 for the index adjustment)), and not 7 (starting index) + 13 (index of final string of substation 2) + 1 for the index adjustment. The proposed fix would produce the correct starting index in the matrix creation steps of CustomArraySystemDesign._create_windfarm_layout()

Library data not insalling via conda

There is a potential issue of the library folder not installing when installing WISDEM via conda.

Someone reached out to me about an issue with the default_library not existing when using a freshly installed version of ORBIT. I don't have any information on the system they're using just that they used a conda installation of WISDEM.

Update: Installing via source does not produce this same issue, only a conda installation is leaving out the library folder.

Example Fixed Project

Hello,
I think in the 4. Example Fixed Project is a small mistake.
In the "example_fixed_project" file are the Project Inputs (turbine_capex,...) not written in the project_parameters. Instead they are alone. Therefore, they have no impact on the (total) costs.

Overlapping dependent phases start time should raise a warning not an error

Logic exists in get_dependency_start_time of the ProjectManager class that raises ValueError if the user specifies a reasonable value. The condition should be replaced with a Warning to notify the user that they specified a value that is not within range, and say why.

Currently, the start time of an installation phase may begin based on some completed percentage of a dependent installation phase. This percentage should be specified between 0.0 and 1.0. However, if the user puts in a value of 1.25 because they wanted the dependent installation phase to start 1.25x after the first installation phase, they will get an error. Furthermore, if the user wants to specify that a phase starts "X days" after another phase, they cannot do this.

Should there be some sort of catch to allow the user to enter the start time based on a percentage of a dependent phase or an integer number of days...

Move interconnection distance from landfall to export system

I helped Becca and Sophie debug some odd numbers yesterday and realized during that this configuration is kinda hidden off on it's own. It might make sense to move into the export_system_design sub dict in both the new module and the old one so it's a bit more obvious that it can be modified and has a default value associated with it.

"landfall": {"interconnection_distance": "km (optional)"},

"landfall": {"interconnection_distance": "km (optional)"},

@rrolph575 @amcooperman FYI

Soft Costs module needs updating

Defaults are fixed values based on Cost of Wind Energy Review from ~2019/2020.

First enhancement may be based on methodology in ORCA.

Non-unique plant capacity in export cable sizing

self._plant_capacity = (

If I specify plant capacity and turbine rating, this overrides the input value of plant capacity and can lead to an extra export cable being created from rounding error stackup.

Example: 600MW plant with 18 MW turbines. Project manager rounds up to 34 turbines; export_system then sizes export cables for 34 x 18 = 612 MW plant. A 220 kV export cable has a rating of 304 MW, so this erroneously adds a third export cable.

Workflow versions are out of date

Under each of the github workflow files: gh_pages.yml, publish-to-pypi.yaml, and tests.yml all refer to @v2 for checkout and setup-python. They versions should be updated to v4 to avoid workflow complications for different users.

Revise ORBIT.library.extract_library_data to be recursive

ORBIT/ORBIT/library.py

Lines 97 to 129 in 50e7481

def extract_library_data(config, additional_keys=[]):
"""
Extracts the configuration data from the specified library.
Parameters
----------
config : dict
Configuration dictionary.
additional_keys : list
Additional keys that contain data that needs to be extracted from
within `config`, by default [].
Returns
-------
config : dict
Configuration dictionary.
"""
if os.environ.get("DATA_LIBRARY", None) is None:
return config
for key, val in config.items():
if isinstance(val, dict) and any(el in key for el in additional_keys):
config[key] = extract_library_data(val)
elif not isinstance(val, str):
continue
try:
config[key] = extract_library_specs(key, val)
except KeyError:
continue
return config

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.