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

[HydroDyn] Error when reading QTF file .12d for multiple wave headings #2346

Open
getChaos22 opened this issue Jul 25, 2024 · 6 comments
Open

Comments

@getChaos22
Copy link

getChaos22 commented Jul 25, 2024

Hi all,

When I use QTF file .12d with multiple wave headings, OpenFAST will give a error message which is:
image

Part of my .12d file is like:
image

I noticed that on line 20, the real part and imaginary part (column 8 and 9) are truly different from those on line 8, whose frequency and directions are same with line 20.

However, even though I changed column 6 to 9 of line 20 to the same with line 8, the error still exist. Only when I make line 20 totally same with line 8 (as is shown in the following screenshot), the error of line 20 will disappear, and the error of line 21 came out.
image
image

The QTF files I used were not directly obtained by Wamit. Instead, I employed Nemoh to get the QTF results and used BEMRosetta to output Wamit format QTF files. So I'm not sure whether the format of the QTF files I obtained is completely right. Could you give me some information on how the Wamit QTF files (12d and 12s) are like for multiple wave headings?

Thank you.

Chao Li

@getChaos22
Copy link
Author

getChaos22 commented Jul 25, 2024

Hi all,

Even though I still haven't figured out how a correct QTF file with multiple wave directions is like, I do find a place that is not so make sense in the source code of WAMIT2.f90 (Line 4252 ~ Line 4257):
image
I tried to modify this place in a way that I think maybe more reasonable:
image

By doing this, the program can run normally without error.

I would like to know your ideas. Is this the right way to solve this issue?

Thanks

Chao Li

@luwang00
Copy link
Contributor

luwang00 commented Jul 25, 2024

Hi @getChaos22, what you have here does look like a bug. In your original example, I think what happened was that when reading in line 8, OpenFAST tried to automatically populate the entry associated with Line 20. However, it copied the wrong value as shown in your code change. The wrong value triggered an error of miss-matching values when OpenFAST later tried to read line 20. We should get this fixed. Thanks for finding this. Hi @andrew-platt, can you take a quick look at this as well? Thanks!

@andrew-platt
Copy link
Collaborator

Hi @getChaos22, that looks like the correct solution to the issue! I suspect I had a copy/paste error there when I wrote that part of the code 10 years ago. Do you want to make a pull request for this fix?

@getChaos22
Copy link
Author

Hi @andrew-platt
Sure, which branch do you want me to make the pull request?

@andrew-platt
Copy link
Collaborator

@getChaos22, thanks for being willing to do that. Start with the dev branch and make a pull request there. Thanks!

@getChaos22
Copy link
Author

No problem @andrew-platt, please check the pull request and see whether it is ready to merge.

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

No branches or pull requests

4 participants