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

SoilDyn -- soil dynamics module #986

Draft
wants to merge 176 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
a18de70
DirtDyn: initial commit with rough skeleton code
andrew-platt Jan 29, 2020
311a253
DirtDyn: minor fixes for compiling with ifort
Jan 30, 2020
a4e774e
DirtDyn: add VS project
andrew-platt Jan 30, 2020
b3f8c07
DirtDyn: fix version info on solution file
andrew-platt Jan 30, 2020
3d2b9de
DirtDyn: DLL loading/unloading working
andrew-platt Jan 31, 2020
d7fa8f3
DirtDyn: input files in registry
andrew-platt Feb 4, 2020
62c9503
DirtDyn: successful initializing of DLL
andrew-platt Feb 4, 2020
b4cf83e
DirtDyn: update so static linking is possible
andrew-platt Feb 4, 2020
e74522c
DirtDyn: remove unused file
andrew-platt Feb 5, 2020
bbd565e
Merge branch 'f/DirtDyn' of https://github.nrel.gov/aplatt/openfast-p…
andrew-platt Feb 5, 2020
7000de6
DirtDyn: add preproc command for quicker development work.
andrew-platt Feb 5, 2020
037092e
SoilDyn: name change
andrew-platt Feb 5, 2020
e5b1ea6
SoilDyn: add skeleton IO module
andrew-platt Feb 5, 2020
81eca80
SoilDyn: allow multiple DLL calls
andrew-platt Feb 7, 2020
e922d28
SoilDyn: more input file reading
andrew-platt Feb 7, 2020
b38dd98
SoilDyn: add SoilDyn_IO.f90 to VS project
andrew-platt Feb 7, 2020
6f5f728
SoilDyn: convert to 6x6 matrix reads
andrew-platt Feb 7, 2020
4ebf105
SoilDyn: Input file parsing complete (I think)
andrew-platt Feb 7, 2020
4be8c0b
SoilDyn: add some echo file info on points used
andrew-platt Feb 7, 2020
af22092
SoilDyn: DLL input file handling
andrew-platt Feb 10, 2020
393f1d7
SoilDyn: error handling on the DLL and its input files
andrew-platt Feb 10, 2020
7d7f4c3
SoilDyn: error handling on the DLL and its input files
andrew-platt Feb 10, 2020
5bc3947
Merge branch 'f/SoilDyn' of https://github.nrel.gov/aplatt/openfast-p…
andrew-platt Feb 10, 2020
f41dcfe
SoilDyn: more input file location checking for DLL's
andrew-platt Feb 10, 2020
2bf2dcc
SoilDyn: error handling on DLL input files
andrew-platt Feb 10, 2020
c7160d8
Merge branch 'f/SoilDyn' of https://github.nrel.gov/aplatt/openfast-p…
andrew-platt Feb 10, 2020
bcd73ab
SoilDyn: add input file and parsing to driver
andrew-platt Feb 10, 2020
c597595
SlD: minor cleanup
andrew-platt Feb 18, 2020
0ea575a
SlD: add error trapping to REDWIN interface
andrew-platt Feb 18, 2020
0d9399c
SlD: move error checking routines to end of file
andrew-platt Feb 19, 2020
b2274bb
SlD: update vs build.
andrew-platt Feb 19, 2020
802e343
SlD: update registry bat file for VS builds
andrew-platt Feb 19, 2020
a494312
SlD: move checks on DLL input files
andrew-platt Feb 19, 2020
8b63225
SlD: remove SlD types from REDWINinterface.f90
andrew-platt Feb 19, 2020
eb24883
SlD: simplify driver
andrew-platt Feb 19, 2020
a624c2b
SlD: coordinate transforms between OpenFAST and REDWIN
andrew-platt Feb 19, 2020
b40c967
SlD: basic driver input file roughed in
andrew-platt Feb 25, 2020
f37ca39
SlD: notes on runmode for REDWIN DLL
andrew-platt Feb 25, 2020
1eb0c83
SlD: add parsing of time series input displacements
andrew-platt Feb 25, 2020
668b171
SoilDyn: change precision in the REDWIN interface for displacement
andrew-platt Mar 2, 2020
68db17f
SlD: Add meshes for input / output
andrew-platt Mar 2, 2020
84b3c0c
SlD: update driver to loop through displacements from input file
andrew-platt Mar 2, 2020
98363bd
SlD: update VS project
andrew-platt Mar 2, 2020
93bad67
Merge branch 'f/SoilDyn' of https://github.nrel.gov/aplatt/openfast-p…
andrew-platt Mar 2, 2020
8671cdd
SlD: add interpolation of input displacement file to driver
andrew-platt Mar 2, 2020
67c5787
Merge branch 'f/SoilDyn' of https://github.nrel.gov/aplatt/openfast-p…
andrew-platt Mar 2, 2020
7e52b0a
SlD: add error checking on Calc routine
andrew-platt Mar 2, 2020
06ca67a
SlD: change angles to degrees in REDWIN
andrew-platt Mar 3, 2020
bcd04ee
SlD: multiple instances use different DLL's
andrew-platt Mar 3, 2020
deaa679
SlD: fix units. Radians for anges to REDWIN dll
andrew-platt Mar 3, 2020
cf5b2f8
SlD: update for one DLL and paths
andrew-platt Mar 4, 2020
e4596c6
SlD: fix for Get_CWD for platform specific
andrew-platt Mar 5, 2020
a6accb3
SlD: minor updates to get it running on windows again
andrew-platt Mar 11, 2020
37837f0
SlD: change all force and stiffness in REDWIN module to R8Ki
andrew-platt Mar 11, 2020
7d63780
SlD: add output channels and output file to driver
andrew-platt Mar 13, 2020
5875122
SlD: add WriteOutput routine
andrew-platt Mar 13, 2020
7ddb24e
SlD: remove unneeded.
andrew-platt Mar 17, 2020
881bf54
SlD: update the output format from driver
andrew-platt Mar 19, 2020
ac32f35
Merge branch 'f/SoilDyn' of https://github.nrel.gov/aplatt/openfast-p…
andrew-platt Mar 19, 2020
de9b080
SlD: minor changes for integrating with FAST_Solver
andrew-platt Mar 19, 2020
f029b1c
Merge remote-tracking branch 'upstream/dev' into f/SoilDyn
andrew-platt Mar 19, 2020
53f2640
Merge remote-tracking branch 'ebranlard/f/flexsub2' into f/SoilDyn
andrew-platt Mar 19, 2020
2b74a2f
Merge branch 'f/flexsub2' into f/SoilDyn-SDmerge
andrew-platt Mar 19, 2020
447097d
SlD: hooks in glue code and input file changes.
andrew-platt Mar 24, 2020
4d0efd0
Merge remote-tracking branch 'upstream/dev' into f/SoilDyn-SDmerge
andrew-platt Mar 24, 2020
210f53f
Merge remote-tracking branch 'upstream/dev' into f/SoilDyn-SDmerge
andrew-platt Mar 25, 2020
c4b8a63
SlD: renaming of routines to match OpenFAST glue-code better
andrew-platt Mar 25, 2020
13dd7d5
SlD: minor updates to glue code.
andrew-platt Mar 25, 2020
35715f9
SlD: rename meshes for consistency, add to glue code
andrew-platt Mar 26, 2020
8493b54
SlD: update VS project
andrew-platt Mar 26, 2020
707b767
SlD: change routine for small angles
andrew-platt Mar 27, 2020
e6d6468
SlD: add some more of the SlD mesh transfers
andrew-platt Mar 27, 2020
8730da8
SlD: plumbing for outputs in glue code
andrew-platt Mar 30, 2020
251358e
SD: Comment out unused routine
andrew-platt Mar 30, 2020
a003e28
SlD: case select around DLL bits, fix errors in last commit
andrew-platt Mar 30, 2020
acd5515
Merge branch 'f/SoilDyn-SDmerge' of https://github.com/andrew-platt/O…
andrew-platt Mar 31, 2020
bf75103
SlD: update units, fix reaction signs
andrew-platt Apr 7, 2020
f23e811
Merge remote-tracking branch 'ebranlard/f/flexsub2' into f/SoilDyn-SD…
andrew-platt Apr 7, 2020
2e061a3
SlD: initial orientaion incorrect
andrew-platt Apr 7, 2020
f282137
Merge remote-tracking branch 'upstream/dev' into f/SoilDyn-SDmerge
andrew-platt Apr 9, 2020
33b9fc5
SlD: move soildyn call
andrew-platt Apr 9, 2020
890db2a
Merge branch 'f/SoilDyn-SDmerge' of github.com:andrew-platt/openfast …
andrew-platt Apr 9, 2020
c64bbc6
SlD: modify solver with soildyn
andrew-platt Apr 9, 2020
15d6348
SlD: update types file for ED (from merge)
andrew-platt Apr 9, 2020
012ca26
SlD: add stiffness matrix option
andrew-platt Apr 13, 2020
83139cd
SlD: add soilDyn to jacobian
andrew-platt Apr 14, 2020
70b60c7
SlD: modify glue code solver logic so don't need correction steps
andrew-platt Apr 14, 2020
87f6bb4
SlD: add optional flag on SlD_CalcOutput for perturb calcs
andrew-platt Apr 14, 2020
25d313a
SlD: updates to solver -- currently stable
andrew-platt Apr 14, 2020
fd4f45f
SlD: add ability to handle large angle calculations at start
andrew-platt Apr 14, 2020
36b28af
SlD: cleanup the option1 solve slightly (commented out test stuff rem…
andrew-platt Apr 14, 2020
a57755c
WIN_DLL_LOAD option (renamed from ORCA_DLL_LOAD)
andrew-platt Apr 14, 2020
8482212
SlD: fix coorinate transform issue in REDWINinterface
andrew-platt Apr 15, 2020
718e0e8
SlD: some updates in the call to redwin. Work in progress
andrew-platt Apr 15, 2020
07ec0a9
Merge branch 'f/SlD_Opt1_jac' of https://github.com/andrew-platt/Open…
andrew-platt Apr 15, 2020
1fcab72
SlD: allow for using only DLL stiffness matrices in the response calcs
andrew-platt Apr 16, 2020
9eff353
SlD: update on the stiff only DLL calcs
andrew-platt Apr 16, 2020
7ea2d52
SlD: fix typos in previous commit
andrew-platt Apr 16, 2020
7c72370
Merge remote-tracking branch 'origin/f/DocUpdate_Solver' into f/SlD_O…
andrew-platt Apr 17, 2020
bdc09a5
Docs: update OpenFAST solve documentation
andrew-platt Apr 17, 2020
26e5e90
SlD: update the OpenFAST Algorithms doc for SlD
andrew-platt Apr 17, 2020
0a44146
SlD: move SlD input setting to more logical location
andrew-platt Apr 17, 2020
8d0ece3
Fixed How SoilDyn is Called in the Glue Code
jjonkman Apr 18, 2020
4d64b4b
Merge pull request #2 from jjonkman/f/SlD_Opt1_jac
andrew-platt Apr 20, 2020
88989bf
SlD: minor typo in Alogorithms.tex
andrew-platt Apr 20, 2020
1a15eb6
SlD: remove SlD from Jacobian in FAST_Solver
andrew-platt Apr 20, 2020
a895b84
SlD: update glue code for Jacobian if no HD
andrew-platt Apr 22, 2020
c77c90a
SlD: remove extra mesh from the registry
andrew-platt Apr 22, 2020
a76c0e3
SlD: remove extra logic from the SlD_CalcOutput
andrew-platt Apr 22, 2020
4218d8c
SlD: update of algorithm to match documentation better
andrew-platt Apr 22, 2020
e28b644
SlD: missed a bit of logic in a76c0e30
andrew-platt Apr 22, 2020
f5bf3e7
SlD: allow heave/yaw in the reaction on Model 2
andrew-platt May 5, 2020
feeceab
TMD: add tower top time-series force input file
andrew-platt May 5, 2020
612bb7a
TMD: fix error in force
andrew-platt May 6, 2020
5167a7c
SlD: fix an issue with error handling
andrew-platt May 7, 2020
d13a6e4
SlD: bugfix -- DLL input file checking incorrect
May 20, 2020
cc7e34c
Merge remote-tracking branch 'ebranlard/f/flexsub2' into f/SlD_NoJaco…
andrew-platt May 21, 2020
ede2f2a
SlD: move DLL state info to xd, cleanup of REDWIN interface
andrew-platt May 20, 2020
0985888
SlD: attempt to fix fortlll crash at end without SlD.
andrew-platt May 27, 2020
c6b0bb7
Merge remote-tracking branch 'upstream/dev' into f/SoilDyn
andrew-platt Jun 3, 2020
f50d81b
Merge remote-tracking branch 'ebranlard/f/flexsub2' into f/SoilDyn
andrew-platt Jun 3, 2020
125540f
SlD: add check on WtrDpth (passed from HD)
andrew-platt Jun 3, 2020
491b3d3
Merge remote-tracking branch 'OpenFAST/dev' into f/SoilDyn
andrew-platt Jun 10, 2020
76864b3
Merge remote-tracking branch 'ebranlard/f/flexsub2' into f/SoilDyn
andrew-platt Jun 16, 2020
60558c1
Merge remote-tracking branch 'OpenFAST/dev' into f/SoilDyn_SubDynStiff
andrew-platt Jun 16, 2020
a6cd85b
SlD: rearrange so stiffness matrices can easily be passed out at init.
andrew-platt Jun 16, 2020
a12e053
SlD: remove SubRotateZ from soildyn
andrew-platt Jun 16, 2020
71a8082
SlD: remove StVarPrint from discretestates (it isn't used by REDWIN D…
andrew-platt Jun 16, 2020
45d0598
SoilDyn+SubDyn: Passing of stiffness and mesh nodes to SD
andrew-platt Jun 16, 2020
210b06f
SlD: add option for only returning non-linear portion of reaction forces
andrew-platt Jun 16, 2020
00d4424
SoilDyn: set SlD_Init flag for non-linear portion
andrew-platt Jun 16, 2020
63771d6
SlD: Output node forces include linear terms
andrew-platt Jun 16, 2020
9789ef7
FlexSub: adding Soil stiffness
ebranlard Jun 17, 2020
7a7b37e
FlexSub: activating NonLinear SoilDyn part
ebranlard Jun 18, 2020
1acb67e
FlexSub: Bug fix: count of internal DOF was wrong since introduction …
ebranlard Jun 18, 2020
282277d
FlexSub: removing some print statements
ebranlard Jun 18, 2020
df696ea
FlexSub: input/output meshes now same as subdyn mesh
ebranlard Jun 18, 2020
44ae34f
Merge remote-tracking branch 'ebra/f/flexsub2' into f/SoilDyn_SubDynS…
ebranlard Jun 18, 2020
36a266f
SubDyn: missing logic on deallocate
andrew-platt Jun 19, 2020
c39d11d
SlD: remove confusing comment in FAST_Solver
andrew-platt Jun 24, 2020
59c57d7
SlD driver: stiffness matrix is from init
andrew-platt Jun 24, 2020
5568539
SlD: remove unused variables and routines
andrew-platt Jun 24, 2020
f080fb5
SlD: add documentation for tower top force and SD matrix boundar cond…
andrew-platt Jun 26, 2020
ab5f071
SlD: remove stale TODO.txt
andrew-platt Jun 29, 2020
04f9883
Merge remote-tracking branch 'ebranlard/f/flexsub2' into f/SoilDyn
andrew-platt Jul 6, 2020
0527a6d
Merge remote-tracking branch 'OpenFAST/dev' into f/SoilDyn
andrew-platt Jul 7, 2020
d0abb07
Merge remote-tracking branch 'OpenFAST/dev' into f/SoilDyn
andrew-platt Jul 8, 2020
2011efd
Merge remote-tracking branch 'ebranlard/f/flexsub2' into f/SoilDyn
andrew-platt Jul 9, 2020
8cfb320
SlD: [BugFix] bug in the FindClosestNodes routine
andrew-platt Aug 18, 2020
53e8c06
Merge remote-tracking branch 'OpenFAST/dev' into f/SoilDyn
andrew-platt Aug 18, 2020
ae92aa2
SoilDyn: update regression test .fst files
andrew-platt Aug 19, 2020
8da25d9
Merge remote-tracking branch 'ebranlard/f/flexsub2' into f/SoilDyn
andrew-platt Aug 19, 2020
02c1e68
SoilDyn: Update .fst regression test files
andrew-platt Aug 19, 2020
147034c
Merge remote-tracking branch 'origin/dev' into f/SoilDyn
andrew-platt Sep 22, 2020
91bfa82
SoilDyn: add message that damping matrix in CalcOption 1 not supporte…
andrew-platt Sep 22, 2020
ce03900
Merge remote-tracking branch 'ebranlard/f/flexsub2' into f/SoilDyn
andrew-platt Sep 22, 2020
4a4d5ff
SlD: missing source file in SubDyn VS project
andrew-platt Sep 23, 2020
bd9fafa
OpenFAST_Algorithm: fix error in AdvanceStates description, and updea…
andrew-platt Oct 8, 2020
9e6cbd0
Merge tag 'v2.5.0' into f/SoilDyn
andrew-platt Mar 26, 2021
e163ab7
Merge remote-tracking branch 'OpenFAST/dev' into f/SoilDyn
andrew-platt Nov 4, 2021
7342237
Merge remote-tracking branch 'OpenFAST/dev' into f/SoilDyn
andrew-platt Jan 27, 2022
7618542
SlD: fix typos in driver _Types.f90 file
andrew-platt Mar 9, 2022
8060c6c
Merge remote-tracking branch 'OpenFAST/dev' into f/SoilDyn
andrew-platt Mar 9, 2022
d2990d4
Merge remote-tracking branch 'OpenFAST/dev' into f/SoilDyn
andrew-platt Aug 3, 2022
82a40d9
FAST_Registry: SoilDyn to SubDyn use y3Mesh
deslaughter Aug 22, 2022
9dff305
SoilDyn: Fix header in REDWINinterface.f90
deslaughter Aug 22, 2022
e8bb4eb
SubDyn: If Soil_K from SoilDyn, isFloating=false
deslaughter Aug 22, 2022
078f344
Added OC6_phaseII regression test
deslaughter Aug 22, 2022
493af4f
Update r-test to latest SoilDyn commit
deslaughter Aug 23, 2022
d418e0d
Merge branch 'dev' into f/SoilDyn
deslaughter Aug 23, 2022
b65dea7
Rework reg_test CMakeLists.txt to copy test data
deslaughter Aug 24, 2022
3d35641
reg_test/CMakeLists.txt fixed missing target
deslaughter Aug 24, 2022
8224f85
SoilDyn: updated version info
deslaughter Aug 24, 2022
7387f6e
reg_tests/CMakeLists.txt: reverted debug changes
deslaughter Aug 24, 2022
9d11e4e
Merge remote-tracking branch 'main/dev' into f/SoilDyn
deslaughter Aug 24, 2022
b916b49
FAST_Solver: transfer of ED outputs to SD inputs
deslaughter Aug 24, 2022
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
Prev Previous commit
Next Next commit
SlD: add option for only returning non-linear portion of reaction forces
  • Loading branch information
andrew-platt committed Jun 16, 2020
commit 210b06f962e787365ca0eb9e5789e1f1cf2a06fc
37 changes: 29 additions & 8 deletions modules/soildyn/src/SoilDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ subroutine SlD_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOu
z%DummyConstrState = 0.0_ReKi
OtherState%DummyOtherState = 0.0_ReKi

! are the returned reaction forces only the non-linear portion (used when SubDyn is calculating the linear portion)
p%SlDNonLinearForcePortionOnly = InitInp%SlDNonLinearForcePortionOnly
if (p%SlDNonLinearForcePortionOnly) call WrScr(' SoilDyn returning only non-linear portion of reaction forces')

!FIXME: set some initial values of y and u here)

if (InitInp%Linearize) then

Expand Down Expand Up @@ -510,6 +512,7 @@ subroutine SlD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg
real(ReKi) :: AllOuts(0:MaxOutPts)
real(R8Ki) :: Displacement(6)
real(R8Ki) :: Force(6)
real(R8Ki) :: ForceLinear(6)
integer(IntKi) :: i !< generic counter

! Initialize ErrStat
Expand All @@ -527,14 +530,21 @@ subroutine SlD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg

! Calculate reaction with F = k*dX
Force = matmul(p%Stiffness(1:6,1:6,i), Displacement)

if (p%SlDNonLinearForcePortionOnly) then
ForceLinear = matmul(p%Stiffness(1:6,1:6,i), Displacement)
endif

! TODO: add damping term effects here

! Return reaction force onto the resulting point mesh
y%SoilMesh%Force (1,i) = -real(Force(1),ReKi)
y%SoilMesh%Force (2,i) = -real(Force(2),ReKi)
y%SoilMesh%Force (3,i) = -real(Force(3),ReKi)
y%SoilMesh%Moment(1,i) = -real(Force(4),ReKi)
y%SoilMesh%Moment(2,i) = -real(Force(5),ReKi)
y%SoilMesh%Moment(3,i) = -real(Force(6),ReKi)
y%SoilMesh%Force (1:3,i) = -real(Force(1:3),ReKi)
y%SoilMesh%Moment(1:3,i) = -real(Force(4:6),ReKi)

! Subrtract out the linear piece here
if (p%SlDNonLinearForcePortionOnly) then
y%SoilMesh%Force (1:3,i) = y%SoilMesh%Force (1:3,i) + real(ForceLinear(1:3),ReKi)
y%SoilMesh%Moment(1:3,i) = y%SoilMesh%Moment(1:3,i) + real(ForceLinear(4:6),ReKi)
endif
enddo

case (Calc_PYcurve)
Expand All @@ -552,11 +562,22 @@ subroutine SlD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg
Displacement(1:3) = u%SoilMesh%TranslationDisp(1:3,i) ! Translations -- This is R8Ki in the mesh
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

! Linear portion of the stiffness reaction (NOTE: the DLL stiffness info is stored in parameters
if (p%SlDNonLinearForcePortionOnly) then
ForceLinear = matmul(p%Stiffness(1:6,1:6,i), Displacement)
endif

call REDWINinterface_CalcOutput( p%DLL_Trgt, p%DLL_Model, Displacement, Force, m%dll_data(i), ErrStat2, ErrMsg2 ); if (Failed()) return;

! Return reaction force onto the resulting point mesh
y%SoilMesh%Force (1:3,i) = -real(Force(1:3),ReKi)
y%SoilMesh%Moment(1:3,i) = -real(Force(4:6),ReKi)

! Subrtract out the linear piece here
if (p%SlDNonLinearForcePortionOnly) then
y%SoilMesh%Force (1:3,i) = y%SoilMesh%Force (1:3,i) + real(ForceLinear(1:3),ReKi)
y%SoilMesh%Moment(1:3,i) = y%SoilMesh%Moment(1:3,i) + real(ForceLinear(4:6),ReKi)
endif
enddo
end select

Expand Down
3 changes: 2 additions & 1 deletion modules/soildyn/src/SoilDyn_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ typedef ^ InitInputType CHARACTER(1024) InputFile - - -
typedef ^ InitInputType CHARACTER(1024) RootName - - - "Root name of the input file" -
typedef ^ InitInputType LOGICAL Linearize - .FALSE. - "Flag that tells this module if the glue code wants to linearize." -
typedef ^ InitInputType ReKi WtrDpth - - - "Water depth to mudline (global coordinates)" '(m)'
typedef ^ InitInputType logical SlDNonLinearForcePortionOnly - .FALSE. - "Only the non-linear portion of the reaction forces is returned" -

# Define outputs from the initialization routine here:
typedef ^ InitOutputType CHARACTER(ChanLen) WriteOutputHdr {:} - - "Names of the output-to-file channels" -
Expand Down Expand Up @@ -131,7 +132,7 @@ typedef ^ ParameterType ReKi WtrDepth
typedef ^ ParameterType R8Ki Stiffness ::: - - "Stiffness matrix" '(N/m, N-m/rad)'
#typedef ^ ParameterType R8Ki Damping ::: - - "Damping matrix" '(N/m, N-m/rad)'
typedef ^ ParameterType logical DLL_OnlyStiff - - - "Use only the stiffness matrix in calculating the restoring forces" -

typedef ^ ParameterType logical SlDNonLinearForcePortionOnly - .FALSE. - "Only the non-linear portion of the reaction forces is returned" -
# ..... Inputs ....................................................................................................................
typedef ^ InputType MeshType SoilMesh - - - "Mesh of soil contact points" -

Expand Down
14 changes: 14 additions & 0 deletions modules/soildyn/src/SoilDyn_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ MODULE SoilDyn_Types
CHARACTER(1024) :: RootName !< Root name of the input file [-]
LOGICAL :: Linearize = .FALSE. !< Flag that tells this module if the glue code wants to linearize. [-]
REAL(ReKi) :: WtrDpth !< Water depth to mudline (global coordinates) ['(m)']
LOGICAL :: SlDNonLinearForcePortionOnly = .FALSE. !< Only the non-linear portion of the reaction forces is returned [-]
END TYPE SlD_InitInputType
! =======================
! ========= SlD_InitOutputType =======
Expand Down Expand Up @@ -143,6 +144,7 @@ MODULE SoilDyn_Types
REAL(ReKi) :: WtrDepth !< Water depth to mudline (global coordinates) ['(m)']
REAL(R8Ki) , DIMENSION(:,:,:), ALLOCATABLE :: Stiffness !< Stiffness matrix ['(N/m,]
LOGICAL :: DLL_OnlyStiff !< Use only the stiffness matrix in calculating the restoring forces [-]
LOGICAL :: SlDNonLinearForcePortionOnly = .FALSE. !< Only the non-linear portion of the reaction forces is returned [-]
END TYPE SlD_ParameterType
! =======================
! ========= SlD_InputType =======
Expand Down Expand Up @@ -1434,6 +1436,7 @@ SUBROUTINE SlD_CopyInitInput( SrcInitInputData, DstInitInputData, CtrlCode, ErrS
DstInitInputData%RootName = SrcInitInputData%RootName
DstInitInputData%Linearize = SrcInitInputData%Linearize
DstInitInputData%WtrDpth = SrcInitInputData%WtrDpth
DstInitInputData%SlDNonLinearForcePortionOnly = SrcInitInputData%SlDNonLinearForcePortionOnly
END SUBROUTINE SlD_CopyInitInput

SUBROUTINE SlD_DestroyInitInput( InitInputData, ErrStat, ErrMsg )
Expand Down Expand Up @@ -1486,6 +1489,7 @@ SUBROUTINE SlD_PackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMs
Int_BufSz = Int_BufSz + 1*LEN(InData%RootName) ! RootName
Int_BufSz = Int_BufSz + 1 ! Linearize
Re_BufSz = Re_BufSz + 1 ! WtrDpth
Int_BufSz = Int_BufSz + 1 ! SlDNonLinearForcePortionOnly
IF ( Re_BufSz .GT. 0 ) THEN
ALLOCATE( ReKiBuf( Re_BufSz ), STAT=ErrStat2 )
IF (ErrStat2 /= 0) THEN
Expand Down Expand Up @@ -1525,6 +1529,8 @@ SUBROUTINE SlD_PackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMs
Int_Xferred = Int_Xferred + 1
ReKiBuf ( Re_Xferred:Re_Xferred+(1)-1 ) = InData%WtrDpth
Re_Xferred = Re_Xferred + 1
IntKiBuf ( Int_Xferred:Int_Xferred+1-1 ) = TRANSFER( InData%SlDNonLinearForcePortionOnly , IntKiBuf(1), 1)
Int_Xferred = Int_Xferred + 1
END SUBROUTINE SlD_PackInitInput

SUBROUTINE SlD_UnPackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMsg )
Expand Down Expand Up @@ -1571,6 +1577,8 @@ SUBROUTINE SlD_UnPackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, Er
Int_Xferred = Int_Xferred + 1
OutData%WtrDpth = ReKiBuf( Re_Xferred )
Re_Xferred = Re_Xferred + 1
OutData%SlDNonLinearForcePortionOnly = TRANSFER( IntKiBuf( Int_Xferred ), mask0 )
Int_Xferred = Int_Xferred + 1
END SUBROUTINE SlD_UnPackInitInput

SUBROUTINE SlD_CopyInitOutput( SrcInitOutputData, DstInitOutputData, CtrlCode, ErrStat, ErrMsg )
Expand Down Expand Up @@ -2990,6 +2998,7 @@ SUBROUTINE SlD_CopyParam( SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg
DstParamData%Stiffness = SrcParamData%Stiffness
ENDIF
DstParamData%DLL_OnlyStiff = SrcParamData%DLL_OnlyStiff
DstParamData%SlDNonLinearForcePortionOnly = SrcParamData%SlDNonLinearForcePortionOnly
END SUBROUTINE SlD_CopyParam

SUBROUTINE SlD_DestroyParam( ParamData, ErrStat, ErrMsg )
Expand Down Expand Up @@ -3107,6 +3116,7 @@ SUBROUTINE SlD_PackParam( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMsg, S
Db_BufSz = Db_BufSz + SIZE(InData%Stiffness) ! Stiffness
END IF
Int_BufSz = Int_BufSz + 1 ! DLL_OnlyStiff
Int_BufSz = Int_BufSz + 1 ! SlDNonLinearForcePortionOnly
IF ( Re_BufSz .GT. 0 ) THEN
ALLOCATE( ReKiBuf( Re_BufSz ), STAT=ErrStat2 )
IF (ErrStat2 /= 0) THEN
Expand Down Expand Up @@ -3256,6 +3266,8 @@ SUBROUTINE SlD_PackParam( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMsg, S
END IF
IntKiBuf ( Int_Xferred:Int_Xferred+1-1 ) = TRANSFER( InData%DLL_OnlyStiff , IntKiBuf(1), 1)
Int_Xferred = Int_Xferred + 1
IntKiBuf ( Int_Xferred:Int_Xferred+1-1 ) = TRANSFER( InData%SlDNonLinearForcePortionOnly , IntKiBuf(1), 1)
Int_Xferred = Int_Xferred + 1
END SUBROUTINE SlD_PackParam

SUBROUTINE SlD_UnPackParam( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMsg )
Expand Down Expand Up @@ -3452,6 +3464,8 @@ SUBROUTINE SlD_UnPackParam( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMsg
END IF
OutData%DLL_OnlyStiff = TRANSFER( IntKiBuf( Int_Xferred ), mask0 )
Int_Xferred = Int_Xferred + 1
OutData%SlDNonLinearForcePortionOnly = TRANSFER( IntKiBuf( Int_Xferred ), mask0 )
Int_Xferred = Int_Xferred + 1
END SUBROUTINE SlD_UnPackParam

SUBROUTINE SlD_CopyInput( SrcInputData, DstInputData, CtrlCode, ErrStat, ErrMsg )
Expand Down
1 change: 1 addition & 0 deletions modules/soildyn/src/driver/SoilDyn_Driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ PROGRAM SoilDyn_Driver
!...............................................................................................................................

InitInData%InputFile = Settings%SldIptFileName
InitInData%SlDNonLinearForcePortionOnly = SettingsFlags%SlDNonLinearForcePortionOnly

! Initialize the module
CALL SlD_Init( InitInData, u(1), p, x, xd, z, OtherState, y, misc, TimeInterval, InitOutData, ErrStat, ErrMsg )
Expand Down
13 changes: 12 additions & 1 deletion modules/soildyn/src/driver/SoilDyn_Driver_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ SUBROUTINE DispHelpText()
CALL WrScr(" "//SwChar//"TSteps[#] -- number of timesteps ")
CALL WrScr(" "//SwChar//"v -- verbose output ")
CALL WrScr(" "//SwChar//"vv -- very verbose output ")
CALL WrScr(" "//SwChar//"NonLinear -- only return non-linear portion of reaction force")
CALL WrScr(" "//SwChar//"help -- print this help menu and exit")
CALL WrScr("")
CALL WrScr(" Notes:")
Expand Down Expand Up @@ -85,6 +86,7 @@ subroutine InitSettingsFlags( ProgInfo, CLSettings, CLFlags )
CLFlags%DTDefault = .FALSE. ! specified 'DEFAULT' for resolution in time
CLFlags%Verbose = .FALSE. ! Turn on verbose error reporting?
CLFlags%VVerbose = .FALSE. ! Turn on very verbose error reporting?
CLFlags%SlDNonLinearForcePortionOnly = .FALSE. ! Report only non-linear portion of forces

end subroutine InitSettingsFlags

Expand Down Expand Up @@ -278,7 +280,10 @@ SUBROUTINE ParseArg( CLSettings, CLFlags, ThisArgUC, ThisArg, sldFlagSet, ErrSta
! If no delimeters were given, than this option is simply a flag
IF ( Delim1 == 0_IntKi ) THEN
! check to see if the filename is the name of the SlD input file
IF ( ThisArgUC(1:3) == "SLD" ) THEN
IF ( ThisArgUC(1:9) == "NONLINEAR" ) THEN
CLFlags%SlDNonLinearForcePortionOnly = .TRUE.
RETURN
ELSEIF ( ThisArgUC(1:3) == "SLD" ) THEN
sldFlagSet = .TRUE. ! More logic in the routine that calls this one to set things.
RETURN
ELSEIF ( ThisArgUC(1:2) == "VV" ) THEN
Expand Down Expand Up @@ -549,6 +554,12 @@ SUBROUTINE ReadDvrIptFile( DvrFileName, DvrFlags, DvrSettings, ProgInfo, ErrStat
ErrStatTmp,ErrMsgTmp, UnEchoLocal )
if (Failed()) return

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



!-------------------------------------------------------------------------------------------------
! SoilDyn time series input -- this is read from a file of 7 columns (time and 6 dof)
Expand Down
1 change: 1 addition & 0 deletions modules/soildyn/src/driver/SoilDyn_Driver_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ MODULE SoilDyn_Driver_Types
LOGICAL :: DTDefault = .FALSE. !< specified a 'DEFAULT' for the time resolution
LOGICAL :: Verbose = .FALSE. !< Verbose error reporting
LOGICAL :: VVerbose = .FALSE. !< Very Verbose error reporting
LOGICAL :: SlDNonLinearForcePortionOnly = .FALSE. !< To only return the non-linear portion of the reaction force
END TYPE SlDDriver_Flags


Expand Down