-
Notifications
You must be signed in to change notification settings - Fork 507
New wavetank library for HIL simulations with AD+MD #3065
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
Conversation
This reverts commit 7a21c0b.
This reverts commit 76d7d57.
This reverts commit 3b9db94.
This reverts commit 6d34d28.
This reverts commit d6f6321.
This reverts commit 1d07a3f.
This reverts commit 895ec6f.
This reverts commit 77efd85.
This reverts commit 0a212c3.
This reverts commit 26143a6.
This reverts commit 4e0ace3.
…ction"" This reverts commit 794e94d.
This reverts commit b9b0d21.
This reverts commit 1005f47.
This reverts commit dd40353.
This reverts commit 93a33fd.
This reverts commit c0a607c.
This reverts commit 609acfa.
This reverts commit 4bc88df.
This reverts commit 70370c8.
This reverts commit 565837e.
This reverts commit c34b688.
This reverts commit 47200a4.
This reverts commit 11d9af7.
This reverts commit 6c9acd2.
This reverts commit 24ead49.
This reverts commit a89ef35.
This reverts commit f936833.
30367e6 to
e159244
Compare
Without this approach, errors occur when making the _C_Binding.f90 for static and shared in parallel.
e159244 to
d0fb325
Compare
2cb508b to
224e772
Compare
Error handling in CalcLoadsAtWRP was not initialized
a393933 to
9ca10b3
Compare
Initial commit, it doesn't work yet. Restructuring required.
There is a huge initial transient that needs addressing at some point
43c0c4b to
3a79346
Compare
copy of files from MHK_RM1_Floating_Tank-scaled case -- GH actions doesn't have this case copied in the integrations test
2d0357e to
44171ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new wavetank library for Hardware-in-the-Loop (HIL) simulations integrating AeroDyn (AD), MoorDyn (MD), and SeaState (SS) modules. The changes enable wave tank testing capabilities with phase-shifted wave fields for hybrid testing scenarios.
Key changes:
- Added
WaveTimeShiftparameter to SeaState for phase-shifting wave fields in tank testing - Converted
CU(console unit) from parameter to variable to support output redirection to files (LabView integration) - Refactored C-binding interfaces for SeaState, MoorDyn, and AeroDyn to support static linking for wavetank library
- Added Python interface and test infrastructure for wavetank functionality
Reviewed changes
Copilot reviewed 58 out of 60 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| requirements.txt | Added nptdms package for TDMS file reading |
| modules/seastate/src/*.f90 | Added WaveTimeShift parameter and updated C-binding interface |
| modules/moordyn/src/*.f90 | Improved error handling and C-binding updates |
| modules/nwtc-library/src/Sys*.f90 | Changed CU from parameter to public variable with SetConsoleUnit |
| modules/aerodyn/src/*.f90 | Updated C-binding interface and VTK timing logic |
| glue-codes/python/pyOpenFAST/*.py | Added wavetank testing interface and TDMS library support |
| glue-codes/labview/src/*.f90 | New wavetank structural model and interface code |
Comments suppressed due to low confidence (3)
modules/seastate/src/SeaState_Types.f90:1
- The default value initialization uses integer
0instead of double precision0.0_DbKi. This should be0.0_DbKito match the type declaration.
modules/seastate/src/SeaSt_WaveField_Types.f90:1 - The default value initialization uses integer
0instead of double precision0.0_R8Ki. This should be0.0_R8Kito match the type declaration.
reg_tests/executeWavetankPyRegressionCase.py:1 - The help text mentions 'InflowWind driver executable' but the metavar is 'WaveTank-Python', which is confusing and inconsistent with the actual purpose.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This is incomplete documentation - hopefully better than nothing.
c58614e to
01ad8b5
Compare
deslaughter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good, impressive work!
Ready for merging
Feature or improvement description
The WaveTank glue-code is an experimental code for coupling hardware-in-the-loop MHK models in a wavetank to software simulating the MHK turbine loads that cannot be physically modeled in the wave tank. The OpenFAST modules SeaState, AeroDyn, MoorDyn, and InflowWind are statically linked into a single dynamic library (
cmaketargetwavetanktesting_c_binding) with a c-binding based interface. This library can be called from LabView or another code.Related issue, if one exists
#2720
#2735
Impacted areas of the software
Updates to following modules and interfaces:
AeroDyn_Inflow_C_BindinglibraryHydroDynHydroDyn_CalcOutputroutineMoorDyn_C_BindinglibrarySeaState_C_BindinglibraryTMaxinstead of number of timestepsWaveTimeShiftfor advancing wavefield in time (cannot delay)pyOpenFASTtdmslib.pyfor readingtdmsfiles from LabViewNWTC_LibraryCUto a different value for writing to file instead of output to screen (used with LabView)Incomplete items and limitations
Additional supporting information
This code is still a work in progress and should not be considered usable for generic cases.
Test results, if applicable
New test cases:
glue-codes/openfast/MHK_RM1_Floating_Tank-scaled- 1/49th scale version of theMHK_RM1_Floatingcase. This is a reference case.glue-codes/other/py_wavetank_test1- 1/49th scale version of theMHK_RM1_Floatingcase using Python to call the wavetank library. Prescribed motion from a wave tank simulation of the RM1 is used as the motion input. This case can be used as a template