Code Monkey home page Code Monkey logo

pbeam'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 env create --name wisdem-env -f https://raw.githubusercontent.com/WISDEM/WISDEM/master/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)
    git clone https://github.com/WISDEM/WISDEM.git
    cd WISDEM
    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

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.

pbeam's People

Contributors

andrewning avatar dykesk avatar evan-gaertner avatar gbarter avatar pgraf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pbeam's Issues

Missing libraries for compilation on Ubuntu 14.04

Hi,

I am trying to compile the pBEAM on my Ubuntu 14.04 machine using the makefile scripts. The compilation of the src/pBEAM files works fine. However, there are some issues with the makefile for src/pyBEAM. I modified the makefile script as follows. Still I have the attached error from the compiler.

Do you have any idea which libraries are still missing? It seems to be a python related lib.

Regards,
Malo

src/pyBEAM/makefile:

CXX = clang++
CFLAGS = -O2
PY_FRAMEWORK = /usr/include/python2.7 # /usr/lib/python2.7
BOOST_INCL = /usr/include
BOOST_LIB = /usr/lib/x86_64-linux-gnu
INCL = -I$(BOOST_INCL) -I$(PY_FRAMEWORK) -I../pBEAM
LIB = $(BOOST_LIB)/libboost_python.a $(BOOST_LIB)/libboost_system.a $(BOOST_LIB)/libpython2.7.a -lpthread -lz -ldl -lutil #some python lib?
OBJ = ../pBEAM/Poly.o ../pBEAM/myMath.o ../pBEAM/BeamFEA.o ../pBEAM/Beam.o

pybeam: pyBEAM.o
    $(CXX) pyBEAM.o $(OBJ) -Xlinker -E $(LIB) -o _pBEAM.so

.cpp.o:
    $(CXX) $(INCL) $(CFLAGS) -c $< -o $@

clean:
    rm -f *.o _pBEAM.so

compiler output:

mrosemeier@IWPC9064:~/workspace2014/pBEAM.git/src/pyBEAM$ make
clang++ -I/usr/include -I/usr/include/python2.7  -I../pBEAM -O2 -c pyBEAM.cpp -o pyBEAM.o
clang++ pyBEAM.o ../pBEAM/Poly.o ../pBEAM/myMath.o ../pBEAM/BeamFEA.o ../pBEAM/Beam.o -Xlinker -E /usr/lib/x86_64-linux-gnu/libboost_python.a /usr/lib/x86_64-linux-gnu/libboost_system.a /usr/lib/x86_64-linux-gnu/libpython2.7.a -lpthread -lz -ldl -lutil  -o _pBEAM.so
/usr/lib/x86_64-linux-gnu/libpython2.7.a(posixmodule.o): In function `posix_tmpnam':
(.text.unlikely+0x950): warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/lib/x86_64-linux-gnu/libpython2.7.a(posixmodule.o): In function `posix_tempnam':
(.text.unlikely+0xa44): warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 21
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_line): relocation 0 has invalid symbol index 2
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
../pBEAM/myMath.o: In function `myMath::generalizedEigenvalues(bool, boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, int, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >&, boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >&)':
myMath.cpp:(.text+0x326): undefined reference to `dsbgv_'
../pBEAM/myMath.o: In function `myMath::solveSPDBLinearSystem(boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, int, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >&)':
myMath.cpp:(.text+0x66d): undefined reference to `dpbsv_'
../pBEAM/myMath.o: In function `myMath::solveLinearSystem(boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >&)':
myMath.cpp:(.text+0x81f): undefined reference to `dgesv_'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pybeam] Error 1

Fortran Equivalent

Is there a Fortran equivalent of pBEAM or any other 3D beam model for turbine blades available for academic purposes (i.e. free)? You mention it's based on the book by Yang 1986, but doesn't that book already include Fortran code at the back? I want to implement pBEAM on a cluster, but all the prerequisites make it difficult to do so. I want to combine pBEAM with PreComp into a single executable.

I'm trying to get a copy of that book, but it's old and I can't download it from the internet.

NameError: name 'CalledProcessError' is not defined

I tried to install through anaconda 3 when suddenly it said:

running install
running bdist_egg
running egg_info
running build_src
build_src
building extension "_pBEAM" sources
build_src: building npy-pkg config files
writing pBEAM.egg-info\PKG-INFO
writing dependency_links to pBEAM.egg-info\dependency_links.txt
writing top-level names to pBEAM.egg-info\top_level.txt
reading manifest file 'pBEAM.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no directories found matching 'docs_build\html'
writing manifest file 'pBEAM.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 75, in init
out_string = subprocess.check_output(['gcc', '-dumpversion'])
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "setup.py", line 22, in
setup(
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\core.py", line 171, in setup
return old_setup(**new_attr)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools_init_.py", line 165, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\command\install.py", line 62, in run
r = self.setuptools_run()
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\command\install.py", line 56, in setuptools_run
self.do_egg_install()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\bdist_egg.py", line 174, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\bdist_egg.py", line 160, in call_command
self.run_command(cmdname)
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "C:\ProgramData\Anaconda3\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\command\build_ext.py", line 121, in run
self.compiler = new_compiler(compiler=compiler_type,
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\ccompiler.py", line 771, in new_compiler
compiler = klass(None, dry_run, force)
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 76, in init
except (OSError, CalledProcessError):
NameError: name 'CalledProcessError' is not defined

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.