Skip to content

Commit 57ad6f9

Browse files
authored
Merge pull request #3325 from luwang00/f/HD_OutAll
Revive the OutAll option of HydroDyn
2 parents 2f7a619 + 52b0082 commit 57ad6f9

12 files changed

Lines changed: 300 additions & 71 deletions

File tree

234 KB
Binary file not shown.

docs/source/user/hydrodyn/input_files.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,9 +898,12 @@ specified in the HYDRODYN section of the driver input file when running
898898
HydroDyn standalone, or by the OpenFAST program when running a coupled
899899
simulation. See :numref:`hd-summary-file` for summary file details.
900900

901-
For this version, **OutAll** must be set to FALSE. In future versions,
902-
setting **OutAll** = TRUE will cause HydroDyn to auto-generate outputs
903-
for every joint and member in the input file.
901+
If **OutAll** is set to TRUE, HydroDyn will output the total strip-theory
902+
forces and moments on each user-defined member and joint, followed by the
903+
forces and moments on each computational node of the strip-theory mesh.
904+
These additional output channels are inserted as additional columns in the
905+
output file independent of any user-requested outputs. See :ref:`hd-outall-option`
906+
for more information.
904907

905908
If **OutSwtch** is set to 1, outputs are sent to a file with the name
906909
``OutRootname.HD.out``. If **OutSwtch** is set to 2, outputs are

docs/source/user/hydrodyn/output_files.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,59 @@ data for a single 6\ **NBody**-by-6\ **NBody** matrix. If **NBodyMod** > 1
166166
(no hydrodynamic coupling), the summary file will contain data for **NBody**
167167
6-by-6 radiation kernal matrices.
168168

169+
.. _hd-outall-option:
170+
171+
**OutAll** Option
172+
~~~~~~~~~~~~~~~~~
173+
174+
If **OutAll** is set to TRUE, HydroDyn will output the total strip-theory
175+
forces and moments on each user-defined member and joint. These are
176+
included as additional columns in the output file independent of any
177+
user-requested outputs. The forces and moments on the members (integrated loads across
178+
all side walls) will be written first. For example, the 6 load components
179+
on the first member in the **MEMBERS** table (the first row of the table)
180+
are given by **M1TotFxi**, **M1TotFyi**, **M1TotFzi**, **M1TotMxi**,
181+
**M1TotMyi**, and **M1TotMzi**. After the member loads, the total lumped
182+
loads on each joint are printed next. For instance, the loads on the first
183+
joint in the **MEMBER JOINTS** table are printed with the column names
184+
**J1TotFxi**, **J1TotFyi**, **J1TotFzi**, **J1TotMxi**, **J1TotMyi**, and
185+
**J1TotMzi**. Note that for these outputs, the members and joints are
186+
simply numbered based on their order of appearance in the respective tables
187+
in the input file, so, as an example, **J2** refers to the joint defined
188+
on the second row of the **MEMBER JOINTS** table. The member and joint
189+
numbering does not follow **MemberID** and **JointID**, nor does it follow
190+
the numbering used with the user-requested member and joint outputs.
191+
192+
The output forces and moments are the total strip-theory loads, including
193+
hydrodynamic, hydrostatic, marine growth, and ballast contributions. If a
194+
member has **PropPot** set to TRUE, the relevant load components will be
195+
omitted for that member and its connecting joints as appropriate. All
196+
force and moment components are resolved in the earth-fixed inertial frame
197+
of reference, and the moments are computed about the instantaneous principal
198+
reference point (PRP), same as the output channels **HydroFxi**,
199+
**HydroFyi**, etc. As a reminder, the PRP is a body-fixed point located at
200+
the earth-fixed origin when the HydroDyn structure is undisplaced. Summing
201+
all member and joint loads gives the total strip-theory loads on the entire
202+
structure.
203+
204+
After the member and joint loads, HydroDyn also outputs the total forces
205+
and moments on each computational node of the HydroDyn strip-theory (Morison)
206+
mesh. This internal mesh is used to map the loads to other structural
207+
modules, such as SubDyn, and contains joint nodes at the user-defined joint
208+
locations followed by member internal nodes created from member discretization.
209+
The force and moment components are again resolved in the earth-fixed inertial
210+
frame of reference. However, the moment on each node is about the node itself,
211+
not about the PRP as with the member and joint load outputs above. Additionally,
212+
the joint mesh nodes can have load contributions from both member side walls
213+
and from the joint/endplates. This is because part of the side-wall loads on
214+
the first and last element of a member can be assignd to the joint nodes. As
215+
a result, the load outputs at the joint nodes do not necessarily match the joint
216+
load outputs above, which do not contain contributions from member side walls.
217+
The nodal load output column names indicate the node number, e.g., **N1TotFxi**,
218+
**N1TotFyi**, **N1TotFzi**, **N1TotMxi**, **N1TotMyi**, and **N1TotMzi** for
219+
the first node. The node numbering follows the **Nodes** table in the HydroDyn
220+
summary file.
221+
169222
Results File
170223
~~~~~~~~~~~~
171224

modules/hydrodyn/src/HydroDyn.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,9 @@ SUBROUTINE HydroDyn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, I
584584

585585
! Were visualization meshes requested?
586586
InputFileData%Morison%VisMeshes = p%VisMeshes
587-
587+
! Additional Morison inputs to be initialized just in case
588+
u%Morison%PtfmRefY = 0.0_ReKi
589+
u%Morison%PRP = [0.0_ReKi,0.0_ReKi,0.0_ReKi]
588590
! Initialize the Morison Element Calculations
589591
CALL Morison_Init(InputFileData%Morison, u%Morison, p%Morison, x%Morison, xd%Morison, z%Morison, OtherState%Morison, &
590592
y%Morison, m%Morison, Interval, InitOut%Morison, ErrStat2, ErrMsg2 )
@@ -1204,14 +1206,11 @@ SUBROUTINE HydroDyn_UpdateStates( t, n, Inputs, InputTimes, p, x, xd, z, OtherSt
12041206
DO i=1,nTime
12051207
CALL Morison_CopyInput(Inputs(i)%Morison, Inputs_Morison(i), MESH_NEWCOPY, ErrStat2, ErrMsg2)
12061208
call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
1207-
! Inputs_Morison(i)%PtfmRefY = Inputs(i)%PtfmRefY
12081209
Inputs_Morison(i)%PtfmRefY = xd%PtfmRefY(i)
1210+
Inputs_Morison(i)%PRP = Inputs(i)%PRPMesh%Position(:,1) + Inputs(i)%PRPMesh%TranslationDisp(:,1)
12091211
END DO
12101212
CALL Morison_CopyInput(Inputs(1)%Morison, u_Morison, MESH_NEWCOPY, ErrStat2, ErrMsg2)
12111213
call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
1212-
! u_Morison%PtfmRefY = Inputs(1)%PtfmRefY
1213-
u_Morison%PtfmRefY = xd%PtfmRefY(1)
1214-
12151214
CALL Morison_Input_ExtrapInterp(Inputs_Morison, InputTimes, u_Morison, t, ErrStat2, ErrMsg2) ! get inputs at time t
12161215
call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
12171216

@@ -1762,6 +1761,7 @@ SUBROUTINE HydroDyn_CalcOutput( Time, u, p, x, xd, z, OtherState, y, m, ErrStat,
17621761

17631762
IF ( u%Morison%Mesh%Committed ) THEN ! Make sure we are using Morison / there is a valid mesh
17641763
u%Morison%PtfmRefY = PtfmRefY
1764+
u%Morison%PRP = u%PRPMesh%Position(:,1)+u%PRPMesh%TranslationDisp(:,1)
17651765
CALL Morison_CalcOutput( Time, u%Morison, p%Morison, x%Morison, xd%Morison, &
17661766
z%Morison, OtherState%Morison, y%Morison, m%Morison, &
17671767
ErrStat2, ErrMsg2, calcMorisonHstLdsLocal )
@@ -1777,9 +1777,9 @@ SUBROUTINE HydroDyn_CalcOutput( Time, u, p, x, xd, z, OtherState, y, m, ErrStat,
17771777
if (Failed()) return
17781778

17791779
! Aggregate the sub-module outputs
1780-
IF (p%Morison%NumOuts > 0) THEN
1780+
IF (p%Morison%NumOuts > 0 .or. p%Morison%OutAll) THEN
17811781
J = p%NumOuts + 1
1782-
DO I=1, p%Morison%NumOuts
1782+
DO I=1, size(p%Morison%OutParam)
17831783
y%WriteOutput(J) = y%Morison%WriteOutput(I)
17841784
J = J + 1
17851785
END DO

modules/hydrodyn/src/HydroDyn.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ typedef ^ ^ INTEGER
6363
typedef ^ ^ INTEGER NUserOutputs - - - "Number of Hydrodyn-level requested output channels" -
6464
typedef ^ ^ CHARACTER(ChanLen) UserOutputs {:} - - "This should really be dimensioned with MaxOutPts" -
6565
typedef ^ ^ INTEGER OutSwtch - - - "Output requested channels to: [1=Hydrodyn.out 2=GlueCode.out 3=both files]" -
66-
typedef ^ ^ LOGICAL OutAll - - - "Output all user-specified member and joint loads (only at each member end, not interior locations) [T/F]" -
6766
typedef ^ ^ INTEGER NumOuts - - - "The number of outputs for this module as requested in the input file" -
6867
typedef ^ ^ CHARACTER(ChanLen) OutList {:} - - "The user-requested output channel labels for this modules. This should really be dimensioned with MaxOutPts" -
6968
typedef ^ ^ LOGICAL HDSum - - - "Generate a HydroDyn summary file [T/F]" -

modules/hydrodyn/src/HydroDyn_Input.f90

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ SUBROUTINE HydroDyn_ParseInput( InputFileName, OutRootName, FileInfo_In, InputFi
12221222
if (Failed()) return;
12231223

12241224
! OutAll - Whether or not to output information for every member and joint
1225-
call ParseVar( FileInfo_In, CurLine, 'OutAll', InputFileData%OutAll, ErrStat2, ErrMsg2, UnEc )
1225+
call ParseVar( FileInfo_In, CurLine, 'OutAll', InputFileData%Morison%OutAll, ErrStat2, ErrMsg2, UnEc )
12261226
if (Failed()) return;
12271227

12281228
! OutSwtch - Specify how to write to an output file
@@ -2804,15 +2804,6 @@ SUBROUTINE HydroDynInput_ProcessInitData( InitInp, Interval, InputFileData, ErrS
28042804
! Data section for OUTPUT
28052805
!-------------------------------------------------------------------------------------------------
28062806

2807-
2808-
! OutAll - output all member and joint data
2809-
2810-
IF ( InputFileData%OutAll ) THEN !TODO: Alter this check once OutAll is supported
2811-
CALL SetErrStat( ErrID_Fatal,'OutAll must be FALSE. Future versions of HydroDyn will once again support values of either TRUE or FALSE.',ErrStat,ErrMsg,RoutineName)
2812-
RETURN
2813-
END IF
2814-
2815-
28162807
! OutSwtch - output file switch
28172808

28182809
IF ( InputFileData%OutSwtch /= 1 .AND. InputFileData%OutSwtch /= 2 .AND. InputFileData%OutSwtch /= 3 ) THEN

modules/hydrodyn/src/HydroDyn_Output.f90

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8887,9 +8887,9 @@ SUBROUTINE HDOUT_Init( HydroDyn_ProgDesc, OutRootName, InputFileData, y, p, m,
88878887
p%OutDec = 1 !TODO: Remove this once the parameter has been added to the HD input file GJH 7/8/2014
88888888

88898889

8890-
IF (ALLOCATED( p%Morison%OutParam ) .AND. p%Morison%NumOuts > 0) THEN
8890+
IF (ALLOCATED( p%Morison%OutParam ) .AND. (p%Morison%NumOuts > 0 .OR. p%Morison%OutAll)) THEN
88918891
hasMorisonOuts = .TRUE.
8892-
p%NumTotalOuts = p%NumTotalOuts + p%Morison%NumOuts
8892+
p%NumTotalOuts = p%NumTotalOuts + size(p%Morison%OutParam)
88938893
END IF
88948894

88958895
! Allocate the aggregate arrays
@@ -8929,7 +8929,7 @@ SUBROUTINE HDOUT_Init( HydroDyn_ProgDesc, OutRootName, InputFileData, y, p, m,
89298929
J = p%NumOuts + 1
89308930

89318931
IF ( hasMorisonOuts ) THEN
8932-
DO I=1, p%Morison%NumOuts
8932+
DO I=1, size(p%Morison%OutParam)
89338933
InitOut%WriteOutputHdr(J) = InitOut%Morison%WriteOutputHdr(I)
89348934
InitOut%WriteOutputUnt(J) = InitOut%Morison%WriteOutputUnt(I)
89358935
J = J + 1
@@ -8982,7 +8982,7 @@ SUBROUTINE HDOut_OpenOutput( HydroDyn_ProgDesc, OutRootName, p, InitOut, ErrSta
89828982
!-------------------------------------------------------------------------------------------------
89838983
p%UnOutFile = -1
89848984
IF ( (ALLOCATED( p%OutParam ) .AND. p%NumOuts > 0 ) .OR. &
8985-
(ALLOCATED( p%Morison%OutParam ) .AND. p%Morison%NumOuts > 0 ) ) THEN ! Output has been requested so let's open an output file
8985+
(ALLOCATED( p%Morison%OutParam ) .AND. (p%Morison%NumOuts > 0 .OR. p%Morison%OutAll) ) ) THEN ! Output has been requested so let's open an output file
89868986

89878987
! Open the file for output
89888988
OutFileName = TRIM(OutRootName)//'.out'
@@ -9013,9 +9013,9 @@ SUBROUTINE HDOut_OpenOutput( HydroDyn_ProgDesc, OutRootName, p, InitOut, ErrSta
90139013
WRITE(p%UnOutFile,Frmt,ADVANCE='no') ( p%Delim, TRIM( InitOut%WriteOutputHdr(I) ), I=1,p%NumOuts )
90149014
END IF
90159015

9016-
IF (ALLOCATED( p%Morison%OutParam ) .AND. p%Morison%NumOuts > 0) THEN
9017-
Frmt = '('//TRIM(Int2LStr(p%Morison%NumOuts))//'(:,A,'//TRIM( p%OutSFmt )//'))'
9018-
WRITE(p%UnOutFile,Frmt,ADVANCE='no') ( p%Delim, TRIM( InitOut%Morison%WriteOutputHdr(I) ), I=1,p%Morison%NumOuts )
9016+
IF (ALLOCATED( p%Morison%OutParam ) .AND. (p%Morison%NumOuts > 0 .OR. p%Morison%OutAll)) THEN
9017+
Frmt = '('//TRIM(Int2LStr(size(p%Morison%OutParam)))//'(:,A,'//TRIM( p%OutSFmt )//'))'
9018+
WRITE(p%UnOutFile,Frmt,ADVANCE='no') ( p%Delim, TRIM( InitOut%Morison%WriteOutputHdr(I) ), I=1,size(p%Morison%OutParam) )
90199019
END IF
90209020

90219021

@@ -9033,9 +9033,9 @@ SUBROUTINE HDOut_OpenOutput( HydroDyn_ProgDesc, OutRootName, p, InitOut, ErrSta
90339033
WRITE(p%UnOutFile,Frmt,ADVANCE='no') ( p%Delim, TRIM( InitOut%WriteOutputUnt(I) ), I=1,p%NumOuts )
90349034
END IF
90359035

9036-
IF (ALLOCATED( p%Morison%OutParam ) .AND. p%Morison%NumOuts > 0) THEN
9037-
Frmt = '('//TRIM(Int2LStr(p%Morison%NumOuts))//'(:,A,'//TRIM( p%OutSFmt )//'))'
9038-
WRITE(p%UnOutFile,Frmt,ADVANCE='no') ( p%Delim, TRIM( InitOut%Morison%WriteOutputUnt(I) ), I=1,p%Morison%NumOuts )
9036+
IF (ALLOCATED( p%Morison%OutParam ) .AND. (p%Morison%NumOuts > 0 .OR. p%Morison%OutAll)) THEN
9037+
Frmt = '('//TRIM(Int2LStr(size(p%Morison%OutParam)))//'(:,A,'//TRIM( p%OutSFmt )//'))'
9038+
WRITE(p%UnOutFile,Frmt,ADVANCE='no') ( p%Delim, TRIM( InitOut%Morison%WriteOutputUnt(I) ), I=1,size(p%Morison%OutParam) )
90399039
END IF
90409040

90419041

0 commit comments

Comments
 (0)