WISDEM / RAFT

A frequency-domain dynamics model for floating wind turbines
https://openraft.readthedocs.io
Apache License 2.0
40 stars 21 forks source link

Setting potModMaster to 0 #24

Open Kalimerist opened 1 year ago

Kalimerist commented 1 year ago

Hello,

I am trying to run the example file for the VolturnUS floater in RAFT on linux (on HPC cluster, centOS linux 7). When potModMaster value is 1 (no BEM application), the code runs properly. However, when potModMaster is switched to 0 (BEM application) then I get the following error (see attached).

Some relevant information: -python version: 3.9 -numpy: 1.23.5. I had to downgrade from the initial version (1.24), as the np.int in the member2pnl.py is deprecated in 1.24.

Thanks a lot!

image

gbarter commented 1 year ago

I believe this is fixed in pending PR #23 into the dev-branch

vbenifla commented 11 months ago

Hello,

Similarly I was trying to run the example file for the VolturnUS floater in RAFT (on windows) and I had the same problem when setting the potModMaster value to 0 (when it is set to 1 all good though, as no HAMS) and the same error as the one attached.

I have looked to the pull request mentioned, however I didn't identify any fixed related to that issue and still had the same problem. Since the error is a Fortran runtime error, I have looked at the pyHams repo to find more information on this issue but I didn't. (or maybe sorry I didn't look at the right place....)

It seems that when using the VolturnUS floater the lowest frequency to consider, also the frequency bin width, is set to 0.001 Hz leading to 0.006283185307179587 rad/s. This value is written in the Input/ControlFile.in, and apparently the "Frequency_step" is too long to be read with the formater given to the read command in the fortran code. Without altering the fortran code, one can modify the python wrapper pyhams.py and the write_control_file function at ligne 291 and remove the tabulation in the string written such as:

f.write(f'    Frequency_step  {dFreq}D0\n')

instead of

f.write(f'    Frequency_step          {dFreq}D0\n')

There is another issue later on with the wave headings, the "numHeadings" which is by default equal to 1 when using RAFT and so in the control file it is expected to have a list of headings where as only one value is given. On has to make sure to force the numHeadings value to -1 if you want just one heading to be considered.

And now the raft examples should run fine with HAMS. Hope it helps !