Coder Social home page Coder Social logo

wisdem / ccblade Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 39.0 8.81 MB

A blade element momentum method for analyzing wind turbine aerodynamic performance that is robust (guaranteed convergence), fast (superlinear convergence rate), and smooth (continuously differentiable).

License: Other

Python 92.33% Fortran 7.11% Meson 0.56%

ccblade'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.

ccblade's People

Contributors

andrewning avatar dykesk avatar gbarter avatar ptrbortolotti avatar whophil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ccblade's Issues

Skewed-wake correction

Hello,

I have been working with CCBlade for the past few months, and I only added Pitt Peters Skewed wake correction to the inductionFactors Fortran subroutine:

image

However, I have been struggling to apply this correction, since there are no solutions for certain conditions (high yaw angle, high local tip speed ratio, and downwind positions (azimuth between 90 and 180 degrees)) and what I am working on demands that I test these conditions.

I have come up with different ways to come up with approximations for these conditions, but none of them work well.

I know that this is probably not a suitable question for this forum, but I was wondering if you have suggestions to this problem, since you might have face this also in your work.

Best regards,
Miguel

Down,

Description of feature

Describe the feature here and provide some context. Under what scenario would this be useful?

Potential solution

Can you think of ways to implement this?

CCBlade Installation issue LINUX

Hello,
Trying to install WISDEM on ubuntu, when i encountered this issue in CCBlade.
I installed all the requirements using something link this:
sudo apt-get install libblas-dev liblapack-dev etc.

The end log of WISDEM reads:
WISDEM 0.1.1 is already the active version in easy-install.pth
Installed /home/sam/Documents/openmdao-0.10.3.2/WISDEM/src
Attempted to install WISDEM and its sub-plugins: ['Turbine_CostsSE', 'CommonSE', 'Plant_CostsSE', ``'Plant_FinanceSE', 'Plant_EnergySE', 'AeroelasticSE', 'AirfoilPreppy', 'CCBlade', 'DriveSE', ``'DriveWPACT', 'NREL_CSM', 'RotorSE', 'TowerSE', 'pyFrame3DD', 'JacketSE', 'akima', 'pBEAM']
Failed to install: []

Hoping this means all plugins are installed.
I run this test--
(openmdao-0.10.3.2)sam@sam-Linux:~/Documents/openmdao-0.10.3.2/WISDEM$ python src/test/test_turbine_gradients.py

The test output reads:

(openmdao-0.10.3.2)sam@sam-Linux:~/Documents/openmdao-0.10.3.2/WISDEM/src/test$ python test_turbine_gradients.py`` /home/sam/Documents/openmdao-0.10.3.2/lib/python2.7/site-packages/openmdao.main-0.10.3.2-py2.7.egg/openmdao/main/publisher.py:12: VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed.
Install tornado itself to use zmq with the tornado IOLoop.

from zmq.eventloop import zmqstream
Traceback (most recent call last):
File "test_turbine_gradients.py", line 13, in <module> from wisdem.turbinese.turbine import MaxTipDeflection
File "/home/anurag/Documents/openmdao-0.10.3.2/WISDEM/src/wisdem/turbinese/turbine.py", line 15, in <module>
from rotorse.rotor import RotorSE
File "/home/anurag/Documents/openmdao-0.10.3.2/WISDEM/plugins/RotorSE/src/rotorse/rotor.py", line 17, in <module>
from rotoraerodefaults import CCBladeGeometry, CCBlade, CSMDrivetrain, RayleighCDF, WeibullWithMeanCDF
File "/home/anurag/Documents/openmdao-0.10.3.2/WISDEM/plugins/RotorSE/src/rotorse``/rotoraerodefaults.py", line 15, in <module>
from ccblade import CCAirfoil, CCBlade as CCBlade_PY
ImportError: cannot import name CCBlade

CCAirfoil was imported but not CCBlade.
from ccblade import CCAirfoil
ccblade doesnt seem to import CCBlade.

