Skip to content

Commit 5360de7

Browse files
authored
Merge pull request #295 from RyanDavies19/viv_flexstate
Vortex Induced Vibrations and Viscoelastic model for MoorDyn-C
2 parents 63f8784 + 183701d commit 5360de7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+221312
-408
lines changed

docs/inputs.rst

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ two fixed points located far from where your system is located.
247247
Most of the sections are set up to contain a table of input information. These
248248
tables begin with two preset lines that contain the column names and the
249249
corresponding units. These lines are followed by any number of lines containing
250-
the entries in that section's table of inputs.
250+
the entries in that section's table of inputs. # is the general comment chacater. If you are adding notes
251+
to self after any of the lines, # will prevent MoorDyn from reading them.
251252

252253
Examples of input files for MoorDyn-C can be found in the `test directory <https://github.com/FloatingArrayDesign/MoorDyn/tree/master/tests/Mooring>`_ (note that these do not include outputs becasue they are for tests).
253254

@@ -273,10 +274,10 @@ that will be used in the simulation
273274

274275
.. code-block:: none
275276
276-
---------------------- LINE TYPES -----------------------------------
277-
TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx
278-
(name) (m) (kg/m) (N) (N-s/-) (N-m^2) (-) (-) (-) (-)
279-
Chain 0.1 150.0 1e8 -1 0 2.3 1 1.0 0.5
277+
---------------------- LINE TYPES ----------------------------------------------------------------------
278+
TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF
279+
(name) (m) (kg/m) (N) (N-s/-) (N-m^2) (-) (-) (-) (-) (-) (-) (-)
280+
Chain 0.1 150.0 1e8 -1 0 2.3 1 1.0 0.5 0.8 0.08 0.18
280281
281282
The columns in order are as follows:
282283

@@ -294,6 +295,16 @@ The columns in order are as follows:
294295
- Ca – transverse added mass coefficient (with respect to line displacement)
295296
- CdAx – tangential drag coefficient (with respect to surface area, π*d*l)
296297
- CaAx – tangential added mass coefficient (with respect to line displacement)
298+
- Cl – OPTIONAL - the crossflow VIV lift coefficient. If set to 0, then VIV calculations are disabled for the
299+
line. This coefficient has been made backwards compatible. If it is not provided, then it is
300+
assumed to be 0.0. The theory of vortex induced vibrations can be found :ref:`here <version2>`. Note that VIV is disabled
301+
for end nodes (and thus end half-segments), so if simulating VIV users should ensure to include a higher number of segments.
302+
Also note that VIV has only been tested with explicit time schemes (specifically rk2 and rk4). There may be unexpected behavior
303+
if used with an implicit time scheme.
304+
- dF - OPTIONAL - the cF +- range of non-dimensional frequnecies for the CF VIV synchronization model. If it is not
305+
provided and VIV is enabled (Cl > 0) then it is default to 0.08 to align with the the theory found :ref:`here <version2>`
306+
- cF - OPTIONAL - the center of the range of non-dimensional frequnecies for the CF VIV synchronization model. If it is not
307+
provided and VIV is enabled (Cl > 0) then it is default to 0.18 to align with the the theory found :ref:`here <version2>`
297308

298309
Note: Non-linear values for the stiffness (EA) are an option in MoorDyn. For this, a file name can be provided instead of a number. This file
299310
must be located in the same folder as the main MoorDyn input file for MoorDyn-C or for MoorDyn-F
@@ -308,17 +319,19 @@ tabulated file with 3 header lines and then a strain column and a tension column
308319
0.0 0.0
309320
... ...
310321
311-
Note: MoorDyn-F has the ability to model the viscoelastic properties of synthetic lines in two ways. The first method, from work linked in the
322+
Note: MoorDyn has the ability to model the viscoelastic properties of synthetic lines in two ways. The first method, from work linked in the
312323
:ref:`theory section <theory>`, allows a user to specify a bar-seperated constant dynamic and static stiffness. The second method allows the user
313324
to provide a constant static stiffness and two terms to determine the dynamic stiffness as a linear function of mean load. The equation is:
314-
`EA_d = EA_Dc + EA_D_Lm * mean_load` where `EA_D_Lm` is the slope of the load-stiffness curve. Example inputs are below:
325+
`EA_d = EA_Dc + EA_D_Lm * mean_load` where `EA_D_Lm` is the slope of the load-stiffness curve. Both of these methods allow users to provide static
326+
and dynamic damping coefficients as values seperated by |. While the static damping can be described as a fraction of cricial, the dyanamic damping
327+
needs to be input as a value. Example inputs are below:
315328
316329
.. code-block:: none
317330
318-
TypeName Diam Mass/m EA
319-
(name) (m) (kg/m) (N)
320-
Polyester ... ... EA_s|EA_d <-- Constant dynamic stiffness method
321-
Polyester ... ... EA_s|EA_Dc|EA_D_Lm <-- Load dependent dynamic stiffness method
331+
TypeName Diam Mass/m EA BA
332+
(name) (m) (kg/m) (N) (N-s)
333+
Polyester ... ... EA_s|EA_d BA_s|BA_d <-- Constant dynamic stiffness method with static and dynamic damping
334+
Polyester ... ... EA_s|EA_Dc|EA_D_Lm BA_s|BA_d <-- Load dependent dynamic stiffness method with static and dynamic damping
322335
323336
Rod Types
324337
^^^^^^^^^
@@ -406,7 +419,7 @@ The columns are as follows:
406419

407420
This last entry expects a string of one or more characters without spaces, each character
408421
activating a given output property. A placeholder character such as “-” should be used if no
409-
outputs are wanted. Eight output properties are currently possible:
422+
outputs are wanted. Eight output properties are currently possible:
410423

411424
- p – node positions
412425
- v – node velocities
@@ -480,14 +493,16 @@ The columns are as follows:
480493

481494
This last entry expects a string of one or more characters without spaces, each character
482495
activating a given output property. A placeholder character such as “-” should be used if no
483-
outputs are wanted. Eight output properties are currently possible:
496+
outputs are wanted. Ten output properties are currently possible:
484497

485498
- p – node positions
486499
- v – node velocities
487500
- U – wave/current velocities at each node
488501
- D – hydrodynamic drag force at each node
489502
- t – tension force at each segment
490503
- c – internal damping force at each segment
504+
- V - the cross-flow VIV lift force at each node
505+
- K - the curvature at each node
491506
- s – strain of each segment
492507
- d – rate of strain of each segment
493508

@@ -660,8 +675,8 @@ The list of possible options is:
660675
- FricDamp (200.0): The seabed friction damping, to scale from no friction at null velocity to
661676
full friction when the velocity is large
662677
- StatDynFricScale (1.0): Ratio between Static and Dynamic friction coefficients
663-
- dtOut (0.0): Time step size to be written to output files. A value of zero will use dtM as a
664-
step size (s)
678+
- dtOut (0.0): Time step size to be written to output files. A value of zero will use the coupling
679+
timestep as a step size (s)
665680
- SeafloorFile: A path to the :ref:`bathymetry file <seafloor_in>`
666681
- ICgenDynamic (0): MoorDyn-C switch for using older dynamic relaxation method (same as MoorDyn-F).
667682
If this is enabled initial conditions are calculated with scaled drag according to CdScaleIC.
@@ -720,6 +735,9 @@ The following options from MoorDyn-F are not supported by MoorDyn-C:
720735
1: yes, 2: yes with ramp to inertialF_rampT]
721736
- inertialF_rampT (30.0): Ramp time for inertial forces to reduce coupled object instability (s).
722737
This is ignored unless inertialF = 2
738+
- OutSwitch (1): Switch to disable outputs when running with full OpenFAST simulations, where the
739+
MoorDyn-F output channels are written to the main FAST output file.
740+
0: no MD main outfile, 1: write MD main outfile
723741

724742
Outputs
725743
^^^^^^^

docs/integration_moordyn.png

226 KB
Loading

docs/references.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Viscoelastic approach for non-linear rope behavior:
104104

105105
Updated MoorDyn-OpenFOAM Coupling:
106106
`Haifei Chen, Tanausú Almeida Medina, and Jose Luis Cercos-Pita, "CFD simulation of multiple moored floating structures using OpenFOAM: An open-access mooring restraints
107-
library." Ocean Engineering, vol. 303, Jul. 2024. <https://doi.org/10.1016/j.oceaneng.2024.117697>`_`
107+
library." Ocean Engineering, vol. 303, Jul. 2024. <https://doi.org/10.1016/j.oceaneng.2024.117697>`_
108108

109109

110110
The Fortran version of MoorDyn is available as a module inside of OpenFAST:

docs/structure.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Specific to each Line:
7676
- *Cat*: real axial added mass coefficient
7777
- *Cdn*: real normal drag coefficient w/r/t frontal area
7878
- *Cdt*: real axial drag coefficient w/r/t surface area
79+
- *Cl*: real VIV cross-flow lift coefficient
7980
- *BAin*: real axial-internal damping
8081
- *A*: real cross sectional area
8182
- *nEApoints*: number of values in stress-strain lookup table

docs/tschemes.rst

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@ Time Schemes
22
============
33
.. _tschemes:
44

5+
MoorDyn advances a time step by calculating the state derivative of all
6+
the objects (free and pinned bodies and rods, free points, and lines). It
7+
then integrates this state derivative to determine the system state at the
8+
next time step. The time integration is performed by a time scheme, which
9+
are detailed in this section. The following figure demonstrates the general
10+
flow of the time integration process:
11+
12+
.. figure:: integration_moordyn.png
13+
:alt: Time integration process in MoorDyn
14+
515
MoorDyn-C version 2 is deployed with several time schemes, with different
6-
features, strengths and weaknesses.
16+
features, strengths and weaknesses as detailed in this section. The time schemes
17+
can be divided into 2 main categories: Explicit and implicit.
718

8-
.. note::
9-
MoorDyn-F only uses the Runge-Kutta 2 (RK2) time scheme in the interest
10-
of efficiency for OpenFAST simulations.
11-
Time scheme specification is not an option in the MoorDyn-F input files.
19+
MoorDyn-F only uses the Runge-Kutta 2 (RK2) or Runge-Kutte 4 (RK4) time schemes
20+
in the interest of efficiency for OpenFAST simulations.
1221

13-
They can be deivided into 2 main categories: Explicit and implicit ones.
22+
.. note::
23+
In both MoorDyn C and F, the default time scheme is RK2
1424

1525
Explicit:
1626
---------

docs/waterkinematics.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ and z = -10 are calculated by interpolating between the neighboring values.
346346

347347
For example, the current at point ``(10, -6, -5.5)`` would be ``(0.65, 0.0, 0.0)``
348348

349+
.. note::
350+
When using steady currents, CdScaleIC for the initialization should be set to a smaller value (1-2) to
351+
avoid initial transients in the simulation. Unlike waves, currents are included in dynamic relaxation.
352+
349353
.. code-block::
350354
351355
--------------------- MoorDyn steady currents File ----------------------------------

source/Body.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ Body::initializeUnfreeBody(vec6 r6_in, vec6 v6_in, vec6 a6_in)
175175
initiateStep(r6_in, v6_in, a6_in);
176176
updateFairlead(0.0);
177177

178+
// set positions of any dependent points and rods now (before they are
179+
// initialized)
180+
setDependentStates();
181+
178182
// If any Rod is fixed to the body (not pinned), initialize it now because
179183
// otherwise it won't be initialized
180184
for (auto attached : attachedR)
@@ -451,8 +455,12 @@ Body::updateFairlead(real time)
451455
}
452456

453457
void
454-
Body::setState(XYZQuat pos, vec6 vel)
458+
Body::setState(const InstanceStateVarView r)
455459
{
460+
// set position and velocity vectors from state vector
461+
const XYZQuat pos = XYZQuat::fromVec7(r.row(0).head<7>());
462+
const vec6 vel = r.row(0).tail<6>();
463+
456464
if (type == FREE) {
457465
// set position and velocity vectors from state vector
458466
r7 = pos;

source/Body.hpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -383,19 +383,11 @@ class DECLDIR Body final : public Instance, public SuperCFL
383383
void updateFairlead(real time);
384384

385385
/** @brief Set the states to the body to the position r and velocity rd
386-
* @param r The position
387-
* @param rd The velocity
386+
* @param r The body state
388387
* @{
389388
*/
390-
void setState(XYZQuat r, vec6 rd);
389+
void setState(const InstanceStateVarView r);
391390

392-
inline void setState(const InstanceStateVarView r)
393-
{
394-
setState(XYZQuat::fromVec7(r.row(0).head<7>()), r.row(0).tail<6>());
395-
}
396-
/**
397-
* @}
398-
*/
399391

400392
/** @brief calculate the forces and state derivatives of the body
401393
*

0 commit comments

Comments
 (0)