Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting potModMaster to 0 #24

Open
Kalimerist opened this issue Jan 31, 2023 · 2 comments
Open

Setting potModMaster to 0 #24

Kalimerist opened this issue Jan 31, 2023 · 2 comments

Comments

@Kalimerist
Copy link

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
Copy link
Member

gbarter commented Jan 31, 2023

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

@vbenifla
Copy link

vbenifla commented Jul 27, 2023

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants