Skip to content

Commit 27f8fd0

Browse files
authored
Merge pull request #3322 from RBergua/SoilDyn_remove_flag_SlDNonLinearForcePortionOnly
SoilDyn: Remove flag SlDNonLinearForcePortionOnly
2 parents e292567 + 501b94e commit 27f8fd0

7 files changed

Lines changed: 10 additions & 41 deletions

File tree

modules/openfast-library/src/FAST_Subs.f90

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,10 +893,9 @@ SUBROUTINE FAST_InitializeAll( t_initial, m_Glue, p_FAST, y_FAST, m_FAST, ED, SE
893893
return
894894
end if
895895

896-
! Initialization input
896+
! Initialization input
897897
Init%InData_SlD%InputFile = p_FAST%SoilFile
898898
Init%InData_SlD%RootName = p_FAST%OutFileRoot
899-
Init%InData_SlD%SlDNonLinearForcePortionOnly = .true. ! SoilDyn will only return the Non-Linear portion of the reaction force
900899
Init%InData_SlD%WtrDpth = p_FAST%WtrDpth
901900

902901
! Initialize SoilDyn
@@ -908,13 +907,13 @@ SUBROUTINE FAST_InitializeAll( t_initial, m_Glue, p_FAST, y_FAST, m_FAST, ED, SE
908907
if (Failed()) return
909908

910909
! Pass nonlinear flag to SubDyn: true only when REDWIN DLL is active (CalcOption=3)
911-
Init%InData_SD%SlDNonLinear = SlD%p%UseREDWINinterface ! REDWIN DLL returning nonlinear soil reaction forces
910+
Init%InData_SD%SlDNonLinear = SlD%p%UseREDWINinterface ! REDWIN DLL returning nonlinear soil reaction forces
912911

913912
! Add module to list of modules, return on error
914913
CALL MV_AddModule(m_Glue%ModData, Module_SlD, 'SlD', 1, dt_module, p_FAST%DT, &
915914
Init%OutData_SlD%Vars, p_FAST%Linearize, ErrStat2, ErrMsg2)
916915
if (Failed()) return
917-
916+
918917
end select
919918

920919
!----------------------------------------------------------------------------

modules/soildyn/src/SoilDyn.f90

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ subroutine SlD_Init(InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOut
111111

112112
! The linear soil stiffness is passed directly to SubDyn as a stiffness matrix (not as a load)
113113
! The nonlinear portion of reaction forces is only computed when REDWIN DLL is active and passed as loads.
114-
p%SlDNonLinearForcePortionOnly = InitInp%SlDNonLinearForcePortionOnly
115114
call WrScr(' SoilDyn: linear stiffness passed directly to SubDyn as a stiffness matrix')
116115
if (p%CalcOption == Calc_REDWIN) call WrScr(' SoilDyn: nonlinear soil reaction loads computed by REDWIN')
117116

@@ -589,9 +588,7 @@ subroutine SlD_CalcOutput(t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg)
589588
Displacement(4:6) = GetSmllRotAngs(u%SoilMesh%Orientation(1:3, 1:3, i), ErrStat2, ErrMsg2); if (Failed()) return;
590589
! Calculate reaction with F = k*dX
591590
m%ForceTotal(1:6, i) = matmul(p%Stiffness(1:6, 1:6, i), Displacement)
592-
if (p%SlDNonLinearForcePortionOnly) then
593-
ForceLinear = matmul(p%Stiffness(1:6, 1:6, i), Displacement)
594-
end if
591+
ForceLinear = matmul(p%Stiffness(1:6, 1:6, i), Displacement)
595592

596593
! TODO: add damping term effects here
597594

@@ -600,10 +597,8 @@ subroutine SlD_CalcOutput(t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg)
600597
y%SoilMesh%Moment(1:3, i) = -real(m%ForceTotal(4:6, i), ReKi)
601598

602599
! Subtract out the linear piece here
603-
if (p%SlDNonLinearForcePortionOnly) then
604-
y%SoilMesh%Force(1:3, i) = y%SoilMesh%Force(1:3, i) + real(ForceLinear(1:3), ReKi)
605-
y%SoilMesh%Moment(1:3, i) = y%SoilMesh%Moment(1:3, i) + real(ForceLinear(4:6), ReKi)
606-
end if
600+
y%SoilMesh%Force(1:3, i) = y%SoilMesh%Force(1:3, i) + real(ForceLinear(1:3), ReKi)
601+
y%SoilMesh%Moment(1:3, i) = y%SoilMesh%Moment(1:3, i) + real(ForceLinear(4:6), ReKi)
607602
end do
608603

609604
case (Calc_PYcurve)
@@ -622,20 +617,16 @@ subroutine SlD_CalcOutput(t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg)
622617
Displacement(4:6) = GetSmllRotAngs(u%SoilMesh%Orientation(1:3, 1:3, i), ErrStat2, ErrMsg2); if (Failed()) return; ! Small angle assumption should be valid here -- Note we are assuming reforientation is identity
623618

624619
! Linear portion of the stiffness reaction (NOTE: the DLL stiffness info is stored in parameters
625-
if (p%SlDNonLinearForcePortionOnly) then
626-
ForceLinear = matmul(p%Stiffness(1:6, 1:6, i), Displacement)
627-
end if
620+
ForceLinear = matmul(p%Stiffness(1:6, 1:6, i), Displacement)
628621

629622
call REDWINinterface_CalcOutput(p%DLL_Trgt, p%DLL_Model, Displacement, m%ForceTotal(1:6, i), m%dll_data(i), ErrStat2, ErrMsg2); if (Failed()) return;
630623
! Return reaction force onto the resulting point mesh
631624
y%SoilMesh%Force(1:3, i) = -real(m%ForceTotal(1:3, i), ReKi)
632625
y%SoilMesh%Moment(1:3, i) = -real(m%ForceTotal(4:6, i), ReKi)
633626

634627
! Subtract out the linear piece here
635-
if (p%SlDNonLinearForcePortionOnly) then
636-
y%SoilMesh%Force(1:3, i) = y%SoilMesh%Force(1:3, i) + real(ForceLinear(1:3), ReKi)
637-
y%SoilMesh%Moment(1:3, i) = y%SoilMesh%Moment(1:3, i) + real(ForceLinear(4:6), ReKi)
638-
end if
628+
y%SoilMesh%Force(1:3, i) = y%SoilMesh%Force(1:3, i) + real(ForceLinear(1:3), ReKi)
629+
y%SoilMesh%Moment(1:3, i) = y%SoilMesh%Moment(1:3, i) + real(ForceLinear(4:6), ReKi)
639630
end do
640631
end select
641632

modules/soildyn/src/SoilDyn_Registry.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ typedef ^ InitInputType CHARACTER(1024) InputFile - - -
7070
typedef ^ ^ CHARACTER(1024) RootName - - - "Root name of the input file" -
7171
typedef ^ ^ LOGICAL Linearize - F - "Flag that tells this module if the glue code wants to linearize." -
7272
typedef ^ ^ ReKi WtrDpth - - - "Water depth to mudline (global coordinates)" '(m)'
73-
typedef ^ ^ logical SlDNonLinearForcePortionOnly - F - "Only the non-linear portion of the reaction forces is returned" -
7473

7574
# Define outputs from the initialization routine here:
7675
typedef ^ InitOutputType ModVarsType Vars - - - "Module Variables"
@@ -111,7 +110,6 @@ typedef ^ ^ IntKi NumPoints - - -
111110
typedef ^ ^ ReKi WtrDepth - - - "Water depth to mudline (global coordinates)" '(m)'
112111
typedef ^ ^ R8Ki Stiffness ::: - - "Stiffness matrix" '(N/m, N-m/rad)'
113112
typedef ^ ^ logical DLL_OnlyStiff - - - "Use only the stiffness matrix in calculating the restoring forces" -
114-
typedef ^ ^ logical SlDNonLinearForcePortionOnly - F - "Only the non-linear portion of the reaction forces is returned" -
115113

116114
# Inputs ....................................................................................................................
117115
typedef ^ InputType MeshType SoilMesh - - - "Mesh of soil contact points" -

modules/soildyn/src/SoilDyn_Types.f90

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ MODULE SoilDyn_Types
9090
CHARACTER(1024) :: RootName !< Root name of the input file [-]
9191
LOGICAL :: Linearize = .false. !< Flag that tells this module if the glue code wants to linearize. [-]
9292
REAL(ReKi) :: WtrDpth = 0.0_ReKi !< Water depth to mudline (global coordinates) ['(m)']
93-
LOGICAL :: SlDNonLinearForcePortionOnly = .false. !< Only the non-linear portion of the reaction forces is returned [-]
9493
END TYPE SlD_InitInputType
9594
! =======================
9695
! ========= SlD_InitOutputType =======
@@ -140,7 +139,6 @@ MODULE SoilDyn_Types
140139
REAL(ReKi) :: WtrDepth = 0.0_ReKi !< Water depth to mudline (global coordinates) ['(m)']
141140
REAL(R8Ki) , DIMENSION(:,:,:), ALLOCATABLE :: Stiffness !< Stiffness matrix ['(N/m,]
142141
LOGICAL :: DLL_OnlyStiff = .false. !< Use only the stiffness matrix in calculating the restoring forces [-]
143-
LOGICAL :: SlDNonLinearForcePortionOnly = .false. !< Only the non-linear portion of the reaction forces is returned [-]
144142
END TYPE SlD_ParameterType
145143
! =======================
146144
! ========= SlD_InputType =======
@@ -529,7 +527,6 @@ subroutine SlD_CopyInitInput(SrcInitInputData, DstInitInputData, CtrlCode, ErrSt
529527
DstInitInputData%RootName = SrcInitInputData%RootName
530528
DstInitInputData%Linearize = SrcInitInputData%Linearize
531529
DstInitInputData%WtrDpth = SrcInitInputData%WtrDpth
532-
DstInitInputData%SlDNonLinearForcePortionOnly = SrcInitInputData%SlDNonLinearForcePortionOnly
533530
end subroutine
534531

535532
subroutine SlD_DestroyInitInput(InitInputData, ErrStat, ErrMsg)
@@ -550,7 +547,6 @@ subroutine SlD_PackInitInput(RF, Indata)
550547
call RegPack(RF, InData%RootName)
551548
call RegPack(RF, InData%Linearize)
552549
call RegPack(RF, InData%WtrDpth)
553-
call RegPack(RF, InData%SlDNonLinearForcePortionOnly)
554550
if (RegCheckErr(RF, RoutineName)) return
555551
end subroutine
556552

@@ -563,7 +559,6 @@ subroutine SlD_UnPackInitInput(RF, OutData)
563559
call RegUnpack(RF, OutData%RootName); if (RegCheckErr(RF, RoutineName)) return
564560
call RegUnpack(RF, OutData%Linearize); if (RegCheckErr(RF, RoutineName)) return
565561
call RegUnpack(RF, OutData%WtrDpth); if (RegCheckErr(RF, RoutineName)) return
566-
call RegUnpack(RF, OutData%SlDNonLinearForcePortionOnly); if (RegCheckErr(RF, RoutineName)) return
567562
end subroutine
568563

569564
subroutine SlD_CopyInitOutput(SrcInitOutputData, DstInitOutputData, CtrlCode, ErrStat, ErrMsg)
@@ -939,7 +934,6 @@ subroutine SlD_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg)
939934
DstParamData%Stiffness = SrcParamData%Stiffness
940935
end if
941936
DstParamData%DLL_OnlyStiff = SrcParamData%DLL_OnlyStiff
942-
DstParamData%SlDNonLinearForcePortionOnly = SrcParamData%SlDNonLinearForcePortionOnly
943937
end subroutine
944938

945939
subroutine SlD_DestroyParam(ParamData, ErrStat, ErrMsg)
@@ -1000,7 +994,6 @@ subroutine SlD_PackParam(RF, Indata)
1000994
call RegPack(RF, InData%WtrDepth)
1001995
call RegPackAlloc(RF, InData%Stiffness)
1002996
call RegPack(RF, InData%DLL_OnlyStiff)
1003-
call RegPack(RF, InData%SlDNonLinearForcePortionOnly)
1004997
if (RegCheckErr(RF, RoutineName)) return
1005998
end subroutine
1006999

@@ -1041,7 +1034,6 @@ subroutine SlD_UnPackParam(RF, OutData)
10411034
call RegUnpack(RF, OutData%WtrDepth); if (RegCheckErr(RF, RoutineName)) return
10421035
call RegUnpackAlloc(RF, OutData%Stiffness); if (RegCheckErr(RF, RoutineName)) return
10431036
call RegUnpack(RF, OutData%DLL_OnlyStiff); if (RegCheckErr(RF, RoutineName)) return
1044-
call RegUnpack(RF, OutData%SlDNonLinearForcePortionOnly); if (RegCheckErr(RF, RoutineName)) return
10451037
end subroutine
10461038

10471039
subroutine SlD_CopyInput(SrcInputData, DstInputData, CtrlCode, ErrStat, ErrMsg)

modules/soildyn/src/driver/SoilDyn_Driver.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ PROGRAM SoilDyn_Driver
260260
!...............................................................................................................................
261261

262262
InitInData%InputFile = Settings%SldIptFileName
263-
InitInData%SlDNonLinearForcePortionOnly = SettingsFlags%SlDNonLinearForcePortionOnly
264263

265264
! Initialize the module
266265
CALL SlD_Init( InitInData, u(1), p, x, xd, z, OtherState, y, misc, TimeInterval, InitOutData, ErrStat, ErrMsg )

modules/soildyn/src/driver/SoilDyn_Driver_Subs.f90

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ subroutine InitSettingsFlags( ProgInfo, CLSettings, CLFlags )
8686
CLFlags%DTDefault = .FALSE. ! specified 'DEFAULT' for resolution in time
8787
CLFlags%Verbose = .FALSE. ! Turn on verbose error reporting?
8888
CLFlags%VVerbose = .FALSE. ! Turn on very verbose error reporting?
89-
CLFlags%SlDNonLinearForcePortionOnly = .FALSE. ! Report only non-linear portion of forces
9089

9190
end subroutine InitSettingsFlags
9291

@@ -278,10 +277,7 @@ SUBROUTINE ParseArg( CLSettings, CLFlags, ThisArgUC, ThisArg, sldFlagSet, ErrSta
278277
! If no delimeters were given, than this option is simply a flag
279278
IF ( Delim1 == 0_IntKi ) THEN
280279
! check to see if the filename is the name of the SlD input file
281-
IF ( ThisArgUC(1:9) == "NONLINEAR" ) THEN
282-
CLFlags%SlDNonLinearForcePortionOnly = .TRUE.
283-
RETURN
284-
ELSEIF ( ThisArgUC(1:3) == "SLD" ) THEN
280+
IF ( ThisArgUC(1:3) == "SLD" ) THEN
285281
sldFlagSet = .TRUE. ! More logic in the routine that calls this one to set things.
286282
RETURN
287283
ELSEIF ( ThisArgUC(1:2) == "VV" ) THEN
@@ -547,11 +543,6 @@ SUBROUTINE ReadDvrIptFile( DvrFileName, DvrFlags, DvrSettings, ProgInfo, ErrStat
547543
ErrStatTmp,ErrMsgTmp, UnEchoLocal )
548544
if (Failed()) return
549545

550-
! Non-linear reaction portion only
551-
CALL ReadVar( UnIn, FileName,DvrFlags%SlDNonLinearForcePortionOnly,'SlDNonLinearForcePortionOnly',' Only report the non-linear portion of the reaction force.', &
552-
ErrStatTmp,ErrMsgTmp, UnEchoLocal )
553-
if (Failed()) return
554-
555546

556547

557548
!-------------------------------------------------------------------------------------------------

modules/soildyn/src/driver/SoilDyn_Driver_Types.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ MODULE SoilDyn_Driver_Types
4545
LOGICAL :: DTDefault = .FALSE. !< specified a 'DEFAULT' for the time resolution
4646
LOGICAL :: Verbose = .FALSE. !< Verbose error reporting
4747
LOGICAL :: VVerbose = .FALSE. !< Very Verbose error reporting
48-
LOGICAL :: SlDNonLinearForcePortionOnly = .FALSE. !< To only return the non-linear portion of the reaction force
4948
END TYPE SlDDriver_Flags
5049

5150

0 commit comments

Comments
 (0)