And I get this error, although python zmq is installed.

The following seems to be working-
import wisdem.lcoe.lcoe_csm_assembly

but not:
import wisdem.lcoe.lcoe_se_assembly
import wisdem.turbinese.turbine

Please suggest what went wrong.

down load in windows system

Description of feature

Describe the feature here and provide some context. Under what scenario would this be useful?

Potential solution

Can you think of ways to implement this?

CCBlade Installation

I'm trying to download CCBlade as a stand alone module. In the description it says that the only prerequisite is gfortran, however I also had to install GCC, meson and ninja too.

I wanted to install CCBlade inside a virtual environment, so I created one and began installation. When doing so it asked me to install meson, which I did. I then installed the GCC compiler and put it inside the virtual environment folder (I had some trouble with installing it and just adding it to the system path) Similarly with GFortran. It then asked me to install ninja, which I did. Following this I received the following error:

above
['C:\Users\user1\virtualenvironments\VENV1\Scripts\meson.EXE', 'setup', 'meson_build', '--prefix=C:\Users\user1\Downloads\CCBlade-master\CCBlade-master\meson_build', '-Dpython.purelibdir=.', '-Dpython.platlibdir=.']
below
['C:\Users\user1\virtualenvironments\VENV1\Scripts\meson.EXE', 'compile', '-vC', 'meson_build']
ninja: Entering directory `C:/Users/user1/Downloads/CCBlade-master/CCBlade-master/meson_build'
[1/6] "C:\Users\user1\virtualenvironments\VENV1\Scripts\python.EXE" "-m" "numpy.f2py" "../ccblade/src/bem.f90" "-m" "_bem" "--lower" "--build-dir" "ccblade"
Reading fortran codes...
Reading file '../ccblade/src/bem.f90' (format:free)
Post-processing...
Block: _bem
Block: inductionfactors
In: :_bem:../ccblade/src/bem.f90:inductionfactors
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: relativewind
In: :_bem:../ccblade/src/bem.f90:relativewind
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: definecurvature
In: :_bem:../ccblade/src/bem.f90:definecurvature
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: windcomponents
In: :_bem:../ccblade/src/bem.f90:windcomponents
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: thrusttorque
In: :_bem:../ccblade/src/bem.f90:thrusttorque
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: inductionfactors_dv
In: :_bem:../ccblade/src/bem.f90:inductionfactors_dv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: relativewind_dv
In: :_bem:../ccblade/src/bem.f90:relativewind_dv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: windcomponents_dv
In: :_bem:../ccblade/src/bem.f90:windcomponents_dv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: definecurvature_dv
In: :_bem:../ccblade/src/bem.f90:definecurvature_dv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: thrusttorque_bv
In: :_bem:../ccblade/src/bem.f90:thrusttorque_bv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: definecurvature_bv
In: :_bem:../ccblade/src/bem.f90:definecurvature_bv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: definecurvature_dv2
In: :_bem:../ccblade/src/bem.f90:definecurvature_dv2
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Applying post-processing hooks...
character_backward_compatibility_hook
Post-processing (stage 2)...
Building modules...
Building module "_bem"...
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"
Constructing wrapper function "inductionfactors"...
fzero,a,ap = inductionfactors(r,chord,rhub,rtip,phi,cl,cd,b,vx,vy,[usecd,hubloss,tiploss,wakerotation])
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"
Constructing wrapper function "relativewind"...
alpha,w,re = relativewind(phi,a,ap,vx,vy,pitch,chord,theta,rho,mu)
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"
Constructing wrapper function "definecurvature"...
x_az,y_az,z_az,cone,s = definecurvature(r,precurve,presweep,precone,[n])
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"
Constructing wrapper function "windcomponents"...
vx,vy = windcomponents(r,precurve,presweep,precone,yaw,tilt,azimuth,uinf,omegarpm,hubht,shearexp,[n])
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"

" I'm not familiar with fortran and so I'm not sure how to progress with the install. If you could provide any insight into what I'm doing wrong, This would be greatly appreciated.

Malloc incorrect cheksum for freed object

Hi,

Thanks for making this software available freely. Unfortunately the unit test python test/test_ccblade.py fails with the error:

python(2482,0x7fff7c7dc000) malloc: *** error for object 0x7fd553746d88: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Abort trap: 6

Subsequently the unit test python test/test_gradients.py fails with:

~/Documents/Coding/Python/BEM/lib/python2.7/site-packages/CCBlade-1.1.1-py2.7-macosx-10.11-intel.egg/ccblade.py:363: RuntimeWarning: invalid value encountered in double_scalars dRe_dx = np.array([0.0, Re/chord, 0.0, Re*Vx/W**2, Re*Vy/W**2, 0.0, 0.0, 0.0, 0.0]) unexpected array size: new_size=9, got array with arr_size=-2251795519242240 ESegmentation fault: 11

What can I do to resolve these errors?

Trouble running CCBlade

The unit test for the gradients fails, see A).
The tutorial works up to the point where dNp and dTp are calculated, see B).

A)

Matias@MATIAS-PC C:\CCBlade-master
$ python test\test_gradients.py

...F...................................................................

FAIL: test_dRhub1 (main.TestGradients)

Traceback (most recent call last):
File "test\test_gradients.py", line 379, in test_dRhub1
np.testing.assert_allclose(dNp_dRhub_fd, dNp_dRhub, rtol=1e-5, atol=1e-7)
File "C:\WinPython_32bit_27_10_1\python-2.7.10\lib\site-packages\numpy\testing\utils.py", line 1297, in assert_allclose
verbose=verbose, header=header)
File "C:\WinPython_32bit_27_10_1\python-2.7.10\lib\site-packages\numpy\testing\utils.py", line 665, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=1e-05, atol=1e-07

(mismatch 100.0%)
x: array([[ -5.791395e+00],
[ -2.695933e-01],
[ -2.843194e-03],...
y: array([[ -5.791389e+000],
[ -2.695926e-001],
[ -2.843172e-003],...


Ran 71 tests in 25.005s

FAILED (failures=1)

Matias@MATIAS-PC C:\CCBlade-master
$

B)

Matias@MATIAS-PC C:\CCBlade-master\test\5MW_AFFiles
$ python Tutorial.py
CP = [ 0.46488091]
CT = [ 0.76926392]
CQ = [ 0.06163229]
Traceback (most recent call last):
File "Tutorial.py", line 208, in
= rotor.distributedAeroLoads(Uinf, Omega, pitch, azimuth)
File "C:\WinPython_32bit_27_10_1\python-2.7.10\lib\site-packages\ccblade-1.1.1-py2.7-win32.egg\ccblade.py", line 529, in distributedAeroLoads
self.pitch = radians(pitch)
TypeError: only length-1 arrays can be converted to Python scalars

Matias@MATIAS-PC C:\CCBlade-master\test\5MW_AFFiles
$

CCBlade unit test fails

The installation of CCBlade is difficult.

Could you please provide more details about the Python software you used on your system?

I installed:

MinGW gfortran Fortran compiler, Python 2.7, NumPy, SciPy, and zope.interface (last 3 for Python 2.7) on my Windows PC.

The installation was successful but I get the following error when I run the unit test "python test/test_ccblade.py" :

Matias@MATIAS-PC C:\CCBlade
$ python test\test_ccblade.py

F

FAIL: test_thrust_torque (main.TestNREL5MW)

Traceback (most recent call last):
File "test\test_ccblade.py", line 117, in test_thrust_torque
np.testing.assert_allclose(Q[idx]/1e6, Qref[idx]/1e3, atol=0.15)
File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line 1297, in assert_allclose
verbose=verbose, header=header)
File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line 665, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=1e-07, atol=0.15

(mismatch 100.0%)
x: array([ 0.770317, 0.500736, 0.424291, 0.357537, 0.296075, 0.257044,
0.324109, 0.397444, 0.262967, 7.985468, 7.890789, 7.829099])
y: array([ 0.0588, 0.2502, 0.5443, 0.9395, 1.4181, 1.9569, 2.4745,
3.0511, 3.8813, 4.1801, 4.1801, 4.1801])


Ran 1 test in 0.983s

FAILED (failures=1)

Matias@MATIAS-PC C:\CCBlade
$

Feeding an array of wind speeds vs. Iterating over the radial position

Hello ,

I have been using CCBlade in my master thesis and I have ran into a problem:

Using the example provided on github, I have set the shear exponent to 0, so that I can choose the wind speeds at each radial and azimuthal positions myself.

For azimuth = 0º, I defined the wind profile for each radial position according to the power law with shear exp = 0.2:

image

Then I compute the distributed loads by iterating the "distributedAeroLoads" method throughout each radial position:

image

And the results I get are the same that the program gives if the shear exponent 0.2 was defined as an input to the CCBlade class.

image

However, if I input "wind_shear" as an array, which is way faster, the results are not the same and don't seem to be correct. Here is a plot of the results for azimuth = 0º:

image

My work involves that I loop over this method and it would be very beneficial for me if I could input the wind speed at each radial position as an array, but the results are not correct. I have gone over the source code, but I am new to programming and cannot figure out what might be wrong. Am I missing something?

Best regards,
Miguel

Gradient unit test and evaluate method

Hi,

I installed CCBlade and it seems to work when running the unittest without gradients (I also tried without creating an instance of CCBlade and CCAirfoil and it seem to work as expected).
But when running the unittest for gradients I get an error for almost all the cases (only showing the last one):

ERROR: test_dpitch3 (__main__.TestGradientsFreestreamArray)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_gradients.py", line 2135, in setUp
    = self.rotor.evaluate(self.Uinf, self.Omega, self.pitch, coefficient=False)
TypeError: evaluate() got an unexpected keyword argument 'coefficient'

----------------------------------------------------------------------

It seems like there might have been an API change from coefficient to coefficients. Adding the s solves that part of the problem.

But the unittest still dose not pass without errors. The last unittest error now looks like:

ERROR: test_dpitch3 (__main__.TestGradientsFreestreamArray)
----------------------------------------------------------------------
Traceback (most recent call last):
 File "test/test_gradients.py", line 2135, in setUp
   = self.rotor.evaluate(self.Uinf, self.Omega, self.pitch, coefficients=False)
ValueError: too many values to unpack (expected 6)

----------------------------------------------------------------------

And by looking into the code it seems like there has been made two changes to the return statement of the evaluate method since the unittest was made.

  1. The flap root bending moment has been added (M, CM)
  2. It returns both coefficients and real values when coefficients=True, opposed to returning only coefficients.

I guess that it is "just" a matter of adding M and CM to the output?
Is there a preferred behaviour for when coefficients=True?

CCBlade Problem with Airfoilprep

During installation either of CCBlade or WISDEM, I always face same problem.
All are related to "airfoilprep".

Problem #1) during installation
Searching for airfoilprep>=0.1
Reading https://pypi.org/simple/airfoilprep/
Couldn't find index page for 'airfoilprep' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
No local packages or working download links found for airfoilprep>=0.1
error: Could not find suitable distribution for Requirement.parse('airfoilprep>=0.1')

Problem #2)during testing test_ccblade
from airfoilprep import Airfoil
ModuleNotFoundError: No module named 'airfoilprep'

I realized there is no clear connection between airfoilprep and CCblade.

Please let me know how to fix this issue.

Thanks.

BR, Kevin

Test Failed (DLL load failed)

Hi, I am trying to launch CCBlade test (test_ccblade.py) but I get the following error:

Traceback (most recent call last):
   File "test/test_ccblade.py", line 20, in <module>
     from ccblade import CCAirfoil, CCBlade
   File "C:\Python36\lib\site-packages\ccblade-1.1.1-py3.6-winmd64.egg\ccblade\__init__.py", line 1, in <module>
     from .ccblade import CCAirfoil, CCBlade
   File "C:\Python36\lib\site-packages\ccblade-1.1.1-py3.6-win-amd64.egg\ccblade\ccblade.py", line 31, in <module>
     import _bem
 ImportError: DLL load failed: Can't find the specified module.

I built CCBlade under Cygwin, I can't find any error message when building the code. Anyone can understand why after an apparently good installation the module is missing?

Installation and unit test fails...

Hi,

am trying to install ccblade on my Mac. I have installed Python 3.5.2 using Anaconda with which I downloaded your mentioned prerequisites. During installation the notable error message is:

warning: no directories found matching 'docs/_build/html'

For the test I also receive an error:

Saschas-MBP:WISDEM-CCBlade-f5b6d83 s.d.e$ python test/test_ccblade.py
Traceback (most recent call last):
File "test/test_ccblade.py", line 20, in
from ccblade import CCAirfoil, CCBlade
File "//anaconda/lib/python3.5/site-packages/CCBlade-1.1.1-py3.5-macosx-10.6-x86_64.egg/ccblade.py", line 1081
print CP, CT, CQ
^
SyntaxError: Missing parentheses in call to 'print'

I have made no alteration to the code in any way. Any help would be much appreciated.

Sascha

Segfault on Ubuntu using gfortran

Hi,

hope this project is still alive. :)
I used gfortran 5.4.0 to compile the bem module.
Both unit tests end in an segmentation fault.
It can be fixed by reverting 21eaeab

error in installation

Dear All,

I have downloaded CCBlade in NREL website, and prepare to install it. Before installation, I have installed the Fortran compiler Parallel Studio XE 2011 with VS 2010, Python 2.7.10, numpy 1.8.1, scipy 0.14.0 and zope.interface. But I received the error massage that I stick below.
default

Thank you.

Yingyu Xu

About the 5MW test case

Hello,I'm having some problems running the 5MW test code. Why are the power curve and thrust curve at high wind speeds lower than the data in the file provided by NREL? The error seems a bit large at high wind speeds?

Install issue

Hello,

I'm getting the following error when using "run setup.py install" from the iPython console, under Windows 10:

"build\temp.win-amd64-2.7\Release\src\bem.o : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
An exception has occurred, use %tb to see the full traceback."

Any hints on how could I solve this?

Thank you very much.

Installation on Windows 11

Description

I installed CCBlade following these instructions http://wisdem.github.io/CCBlade/installation.html after installing gcc-fortran through Cygwin. When I try to run the test_ccblade.py script to check my installation, I get the following error:

    from ccblade.ccblade import CCBlade, CCAirfoil
  File "C:\Documents\github\wind_energy\env_wt3\Lib\site-packages\ccblade\__init__.py", line 1, in <module>
    from .ccblade import CCAirfoil, CCBlade
  File "C:\Documents\github\wind_energy\env_wt3\Lib\site-packages\ccblade\ccblade.py", line 31, in <module>
    import ccblade._bem as _bem
ImportError: DLL load failed while importing _bem: Das angegebene Modul wurde nicht gefunden.

There is a _bem.cp311-win_amd64.pyd file in ENV\Lib\site-packages\ccblade.

Could you help me solve this issue? Thank you in advance.

Code versions

  • Python 3.11.2
  • CCBlade 1.3

CCblade and utf8 codec error

I earlier wrote in ccblade running error in this post. I received the following error from CCblade:
ModuleNotFoundError: No module named '_bem'

After that I decided follow the wisdem install instructions very close, that make sure I get CCBlade installed properly. I tryed to install only CommonSE, Airfil Preppy, Akima, and CCBlade (from the Wisdem library).

However I have met with the following new error in the step 6 (when installing CommonSE, Akima, and CCBlade; Airfoil Preppy was installed successfully):

File "C:\Users\843E~1\AppData\Local\conda\conda\envs\gwt-devenv\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 298, in generate_def if _START.match(dump[i].decode()): UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 114: invalid continuation byte

I repeated it at other computer and received the same error. I tryed also to change numpy versions (because the error related something with mingw32ccompiler file), but it have not help.

Errors importing Aerodyn files

I am trying to use CCBlade to create CP/CT tables for the CART3 turbine using CART3 airfoil data. However, I get some errors when trying to import the Aerodyn files. One error appears to occur during the spline fitting process:

Traceback (most recent call last): File "/home/schen/code/research/wind_farms/farm_fatigue/cp_ct/gen_table.py", line 34, in <module> airfoil_types[0] = afinit(directory + "AeroData/C3_01-02_Circle.dat") File "/usr/lib/python3.10/site-packages/CCBlade-1.2.0-py3.10-linux-x86_64.egg/ccblade/ccblade.py", line 110, in initFromAerodynFile return cls(alpha, Re, cl, cd, cm=cm) File "/usr/lib/python3.10/site-packages/CCBlade-1.2.0-py3.10-linux-x86_64.egg/ccblade/ccblade.py", line 88, in __init__ self.cl_spline = RectBivariateSpline(alpha, Re, cl, kx=kx, ky=ky, s=0.1) File "/usr/lib/python3.10/site-packages/scipy/interpolate/_fitpack2.py", line 1345, in __init__ nx, tx, ny, ty, c, fp, ier = dfitpack.regrid_smth(x, y, z, xb, xe, yb, dfitpack.error: (1<=kx && kx<=5) failed for 5th keyword kx: regrid_smth:kx=0

while I'm not sure what's causing the other one (some sort of formatting issue?)

Traceback (most recent call last): File "/home/schen/code/research/wind_farms/farm_fatigue/cp_ct/gen_table.py", line 34, in <module> airfoil_types[6] = afinit(directory + "AeroData/C3_08_4S818+3S816.dat") File "/usr/lib/python3.10/site-packages/CCBlade-1.2.0-py3.10-linux-x86_64.egg/ccblade/ccblade.py", line 108, in initFromAerodynFile af = Airfoil.initFromAerodynFile(aerodynFile) File "/usr/lib/python3.10/site-packages/CCBlade-1.2.0-py3.10-linux-x86_64.egg/ccblade/airfoilprep.py", line 589, in initFromAerodynFile cm.append(data[3]) IndexError: list index out of range

The Aerodyn files are supposed to compatible with Aerodyn V13.0.

Thanks in advance for your help!

ModuleNotFoundError: No module named '_bem'

I want to use gym-wind-turbine package. According recommendations ([https://github.com/emerrf/gym-wind-turbine]), I have installed using conda the following tools
(Anaconda)> conda create --name gwt-devenv python=3.6.2 scipy=0.18.1 zope.interface=4.4.2 m2w64-gcc-fortran=5.3.0. All packages (which includes ccblade) were installed successfully.

Howewer, whan I try to run "import gym_wind_turbine", I receive the following error from CCblade:

ModuleNotFoundError: No module named '_bem'

After that I decided to follow the Wisdem installation instructions. However, after these actions, I have also received the same error. Please help me! (My system is Windows 10).

CCBlade running test

Hello
I was trying to install ccblade using the comand python setup.py install, and after the installation was completed I started the test with the comand python test/test_ccblade.py but an error appear
Import Error: DLL load failed: It couldnt to find the esoecified module

If you ccould help me with this, I ll apreciated so much
Im trying to use this program for a research .
Thanks for your time

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.