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 WaveMod=6 Kinematics Read Bug #1229

Closed
Sam-Ramsahoye opened this issue Aug 25, 2022 · 5 comments
Closed

HydroDyn WaveMod=6 Kinematics Read Bug #1229

Sam-Ramsahoye opened this issue Aug 25, 2022 · 5 comments

Comments

@Sam-Ramsahoye
Copy link

Sam-Ramsahoye commented Aug 25, 2022

Hi,

I'm having issues using WaveMod=6.

I've been playing around with this using the conda install of openfast (both 3.1 and 3.2) on a Linux machine.

I have a very clean process for defining the 8 input files. I run HydroDyn, extract the internal nodes, and then define my kinematics/pressures on them in an automated way (+ the surface elevation file), having taking guidance from previous forum discussions and the old CertTest folders.

For cases with a low number of internal nodes (<100), everything seems to work fine and my loads perfectly match the simple WaveMode=2 HydroDyn Airy wave cases I'm trying to validate against. However, as the number of internal nodes increases, and as so do the number of columns in the kinematic and pressure input files, the file reading becomes quite temperamental. Moreover, the number of columns that I can get safely read seems to depend to an extent on formatting/precision.

I'm struggled with this for many hours today but can't come up with a good set of rules for when I would expect it to work. To be clear, I'm 99% sure I've got the input file format down: it works very well for small problems (<100 nodes).

Ultimately, I'd like to be able to do this with a jacket, potentially with 1000s of internal nodes. Can anyone help? I'm considering replacing the string-to-array function ("ReadCAryFromStr" from NWTC - it's this that seems to "break") with my own to get the job done as I believe that's the issue but I'm not overly great with Fortran so I'd like to save myself that if I can.

Can anyone help?

Best wishes,
Sam

@andrew-platt
Copy link
Collaborator

Hi Sam,

Can you attach a copy of one of your failing WaveMod=6 kinematic input files with more than 100 nodes?

It is very likely that there is an issue in the parsing of this file when any input line is long (such as more than 1024 characters -- I don't remember the exact limit).

Regards,
Andy

@Sam-Ramsahoye
Copy link
Author

Hi Andy,

Thanks so much for your response.

Please see attached a working (coarse) and not working (fine) version of my WaveMod=6 setup using the HydroDyn driver.
for_andy.zip

If it is a input line length issue, is there anything I can do re recompilation?

Best,
Sam

@andrew-platt
Copy link
Collaborator

andrew-platt commented Aug 25, 2022

Hi Sam,

In the hydrodyn/src/UserWaves.f90 file, change character array size in line 947 from
CHARACTER(2048) :: TextLine !< One line of text read from the file
to a larger number such as
CHARACTER(4096) :: TextLine !< One line of text read from the file
then recompile. This is in the function ExtractFields.

You may need to make that much larger depending on how long the line is. In principle this can be a very large number, but it was set to what we initially thought would be a reasonable size.

Hope this helps,
Andy

@Sam-Ramsahoye
Copy link
Author

Thanks Andy, I’ll give that a try tomorrow.

Best,
Sam

@Sam-Ramsahoye
Copy link
Author

That fix worked Andy! Thanks very much :)

Best,
Sam

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

2 participants