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

Additional features for the new SeaState module and HydroDyn #1008

Merged
merged 435 commits into from
May 31, 2023

Conversation

luwang00
Copy link
Contributor

@luwang00 luwang00 commented Feb 18, 2022

This Pull request is NOT ready for merging (requires the merging of HaymanConsulting:F/SeaState+ first)

This pull request also supercedes the HydroDyn / SeaState+ pull request from HaymanConsulting (items from that PR are now included here).

r-tests will not pass. Need to update input files based on input file changes. New features have passed preliminary verification: luwang00/feature-test (private repository).

Feature or improvement description

  • Added the Constrained NewWave feature to SeaState.

  • Added WaveMod=7 option to SeaState to enable incident waves based on user specified wave frequency components.

  • Implemented and reenabled all wave stretching options in HydroDyn: no wave stretching (WaveStMod = 0), vertical stretching (WaveStMod = 1), extrapolation stretching (WaveStMod = 2), and Wheeler stretching (WaveStMod = 3). Nodal load smoothing is formulated and implemented to ensure continuous and smooth variation of the wave loads as member nodes enter and exit water.

  • Added the MacCamy-Fuchs diffraction correction to HydroDyn for Morison-only members.

  • Minor updates and bug fixes such as making the wave-radiation convolutional integral in HydroDyn 2nd order accurate.

  • The registry system has been augmented to support Fortran pointers. This allows for sharing of pointers to large data arrays across OpenFAST modules.

  • The wave kinematics functionality of HydroDyn has been separated out into its own module: SeaState. This module is initialized by the glue-code and resulting data is passed via the glue-code to individual modules (i.e., HydroDyn).

  • Wave kinematics are now generated on a 3D grid, which is user-specified in the SeaState input file.

  • Strip-theory Hydrodynamic load calculations can now be performed at the displaced location of the substructure.
    Potential flow (wave excitation loads) can now be computed at the WAMIT body's displaced location.

Related issue, if one exists
#970 (comment)
#847
#844
#842

Impacted areas of the software
HydroDyn => restructuring to split out new SeaState module
HydroDyn => Wave stretching and the MacCamy-Fuchs diffraction correction.
SeaState => Wave stretching, the MacCamy-Fuchs diffraction correction, WaveMod=7 option, and the Constrainted NewWave feature.
FAST glue-code => support for new SeaState module
FAST glude-code => Passing additional pointers and variables from SeaState to HydroDyn to support wave stretching.
FAST Registry => Fortran Pointer support NOTE: This breaks restart functionality

Additional supporting information
Draft documentation of the new features is included:
docs/OtherSupporting/HydroDyn/HydroDyn_MacCamy-Fuchs.docx
docs/OtherSupporting/HydroDyn/HydroDyn_WaveStretching_Plan.docx
docs/OtherSupporting/SeaState/SeaState_Constrained_NewWave.docx
docs/OtherSupporting/SeaState/SeaState_WaveMod7.docx

To do

bjonkman added 12 commits May 31, 2022 11:51
- required adding the SeaState misc vars to some HD types
- Added a warning if the writeOutputs request a position outside of the defined domain
- fix comments regarding where time is in the 4-D arrays (some comments had it in position 4, but it is in position 1)
- there was an extra call to SD_CalcOutput after the transfer and then a copy of some of the transfer codes, so I put the call to SD_CalcOutput inside `Transfer_Structure_to_Opt1Inputs` 
- also fixed some comments in SeaState
Use pointers in `Linear_HD_InputSolve_du`, 'Linear_HD_InputSolve_dy', and 'Linear_MAP_InputSolve_dy' to avoid duplicating code for a differene of 1 mesh

Also moved index routines for SD%y to make their placement consistent with the other modules
- Changed name of optional parameter to `ModName_GetOP` routine from `NeedLogMap` to `NeedPackedOrient` in an attempt to clarify what that does (returns the orientation matrix as a 3-valued vector instead of 9-valued one)
- Made the use of this value consistent in ElastoDyn (all meshes with orientation fields that are packed in the GetOP routine need to have the same value for their  call to `PackMotionMesh`)
- Added the optional `NeedPackedOrient` input to `SD_GetOP`
- Made ED, BD, and SD each pack their arrays the same way in `FAST_DiffInterpOutputs`; otherwise, the linear trim solution does not difference all of the outputs correctly to determine if it has converged
The field is getting set in `WAMIT2_CalcOutput`, but it is not allocated in the `MeshCreate` statement. Seems like that would have caused seg faults...
bjonkman added a commit to bjonkman/matlab-toolbox that referenced this pull request Jun 22, 2022
luwang00 and others added 11 commits June 22, 2022 12:43
This could probably be improved by just plotting the SeaState grid at each time, but this works with the way it was done before.
- moved check for "has ice' from HD to SeaSt (SeaState must have WaveMod=0 and CurrMod=0) in that case
- don't check for WvHiCOff > WvLoCOff if WaveMod = 0,1 or 6
- warn if WvHiCOff is being modified internally
- fix module abbreviation for SeaState in FAST_Subs.f90
- removed some unused variables
@luwang00 luwang00 mentioned this pull request May 17, 2023
5 tasks
andrew-platt and others added 4 commits May 18, 2023 19:41
Ran into an issue during updating the c_bindings interface where I hadn't added SeaState data yet, but triggered a segfault deep in WAMIT2.  Long term we will want to keep this check as we will want the option of running HD without SeaState
@andrew-platt andrew-platt marked this pull request as ready for review May 31, 2023 16:06
@andrew-platt
Copy link
Collaborator

So the regression tests require too much memory for GitHub actions. Since these currently work on standalone systems, we will merge now and do a quick follow-up PR to reduce the memory requirements for all these cases.

andrew-platt added a commit to OpenFAST/r-test that referenced this pull request May 31, 2023
@andrew-platt andrew-platt merged commit ebf22d9 into OpenFAST:dev May 31, 2023
andrew-platt added a commit that referenced this pull request Jun 1, 2023
Reduce memory requirements for regression tests after PR #1008
andrew-platt added a commit to luwang00/openfast that referenced this pull request Jun 5, 2023
@luwang00 luwang00 deleted the dev branch June 8, 2023 22:21
@jjonkman jjonkman added the Module: SeaState SeaState module for wave data generation label Sep 18, 2023
@andrew-platt andrew-platt mentioned this pull request Dec 24, 2024
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: HydroDyn Module: SeaState SeaState module for wave data generation Status: In progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants