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

More updates to the Morison module #1578

Merged
merged 31 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6b22a9c
HD: Initial implementation of the hydrostatic/buoyancy Cb coefficient…
luwang00 Mar 21, 2023
bc56f94
HD: Added validity check for the new Cb inputs
luwang00 Mar 22, 2023
578134b
HD: Switch from scaling nodal hydrostatic load to scaling member radi…
luwang00 Mar 22, 2023
e08064a
HD: Clean up Cb implementation
luwang00 Mar 22, 2023
f5f81cc
Added Cb entries to the HydroDyn summary file.
luwang00 Mar 24, 2023
0f9892c
Reorganize Morison_CalcOutput
luwang00 Apr 6, 2023
ef5cadd
Bug fix for the GetFreeSurfaceNormal subroutine in Morison_CalcOutput
luwang00 Apr 7, 2023
ca712a9
Added new subroutines in Morison_CalcOutput to get the intersections …
luwang00 Apr 7, 2023
d8d93bd
Ignore free-surface elevation when finding the intersection between m…
luwang00 Apr 7, 2023
5b102ad
Initial implementation of the alternative hydrostatic load calculation
luwang00 Apr 8, 2023
d77de72
Clean up the implementation of the alternative hydrostatic load calcu…
luwang00 Apr 8, 2023
20665d5
Fixed some error handling in Morison_CalcOutput
luwang00 Apr 8, 2023
44bc757
Merge branch 'dev' into feature/AltHstMod
luwang00 Apr 19, 2023
3c4b719
Upgraded the alternative hydrostatic load calculation with adaptive i…
luwang00 Apr 20, 2023
768cbce
Modified the adapative hydrostatic load integration to avoid prematur…
luwang00 Apr 21, 2023
78f1b2e
Quick fix to the new hydrostatic load calculation
luwang00 Apr 21, 2023
c821d60
Merge branch 'dev' into feature/AltHstMod
luwang00 Apr 28, 2023
1ecf47c
Created a subroutine for MHstLMod = 1
luwang00 May 2, 2023
5111a28
Clean up the hydrostatic load section
luwang00 May 2, 2023
6e6c019
Bug fix for hydrostatic loads on end plates
luwang00 May 3, 2023
03b645c
Clean up Morison_CalcOutput
luwang00 May 5, 2023
96191da
Updates to hydrodynamic side load calculation in Morison_CalcOutput
luwang00 May 6, 2023
a5faafb
Bug Fix: MemSubStat set incorrectly in Morison_CalcOutput
luwang00 May 6, 2023
952d65a
HD: Remove lines no longer needed in Morison_CalOutput
luwang00 May 6, 2023
6dc785b
Merge branch 'feature/AltHstMod' into dev2
luwang00 May 10, 2023
1ab9ca2
Merge branch 'dev' into dev2
luwang00 May 17, 2023
c6d8f50
Merge branch 'dev' into dev2
luwang00 May 23, 2023
58d2002
Merge branch 'dev' into dev2
luwang00 May 31, 2023
b78761a
Merge remote-tracking branch 'upstream/dev' into dev2
luwang00 Jun 1, 2023
c96130e
Update r-test pointer
andrew-platt Jun 5, 2023
2c6dd2b
Update api-change.rst (includes notes for #1008)
andrew-platt Jun 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/source/user/api_change.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ The changes are tabulated according to the module input file, line number, and f
The line number corresponds to the resulting line number after all changes are implemented.
Thus, be sure to implement each in order so that subsequent line numbers are correct.

OpenFAST v3.5.0 to OpenFAST dev
----------------------------------

The HydroDyn module was split into HydroDyn and SeaState. This results in a
completely new input file for SeaState, and complete revision of the HydroDyn
input file. See examples in the regression tests for the new formats.

============================================= ==== ==================== ========================================================================================================================================================================================================
Modified in OpenFAST `dev`
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Module Line Flag Name Example Value
============================================= ==== ==================== ========================================================================================================================================================================================================
HydroDyn all Complete restructuring of input file
SeaState all New module (split from HydroDyn, so contains some inputs previously found in HydroDyn)
============================================= ==== ==================== ========================================================================================================================================================================================================


OpenFAST v3.4.0 to OpenFAST v3.5.0
----------------------------------

Expand Down
55 changes: 50 additions & 5 deletions modules/hydrodyn/src/HydroDyn_Input.f90
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ SUBROUTINE HydroDyn_ParseInput( InputFileName, OutRootName, FileInfo_In, InputFi
CurLine = CurLine + 1


CALL AllocAry( tmpReArray, 12, 'temporary array for Simple hydrodynamic coefficients', ErrStat2, ErrMsg2 )
CALL AllocAry( tmpReArray, 14, 'temporary array for Simple hydrodynamic coefficients', ErrStat2, ErrMsg2 )
if (Failed()) return
! call ParseAry( FileInfo_In, CurLine, 'Simple hydrodynamic coefficients table row '//trim( Int2LStr(I)), tmpReArray, size(tmpReArray), ErrStat2, ErrMsg2, UnEc )
! if (Failed()) return;
Expand All @@ -508,6 +508,8 @@ SUBROUTINE HydroDyn_ParseInput( InputFileName, OutRootName, FileInfo_In, InputFi
InputFileData%Morison%SimplAxCaMG = tmpReArray(10)
InputFileData%Morison%SimplAxCp = tmpReArray(11)
InputFileData%Morison%SimplAxCpMG = tmpReArray(12)
InputFileData%Morison%SimplCb = tmpReArray(13)
InputFileData%Morison%SimplCbMG = tmpReArray(14)

if (allocated(tmpReArray)) deallocate(tmpReArray)

Expand All @@ -529,7 +531,7 @@ SUBROUTINE HydroDyn_ParseInput( InputFileName, OutRootName, FileInfo_In, InputFi

IF ( InputFileData%Morison%NCoefDpth > 0 ) THEN

CALL AllocAry( tmpReArray, 13, 'temporary array for CoefDpths', ErrStat2, ErrMsg2 )
CALL AllocAry( tmpReArray, 15, 'temporary array for CoefDpths', ErrStat2, ErrMsg2 )
if (Failed()) return;

! Allocate memory for depth-based coefficient arrays
Expand Down Expand Up @@ -561,6 +563,8 @@ SUBROUTINE HydroDyn_ParseInput( InputFileName, OutRootName, FileInfo_In, InputFi
InputFileData%Morison%CoefDpths(I)%DpthAxCaMG = tmpReArray(11)
InputFileData%Morison%CoefDpths(I)%DpthAxCp = tmpReArray(12)
InputFileData%Morison%CoefDpths(I)%DpthAxCpMG = tmpReArray(13)
InputFileData%Morison%CoefDpths(I)%DpthCb = tmpReArray(14)
InputFileData%Morison%CoefDpths(I)%DpthCbMG = tmpReArray(15)
END DO

DO I = 2,InputFileData%Morison%NCoefDpth
Expand Down Expand Up @@ -593,7 +597,7 @@ SUBROUTINE HydroDyn_ParseInput( InputFileName, OutRootName, FileInfo_In, InputFi

IF ( InputFileData%Morison%NCoefMembers > 0 ) THEN

CALL AllocAry( tmpReArray, 25, 'temporary array for CoefMembers', ErrStat2, ErrMsg2 )
CALL AllocAry( tmpReArray, 29, 'temporary array for CoefMembers', ErrStat2, ErrMsg2 )
if (Failed()) return;

! Allocate memory for Member-based coefficient arrays
Expand Down Expand Up @@ -637,6 +641,10 @@ SUBROUTINE HydroDyn_ParseInput( InputFileName, OutRootName, FileInfo_In, InputFi
InputFileData%Morison%CoefMembers(I)%MemberAxCp2 = tmpReArray(23)
InputFileData%Morison%CoefMembers(I)%MemberAxCpMG1 = tmpReArray(24)
InputFileData%Morison%CoefMembers(I)%MemberAxCpMG2 = tmpReArray(25)
InputFileData%Morison%CoefMembers(I)%MemberCb1 = tmpReArray(26)
InputFileData%Morison%CoefMembers(I)%MemberCb2 = tmpReArray(27)
InputFileData%Morison%CoefMembers(I)%MemberCbMG1 = tmpReArray(28)
InputFileData%Morison%CoefMembers(I)%MemberCbMG2 = tmpReArray(29)
END DO

if (allocated(tmpReArray)) deallocate(tmpReArray)
Expand Down Expand Up @@ -675,7 +683,8 @@ SUBROUTINE HydroDyn_ParseInput( InputFileName, OutRootName, FileInfo_In, InputFi
READ(Line,*,IOSTAT=ErrStat2) InputFileData%Morison%InpMembers(I)%MemberID, InputFileData%Morison%InpMembers(I)%MJointID1, &
InputFileData%Morison%InpMembers(I)%MJointID2, InputFileData%Morison%InpMembers(I)%MPropSetID1, &
InputFileData%Morison%InpMembers(I)%MPropSetID2, InputFileData%Morison%InpMembers(I)%MDivSize, &
InputFileData%Morison%InpMembers(I)%MCoefMod, InputFileData%Morison%InpMembers(I)%PropPot
InputFileData%Morison%InpMembers(I)%MCoefMod, InputFileData%Morison%InpMembers(I)%MHstLMod, &
InputFileData%Morison%InpMembers(I)%PropPot
IF ( ErrStat2 /= 0 ) THEN
ErrStat2 = ErrID_Fatal
ErrMsg2 = 'Error reading members table row '//trim( Int2LStr(I))//', line ' &
Expand Down Expand Up @@ -1816,6 +1825,14 @@ SUBROUTINE HydroDynInput_ProcessInitData( InitInp, Interval, InputFileData, ErrS
CALL SetErrStat( ErrID_Fatal,'SimplAxCaMG must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
IF ( InputFileData%Morison%SimplCb < 0 ) THEN
CALL SetErrStat( ErrID_Fatal,'SimplCb must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
IF ( InputFileData%Morison%SimplCbMG < 0 ) THEN
CALL SetErrStat( ErrID_Fatal,'SimplCbMG must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
!TODO: Do we need a test for AxCp

!-------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -1893,6 +1910,14 @@ SUBROUTINE HydroDynInput_ProcessInitData( InitInp, Interval, InputFileData, ErrS
CALL SetErrStat( ErrID_Fatal,'In the Depth-based hydrodynamic coefficients table, DpthAxCpMG must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
IF ( InputFileData%Morison%CoefDpths(I)%DpthCb < 0 ) THEN
CALL SetErrStat( ErrID_Fatal,'In the Depth-based hydrodynamic coefficients table, DpthCb must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
IF ( InputFileData%Morison%CoefDpths(I)%DpthCbMG < 0 ) THEN
CALL SetErrStat( ErrID_Fatal,'In the Depth-based hydrodynamic coefficients table, DpthCbMG must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
END DO

! TODO: Sort the table based on depth so that a linear interpolation can be easily performed between entries.
Expand Down Expand Up @@ -1971,6 +1996,22 @@ SUBROUTINE HydroDynInput_ProcessInitData( InitInp, Interval, InputFileData, ErrS
CALL SetErrStat( ErrID_Fatal,'In the member-based hydrodynamic coefficients table, MemberCaMG2 must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
IF ( InputFileData%Morison%CoefMembers(I)%MemberCb1 < 0 ) THEN
CALL SetErrStat( ErrID_Fatal,'In the member-based hydrodynamic coefficients table, MemberCb1 must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
IF ( InputFileData%Morison%CoefMembers(I)%MemberCb2 < 0 ) THEN
CALL SetErrStat( ErrID_Fatal,'In the member-based hydrodynamic coefficients table, MemberCb2 must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
IF ( InputFileData%Morison%CoefMembers(I)%MemberCbMG1 < 0 ) THEN
CALL SetErrStat( ErrID_Fatal,'In the member-based hydrodynamic coefficients table, MemberCbMG1 must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
IF ( InputFileData%Morison%CoefMembers(I)%MemberCbMG2 < 0 ) THEN
CALL SetErrStat( ErrID_Fatal,'In the member-based hydrodynamic coefficients table, MemberCbMG2 must be greater or equal to zero.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF
END DO

END IF
Expand Down Expand Up @@ -2115,12 +2156,16 @@ SUBROUTINE HydroDynInput_ProcessInitData( InitInp, Interval, InputFileData, ErrS
END IF
END IF

IF ( InputFileData%Morison%InpMembers(I)%MHstLMod /= 0 .AND. InputFileData%Morison%InpMembers(I)%MHstLMod /= 1 .AND. InputFileData%Morison%InpMembers(I)%MHstLMod /= 2 ) THEN
CALL SetErrStat( ErrID_Fatal,'MHstLMod must be 1 for column-type hydrostatic load calculation or 2 for ship-like calculation.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF

IF ( InputFileData%Morison%InpMembers(I)%PropPot .AND. InputFileData%PotMod == 0 ) THEN
CALL SetErrStat( ErrID_Fatal,'A member cannot have PropPot set to TRUE if PotMod = 0 in the FLOATING PLATFORM section.',ErrStat,ErrMsg,RoutineName)
RETURN
END IF



END DO

Expand Down
Loading