Skip to content

Commit c1286b2

Browse files
authored
Merge pull request #325 from RyanDavies19/bugfixes
Improved Input File Handling and Improved Documentation
2 parents a8db022 + f7ca8a9 commit c1286b2

19 files changed

+423
-76
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ MoorDyn is a lumped-mass model for simulating the dynamics of mooring systems co
77
license.
88

99
Read the docs here: [moordyn.readthedocs.io](https://moordyn.readthedocs.io/en/latest/)
10+
Example uses and instructions here: [Examples](https://github.com/FloatingArrayDesign/MoorDyn/tree/dev/example)
1011

1112
It accounts for internal axial stiffness and damping forces, weight and buoyancy forces, hydrodynamic forces from Morison's equation (assuming calm water so far), and vertical spring-damper forces from contact with the seabed. MoorDyn's input file format is based on that of [MAP](https://www.nrel.gov/wind/nwtc/map-plus-plus.html). The model supports arbitrary line interconnections, clump weights and floats, different line properties, and six degree of freedom rods and bodies.
1213

@@ -21,7 +22,7 @@ MoorDyn-C. The dev branch contains new features currently in development. The v1
2122

2223
[National Renewable Energy Laboratory (NREL)](https://www.nrel.gov/):
2324

24-
- [Matt Hall](http://matt-hall.ca/moordyn.html)
25+
- Matt Hall
2526
- Ryan Davies
2627
- Andy Platt
2728
- Stein Housner

docs/compiling.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Compiling
55

66
MoorDyn is available in two forms, C and F, with two different versions, v1 and v2. V1 is
77
the original MoorDyn code, containing just point and line objects. V2 is the upgraded
8-
version of MoorDyn v1. You can read more on the :ref:`home page <index>`. It includes that
9-
capability to simulate rigid bodies, non-linear tension, wave kinematics, bending
8+
version of MoorDyn v1. You can read more on the :ref:`home page <index>`. It includes the
9+
capability to simulate rigid bodies, nonlinear tension, wave kinematics, bending
1010
stiffness, and more. Further details can be found in the :ref:`theory section <theory>`
1111
and :ref:`structure section <structure>`.
1212

@@ -70,7 +70,7 @@ This can be done by executing the following command:
7070
Linux
7171
^^^^^
7272

73-
Some GNU/Linux distributions have already packages deployed for their package
73+
Some GNU/Linux distributions already have packages deployed for their package
7474
managers, which would make your life way easier.
7575
Otherwise, a self-extracting package is also provided.
7676

@@ -96,7 +96,7 @@ However, it is strongly recommended to compile it yourself with
9696
To use the self-extracting package head your browser to the
9797
`releases page <https://github.com/FloatingArrayDesign/MoorDyn/releases>`_,
9898
select/expand the latest release, download the file named
99-
"Moordyn-X.Y.Z-Linux.sh" (with X.Y.Z the specific version you chosen) and
99+
"Moordyn-X.Y.Z-Linux.sh" (with X.Y.Z being the specific version you choose) and
100100
execute it.
101101

102102
NOTE: The self-extracting file you have downloaded cannot be executed until you

docs/drivers.rst

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ MoorDyn-F contains a driver script that has a :ref:`separate input file <MDF_dri
88
and MoorDyn-F compiles in OpenFAST as moordyn_driver. The MoorDyn-F driver follows all
99
the same principles as the examples below. See :ref:`compiling <compiling>` and
1010
:ref:`inputs <inputs>` sections for instructions on how to use the MoorDyn-F driver.
11+
Additionally, MoorDyn-F has a c-bindings interface, which allows it (along with the rest
12+
of OpenFAST) to be coupled with other languages. The MoorDyn-F C interface is set up using
13+
the MoorDyn V1 approach (single 6 DOF coupling), thus it requires a single coupled body to
14+
be used in the MoorDyn input file.
1115

1216
Currently MoorDyn-C v2 can be used in Python, C/C++, Fortran, and Matlab. You can
1317
read more on how to install MoorDyn for each different language in
@@ -80,6 +84,8 @@ MoorDyn-C can be compiled as a dynamically linked library with C bindings or a m
8084
sophisticated API functions and wrappers, making it accessible from a wide range of
8185
programming languages.
8286

87+
Further examples of MoorDyn-C drivers with input files can be found in the `examples folder <https://github.com/FloatingArrayDesign/MoorDyn/tree/dev/example>`_.
88+
8389
Python
8490
^^^^^^
8591
.. _python_wrapper:
@@ -127,11 +133,9 @@ control:
127133
for node_id in range(n_segs+1):
128134
print(" node {}:".format(node_id))
129135
pos = moordyn.GetLineNodePos(line, node_id)
130-
printf(" pos = {}".format(pos))
136+
print(" pos = {}".format(pos))
131137
ten = moordyn.GetLineNodeTen(line, node_id)
132-
printf(" ten = {}".format(ten))
133-
}
134-
}
138+
print(" ten = {}".format(ten))
135139
136140
# Alright, time to finish!
137141
moordyn.Close(system)
@@ -811,3 +815,15 @@ After developing a coupling with MoorDyn, the DualSPHysics team has forked it in
811815
a seperate version called MoorDyn+, specifically dedicated to the coupling with
812816
DualSPHysics.
813817

818+
OpenFOAM
819+
^^^^^^^^
820+
821+
MoorDyn-C has been coupled with OpenFOAM through the `foamMooring <https://gitlab.com/hfchen20/foamMooring>`_ project.
822+
823+
Bladed
824+
^^^^^^
825+
826+
MoorDyn V1 has been coupled with DNV's Bladed software. See the following links for details:
827+
828+
- `MoorDyn-Bladed Coupling Documentation <https://mysoftware.dnv.com/download/public/renewables/bladed/documentation/4_16/workflow/coSimulation/Bladed-MoorDynLink/Overview.html>`_
829+
- `MoorDyn-Bladed Coupling Theory <https://asmedigitalcollection.asme.org/OMAE/proceedings/IOWTC2023/87578/V001T01A011/1195013>`_

docs/index.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,13 @@ for the use of the MoorDyn-F driver can be found :ref:`here <MDF_driver_in>`.
8787

8888
MoorDyn-C is designed for coupling with a wide number of codes. Some
8989
couplings already exist and can be found :ref:`here <coupling>` (e.g. WEC-Sim
90-
and DualSPHysics). For Coupling with other codes or more manual driving of
90+
and DualSPHysics). For coupling with other codes or more manual driving of
9191
MoorDyn from your own script, several APIs, wrappers, and example driver
92-
scripts are available :ref:`here <drivers>`.
92+
scripts are available :ref:`here <drivers>`.
93+
94+
Additionally, an example directory contains instructions for common couplings
95+
and basic input file set ups. A recording of the presentation that walks through
96+
the directory is also available `here <https://www.youtube.com/watch?v=FqW7Xpl_VNk>`_.
9397

9498
Table of Contents:
9599
------------------

docs/inputs.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ 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. # is the general comment chacater. If you are adding notes
250+
the entries in that section's table of inputs. # is the general comment character. If you are adding notes
251251
to self after any of the lines, # will prevent MoorDyn from reading them.
252252

253-
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).
253+
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 because they are for tests).
254254

255255
Examples for MoorDyn-F can be found in the `OpenFAST tests <https://github.com/OpenFAST/r-test/tree/main/modules/moordyn>`_.
256256

@@ -301,9 +301,9 @@ The columns in order are as follows:
301301
for end nodes (and thus end half-segments), so if simulating VIV users should ensure to include a higher number of segments.
302302
Also note that VIV has only been tested with explicit time schemes (specifically rk2 and rk4). There may be unexpected behavior
303303
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
304+
- dF - OPTIONAL - the cF +- range of non-dimensional frequencies for the CF VIV synchronization model. If it is not
305305
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
306+
- cF - OPTIONAL - the center of the range of non-dimensional frequencies for the CF VIV synchronization model. If it is not
307307
provided and VIV is enabled (Cl > 0) then it is default to 0.18 to align with the the theory found :ref:`here <version2>`
308308

309309
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
@@ -320,10 +320,10 @@ tabulated file with 3 header lines and then a strain column and a tension column
320320
... ...
321321
322322
Note: MoorDyn has the ability to model the viscoelastic properties of synthetic lines in two ways. The first method, from work linked in the
323-
:ref:`theory section <theory>`, allows a user to specify a bar-seperated constant dynamic and static stiffness. The second method allows the user
323+
:ref:`theory section <theory>`, allows a user to specify a bar-separated constant dynamic and static stiffness. The second method allows the user
324324
to provide a constant static stiffness and two terms to determine the dynamic stiffness as a linear function of mean load. The equation is:
325325
`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
326+
and dynamic damping coefficients as values separated by |. While the static damping can be described as a fraction of critical, the dynamic damping
327327
needs to be input as a value. Example inputs are below:
328328
329329
.. code-block:: none
@@ -822,7 +822,7 @@ Footnotes:
822822
- There are a couple additional outputs left over from OpenFAST conventions that don’t follow the
823823
same format: FairTen and AnchTen. FairTen[n] is the same as Line[n]TenB. For example, the
824824
fairlead tension of line 1 would be FAIRTEN1 or LINE1TENB.
825-
- The output list is not case sensistive, however all MoorDyn-F outputs will be printed to the output
825+
- The output list is not case sensitive, however all MoorDyn-F outputs will be printed to the output
826826
file in all caps. When searching OpenFAST output channels, users will need to search for MoorDyn
827827
channels in all caps. Example: the channel fairten1 would appear in the output file as FAIRTEN1.
828828

@@ -886,11 +886,11 @@ follows the order of the state vector: Body degrees of freedom, rod degrees of f
886886
degrees of freedom. For coupled pinned bodies and rods the full 6DOF need to be provided, however the rotational
887887
values will be ignored by by the MoorDyn-F driver (they can be set to zero).
888888

889-
When using the MoorDyn driver in OpenFAST mode, the inital positions represents the offsets to the
889+
When using the MoorDyn driver in OpenFAST mode, the initial positions represents the offsets to the
890890
global frame. When using OpenFAST mode with the positions set to 0's, then MoorDyn objects will be
891891
simulated based on the positions defined in the MoorDyn input file. If a non-zero value is provided,
892-
it will be incorporated into the inital positions of coupled objects. For example, if the following
893-
inital positions are given:
892+
it will be incorporated into the initial positions of coupled objects. For example, if the following
893+
initial positions are given:
894894

895895
.. code-block:: none
896896
@@ -1004,8 +1004,8 @@ data.
10041004
0.0 0.9 0.0
10051005
150 0.5 0.0
10061006
1000 0.25 0.0
1007-
1500 0.2 0.0
1008-
5000 0.15 0.0
1007+
1500 0.2 0.0
1008+
5000 0.15 0.0
10091009
--------------------- need this line ------------------
10101010
10111011
MoorDyn-F with FAST.Farm - Inputs

docs/integration_moordyn.png

98.6 KB
Loading

docs/references.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,30 @@ Non-linear line stiffness:
9797
`Lozon, Ericka, Matthew Hall, Paul McEvoy, Seojin Kim, and Bradley Ling, “Design and Analysis of a Floating-Wind Shallow-Water Mooring System
9898
Featuring Polymer Springs.” American Society of Mechanical Engineers Digital Collection, 2022. <https://doi.org/10.1115/IOWTC2022-98149>`_
9999

100+
Bladed-MoorDyn Coupling:
101+
102+
`Alexandre, Armando, Francesc Fabregas Flavia, Jingyi Yu, Ali Bakhshandehrostami, and Steven Parkinson. "Coupling Bladed With External Finite-Element Mooring Libraries."
103+
American Society of Mechanical Engineers Digital Collection, 2023. <https://doi.org/10.1115/IOWTC2023-119346>`_
104+
100105
Viscoelastic approach for non-linear rope behavior:
101106

102107
`Hall, Matthew, Brian Duong, and Ericka Lozon, “Streamlined Loads Analysis of Floating Wind Turbines With Fiber Rope Mooring Lines.” In ASME 2023
103108
5th International Offshore Wind Technical Conference, V001T01A029. Exeter, UK: American Society of Mechanical Engineers, 2023. <https://doi.org/10.1115/IOWTC2023-119524>`_
104109

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

115+
Reef3D-MoorDyn Coupling:
116+
117+
`Soydan, Ahmet, Widar Weizhi Wang, and Hans Bihs. "An Improved Direct Forcing Immersed Boundary Method With Integrated Mooring Algorithm for Floating Offshore Wind
118+
Turbines." American Society of Mechanical Engineers Digital Collection, 2024. <https://doi.org/10.1115/1.4067117>`_
119+
120+
Modeling of Bi-stable Nonlinear Energy Sinks in MoorDyn (most recent description of MoorDyn theory):
121+
122+
`Anargyros Michaloliakos, Wei-Ying Wong, Ryan Davies, Malakonda Reddy Lekkala, Matthew Hall, Lei Zuo, Alexander F. Vakakis, "Stabilizing dynamic subsea power cables using
123+
Bi-stable nonlinear energy sinks", Ocean Engineering, vol. 334, August 2025. <https://doi.org/10.1016/j.oceaneng.2025.121613>`_
109124

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

docs/structure.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ main object types: Lines, Points, Rods, and Bodies. MoorDyn v1 only contained Li
77
Lines are the fundamental discretized lumped-mass modeling component. Points and Rods provide a
88
means of connecting lines with additional 3- and 6-DOF properties (respectively), and Bodies
99
provide a way to create more complex 6-DOF rigid-body assemblies. These objects have predefined
10-
ways or interacting. Kinematics are passed from the top down in and are used to calculate the
11-
forces which are passed up back to the outside program or to output channels. This hierarchy is
10+
ways of interacting. Kinematics are passed from the top down and are used to calculate the
11+
forces which are passed back up to the outside program or to output channels. This hierarchy is
1212
shown below:
1313

1414
.. figure:: structure_moordyn.png

docs/troubleshooting.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Note that the damping ratio is with respect to the critical damping of each segm
5252
a mooring line, not with respect to the line as a whole or the floating platform as a
5353
whole. It is just a way of letting MoorDyn calculate the damping coefficient automatically
5454
from the perspective of damping non-physical segment resonances. If the model is set up
55-
right, this damping can have a negligible contribution to the overall damping provided by
55+
correctly, this damping can have a negligible contribution to the overall damping provided by
5656
the moorings on the floating platform. However, if the damping contribution of the mooring
5757
lines on the floating platform is supposed to be significant, it is best to (1) set the BA
5858
value directly to ensure that the expected damping is provided and then (2) adjust the number
@@ -69,6 +69,26 @@ However, in contrast to the damping, which can be selected line by line, the
6969
time step is a constant of the whole system, and thus should be selected
7070
considering the minimum natural period of all lines.
7171

72+
Catenary Solve Unsuccessful
73+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
74+
75+
One of the most common issues encountered when using MoorDyn is the failure of the
76+
catenary solver to converge. The catenary solver is the first step in solving the
77+
initial conditions of the system. This approach tries to use the properties and geometry
78+
of the mooring lines to solve for a catenary shape.
79+
80+
If this routine fails, you will see a "Catenary solve unsuccessful" message in the
81+
the console and the log file. This means that MoorDyn will initialize the lines
82+
as linear between the two defined end locations. After this, the ICgen process begins,
83+
which runs a simulation with no external forcing, allowing the lines to 'fall' into
84+
place. If the lines initialize as linear, then the initialization process will just take
85+
longer, requiring a larger `TmaxIC` value. Explanations about the different initial
86+
condition generating methods can be found in the :ref:`initialization section <initialization>`.
87+
88+
The "Catenary Solve Unsuccessful" message does not impact the performance of MoorDyn or
89+
the results it produces, provided the initialization process converges before the simulation
90+
begins.
91+
7292
Python errors
7393
^^^^^^^^^^^^^
7494

docs/waterkinematics.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,20 +500,20 @@ Water Kinematics (MoorDyn-F)
500500

501501
MoorDyn-F has three options for simulating wave and current loads on the MoorDyn system: the Old Method,
502502
the Hybrid Method, and the SeaState Method. Both the hybrid method and the SeaState method use a coupling
503-
with the `OpenFAST SeaState module <https://openfast.readthedocs.io/en/main/source/user/seastate/index.html>_`
503+
with the `OpenFAST SeaState module <https://openfast.readthedocs.io/en/main/source/user/seastate/index.html>`_
504504
to calculate the wave kinematics. The Old Method is a legacy method that is not coupled to SeaState. The three
505505
methods can be described as:
506506

507-
- **Old Method**: MoorDyn takes wave elevation time series and current speeds with depths as inputs generates it's
507+
- **Old Method**: MoorDyn takes wave elevation time series and current speeds with depths as inputs and generates its
508508
own water kinematics using the equivalent of WaveGrid = 3 and Currents = 1 in MoorDyn-C.
509509
- **Hybrid Method**: SeaState sets up wave elevation frequencies and current speeds and then MoorDyn interpolates
510510
this information to user provided wave grid and current depth discretization. This allows users to set the
511-
WaterKinematics for the whole OpenFAST or FAST.Farm system while still maintaining a courser grid for the MoorDyn
511+
WaterKinematics for the whole OpenFAST or FAST.Farm system while still maintaining a coarser grid for the MoorDyn
512512
water kinematics, enabling computational efficiency. This method is compatible with FAST.Farm.
513513
- **SeaState Method**: SeaState does all the work, MoorDyn just accesses the SeaState grid data at any given
514514
timestep and location. This requires the SeaState grid to encompass the whole MoorDyn system for the most
515-
accurate results. If a point is quried outside the SeaState gird, it will recive the water kinematics of
516-
the nearest grid point. This method is not compataible with FAST.Farm.
515+
accurate results. If a point is queried outside the SeaState grid, it will receive the water kinematics of
516+
the nearest grid point. This method is not compatible with FAST.Farm.
517517

518518
The table below summarizes these three options.
519519

0 commit comments

Comments
 (0)