Skip to content

NatLabRockies/WEIS-CTOpt

Repository files navigation

WEIS

Coverage Status Actions Status Documentation Status DOI

WEIS, Wind Energy with Integrated Servo-control, performs multifidelity co-design of wind turbines. WEIS is a framework that combines multiple NREL-developed tools to enable design optimization of floating offshore wind turbines.

Author: NREL WISDEM & OpenFAST & Control Teams

Documentation

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

Packages

WEIS-CTOpt integrates in a unique workflow four models:

  • WISDEM is a set of models for assessing overall wind plant cost of energy (COE).
  • OpenFAST is the community model for wind turbine simulation to be developed and used by research laboratories, academia, and industry.
  • TurbSim is a stochastic, full-field, turbulent-wind simulator.
  • ROSCO provides an open, modular and fully adaptable baseline wind turbine controller to the scientific community.
  • OWENS is an ontology, or way of coupling modular aerodynamic, structural, hydrodynamic, and controls packages.

In addition, three external libraries are added:

  • pCrunch is a collection of tools to ease the process of parsing large amounts of OpenFAST output data and conduct loads analysis.
  • pyOptSparse is a framework for formulating and efficiently solving nonlinear constrained optimization problems.

The core WEIS-CTOpt modules are:

  • aeroelasticse is a wrapper to call OpenFAST
  • control contains the routines calling ROSCO and the routines supporting distributed aerodynamic control devices, such trailing edge flaps
  • gluecode contains the scripts glueing together all models and libraries
  • multifidelity contains the codes to run multifidelity design optimizations
  • optimization_drivers contains various optimization drivers
  • schema contains the YAML files and corresponding schemas representing the input files to WEIS
  • owens is a wrapper to call OWENS

Installation

On laptop and personal computers, installation with Anaconda is the recommended approach because of the ability to create self-contained environments suitable for testing and analysis. WEIS 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 package dependencies. Sometimes, using mamba in place of conda with this distribution speeds up the installation process. WEIS is supported on Linux, MAC, Windows Sub-system for Linux (WSL), and native Windows.

The installation instructions below use the environment name, "weis-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.

  1. If you are NOT installing WEIS on DOE's HPC system Kestrel, skip step 0 and run step 1 and 2 (skip step 3). If you are on Kestrel, follow steps 0, 1, and 3, and skip step 2. On Kestrel, start by purging existing modules and load conda

    module purge
    module load conda        
    
  2. In a terminal, setup and activate the Anaconda environment

    conda config --add channels conda-forge
    conda install git
    git clone https://github.com/NREL/WEIS-CTOpt.git
    cd WEIS-CTOpt
    git checkout branch_name                         # (Only if you want to switch branches, say "develop")
    conda env create --name weis-env -f environment.yml
    conda activate weis-env                          # (if this does not work, try source activate weis-env)
    
  3. If you are NOT on Kestrel, add in final packages and install the software

     conda install -y petsc4py=3.22.2 mpi4py pyoptsparse     # (Mac / Linux only, sometimes Windows users may need to install mpi4py)
     pip install https://github.com/dzalkind/WISDEM/archive/ctopt.zip   # custom version of WISDEM for MHK turbines
     pip install -e .
    
  4. If you are on Kestrel, do:

     module load comp-intel intel-mpi mkl
     module unload gcc
     pip install --no-deps -e . -v
    
  5. If you want to model and optimize crossflow turbine (Tested on Mac / Linux only):

     curl -fsSL https://install.julialang.org | sh       # Or if julia is downloaded and installed manually, export the PATH to julia. 
     module load julia        # If on Kestrel
     python examples/06_owens_opt/installation.py       # activate your weis environment before this
     conda uninstall hdf5       # If you get errors complaining about hdf5 when you run the example and you have hdf5 in your conda env
     pip install h5py       # If you conda uninstall hdf5
    

NOTE: To use WEIS again after installation is complete, you will always need to activate the conda environment first with conda activate weis-env (or source activate weis-env). On Kestrel, make sure to reload the necessary modules

For Windows users, we recommend installing git and the m264 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.

Developer guide

If you plan to contribute code to WEIS, please first consult the developer guide.

Feedback

For software issues please use https://github.com/NREL/WEIS-CTOpt/issues.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •