Code Monkey home page Code Monkey logo

pbeam's Introduction

pBEAM

A finite element method for beam-like structures.

Author: NREL WISDEM Team

Documentation

See local documentation in the docs-directory or access the online version at http://wisdem.github.io/pBEAM/

Prerequisites

C++ compiler (with c++11 support), NumPy

Note that any modern compiler (gcc, clang, etc) on Linux or MacOS will support the c++11 standard. On Windows, recommend to use mingw through Anaconda or gcc on Cygwin.

Installation

For detailed installation instructions of WISDEM modules see https://github.com/WISDEM/WISDEM or to install pBEAM by itself do:

$ python setup.py install

To check if installation was successful run Python from the command line

$ python

and import the module. If no errors are issued, then the installation was successful.

>>> import _pBEAM

Unit Tests

pBEAM has a large range of unit tests, but they are only accessible through C++. They are intended to test the integrity of the underying code for development purposes, rather than the python interface. However, if you want to run the tests then change directory to src and run

$ make CXX=g++

where the name of your C++ compiler should be inserted in the place of g++. The script will build the test executable and run all tests. The phrase "No errors detected" signifies that all the tests passed. You can remove the remove the test executable and all object files by running

$ make clean

For software issues please use https://github.com/WISDEM/pBEAM/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

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

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.

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.