How to use MoorDyn V2

Dear everyone,
I now want to carry out a combination of synthetic fibers and anchor chains for mooring, as synthetic fibers are very nonlinear, but MoorDyn can only compute linear chains, and I learned that MoorDynv2 can compute nonlinearities and Wave kinematics, and Bending stiffness. so I would like to upgrade my MooeDyn to the V2 version.
Normally I modify MoorDyn’s inputfile to modify the mooring parameters, but I looked at https://moordyn.readthedocs.io/en/latest/theory.html and it’s not too clear how MoorDynv2 is coupled to openfast, is it still necessary to MoorDynDriver? , and at the same time is it required to be coupled with Python to work?
I hope to get help from everyone, thank you very much!
Best regards,

Dear @Yushun.Fu,

As of OpenFAST v3.3 and newer, OpenFAST is coupled to MoorDyn v2 rather than older versions of MoorDyn.

Best regards,

Dear Jason,


Thank you for your reply, as stated above, if I want to use synthetic fibers as my mooring lines, in order to account for nonlinearities, please is there an example of the file content for the alternative number, I’d like to see what the content and format of the file looks like.
I didn’t understand why there is also a column about time, do Stiffness, Internal damping, and Bent stiffness change over time, and is nonlinearity expressed through time changes?
Best regards,

Dear @Matthew.Hall
I want to try to simulate IEA15MW using the moordynv2 version in openfast, and I’m currently experiencing three problems.

The first one is the problem that I want synthetic fibers as my mooring lines, so I need to take into account its nonlinearity, which is new in v2. But I’m not quite sure what a time column and a data column stand for, is there a relevant example for me to learn from?
image

The second question is I see that v2 supports Wave Kinematics and The seabed friction[Input Files — MoorDyn 2.1.0 documentation]), why does it show as uninterpretable in the initialization in fast, is there a problem with my formatting?

The third question is I see that v2 version can consider Water Kinematics, in this input file waveelev.dat here can I use the Wave1Elev output in hydrodyn?

By the way, what is MoorDynDriver_x64 used for, I’m a little bit confused
Looking forward to your reply!

Best regards,

Dear @Matthew.Hall,
I’m working on a floating offshore wind turbine with semisubmersible platform using OpenFAST (namely, test 25, “5MW_OC4Semi_WSt_WavesWN”). I’m trying to model the mooring dynamics nonlinearly by using MoorDyn model (Fortran). As far as I know, MoorDyn model is based on a linear relationship between the tension and strains of mooring lines, represented by module of elasticity (E). However, I read that MoorDyn v2 can handle a nonlinear relationship between the tension and the strains of mooring lines. This paper : https://www.nrel.gov/docs/fy23osti/83342.pdf, discusses how to extend the capabilities of MoorDyn to handle this nonlinear relationship by looking into a user-defined lookup table.

My concern is about whether there’s a regression test in OpenFAST that incorporates MoorDyn v2, particularly considering its capability to handle the nonlinear relationship of mooring lines in MoorDyn.

Any help is appreciated.

Regards,

@Asma.Omar there is not a regression test that incorporates the non-linear look-up table in MoorDyn, however all the regression tests are up-to-date with MoorDyn v2. The paper you reference does document how MoorDyn incorporate non-linear line behavior. For the specifics of how to implement that in an input file, check out this section of the docs: Input Files — MoorDyn 2.2.2 documentation.

In general if you want example MoorDyn input files, the testing directory of the MD-C repo has a lot of good examples with v2 features (none have non-linear EA): MoorDyn/tests/Mooring at dev · FloatingArrayDesign/MoorDyn · GitHub

Heres an example of a v2 input file using non-linear stress-strain relationship:

MD input:

MoorDyn Input File                                        
----------------------- LINE TYPES ------------------------------------------        
Name  Diam  MassDen  EA       BA/-zeta   EI    Cd    Ca   CdAx   CaAx 
(-)   (m)   (kg/m)   (N)      (N-s/-)   (-)   (-)   (-)   (-)   (-)      
main  0.333  685.00  strain.txt  -1        0     1    0.27  1      0.20 
---------------------- ROD TYPES ------------------------------------
TypeName      Diam     Mass/m    Cd     Ca      CdEnd    CaEnd
(name)        (m)      (kg/m)    (-)    (-)     (-)      (-)
main           0.333   3.27E+09   1      0.27   1         0.20
---------------------- RODS ----------------------------------------
ID   RodType  Attachment  Xa    Ya    Za    Xb      Yb     Zb    NumSegs  RodOutputs
(#)  (name)    (#/key)    (m)   (m)   (m)   (m)     (m)    (m)   (-)       (-)
1     main      Fixed       0     0     -15   0       0     -10   3         p
---------------------- POINTS --------------------------------                                       
Node Type      X     Y      Z     M    V   CdA   CA
(-)  (-)      (m)   (m)    (m)   (kg) (m^3)  (m^2) (-)
1   Fixed  -800.0   0.0  -215.0    0    0    0    0
2   Fixed  800.0   0.0  -215.0    0    0    0    0
---------------------- LINES --------------------------------------       
Line  LineType NodeAnch  NodeFair UnstrLen  NumSegs    Flags/Outputs                   
(-)   (-)      (-)       (-)      (m)       (-)        (-)                 
1     main      1         R1a       850.00    40          p  
2     main      2         R1a       850.00    40          p                   
---------------------- SOLVER OPTIONS ---------------------------------------    
2        writeLog 
215      WtrDpth                                       
0.001    dtM       - time step to use in mooring integration (s)
3.0e6    kBot      - bottom stiffness (Pa/m)
3.0e5    cBot      - bottom damping (Pa-s/m)
1.0      dtIC      - time interval for analyzing convergence during IC gen (s)
200.0     TmaxIC    - max time for ic gen (s)
4.0      CdScaleIC - factor by which to scale drag coefficients during dynamic relaxation (-)
0.001    threshIC  - threshold for IC convergence (-)   
0.1             dtOut                                       
-------------------------- OUTPUTS --------------------------------
FAIRTEN1   
Line1N20Ten                               
------------------------- need this line --------------------------------------                                                                                     

strain.txt:

----Polyester----
  Strain    Tension
  (-)       (N)
  0.0       0.0
  100       1e8

Dear @Ryan.Davies,
Thank you for your response. I have a few questions.
1- Based on my understanding, I can not use the example of MoorDyn v2 with non-linear look-up table that you have included in your response as my MoorDyn input file for test “5MW_OC4Semi_WSt_WavesWN”, because the MoorDyn input file has to be compatible with the specifications of the test I am using, is this correct?
2- Those examples of MoorDyn v2 you were referring to, can they be used with any of OpenFAST’s regression tests?
3- Based on your response: “all the regression tests are up-to-date with MoorDyn v2”, the MoorDyn input file I’m using with test “5MW_OC4Semi_WSt_WavesWN” is then v2?

Your help is appreciated, Ryan.

Regards,

Hi @Asma.Omar,

  1. Correct, if you wanted to use a non-linear look-up table in the 5MW_OC4Semi_WSt_WavesWN case you mentioned then you would format the look-up table it like the one I shared above and then replace the value of EA in the MoorDyn input file with the file name (like it is done in the example). The look-up table text file needs to be in the same directory as the executable calling MoorDyn, or you can provide the file path as the EA value. The example I provided would work with the MoorDyn driver, using a standard driver file. The driver allows MoorDyn to be run on it’s own, separate from OpenFAST. You can find more info about it in the MoorDyn documentation I linked above.
  1. No, the examples I mentioned are just examples of what MoorDyn input files looks like. The regression tests are each a unique configuration, and so the mooring systems described in the MoorDyn input file wont necessarily swap between them.

  2. Yes. MoorDyn v1 is deprecated and not used in any of the most recent versions of OpenFAST, WECSim, or other codes. MoorDyn v1 still is available as a C++ code, but all users should use v2 unless they have a specific reason not to.

Hi @Ryan.Davies,
Thank you for your clear responses. I appreciate your assistance.

Regards,

Hi @Ryan.Davies,

I followed your instructions on how to use the non-linear lookup table, and I did so. However, I received an error saying:
" FAST_InitializeAll:MD_Init:Less than the minimum of 2 data lines found in file strain.txt (first 3 lines are headers)."

It is appreciated If you have any idea about this error.

@Asma.Omar can you paste your input file in here? Also are you are using the most up to date version of OpenFAST (Releases · OpenFAST/openfast · GitHub)?

Hey @Ryan.Davies, the OpenFAST version I’m using is: OpenFAST-v3.5.1.

My MoorDyn input file “NRELOffshrBsline5MW_OC4DeepCwindSemi_MoorDyn” is as follows:
--------------------- MoorDyn Input File ------------------------------------
Mooring system for OC4-DeepCwind Semi
FALSE Echo - echo the input file data (flag)
----------------------- LINE TYPES ------------------------------------------
Name Diam MassDen EA BA/-zeta EI Cd Ca CdAx CaAx
(-) (m) (kg/m) (N) (N-s/-) (-) (-) (-) (-) (-)
main 0.0766 113.35 7.536E8 -1.0 0 2.0 0.8 0.4 0.25
nonLinStr 0.0766 113.35 strain.txt -1.0 0 2.0 0.8 0.4 0.25
---------------------- POINTS --------------------------------
ID Attachment X Y Z M V CdA CA
(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-)
1 Fixed 418.8 725.383 -200.0 0 0 0 0
2 Fixed -837.6 0.0 -200.0 0 0 0 0
3 Fixed 418.8 -725.383 -200.0 0 0 0 0
4 Vessel 20.434 35.393 -14.0 0 0 0 0
5 Vessel -40.868 0.0 -14.0 0 0 0 0
6 Vessel 20.434 -35.393 -14.0 0 0 0 0
---------------------- LINES --------------------------------------
ID LineType AttachA AttachB UnstrLen NumSegs Outputs
(-) (-) (-) (-) (m) (-) (-)
1 nonLinStr 1 4 835.35 20 -
2 nonLinStr 2 5 835.35 20 -
3 nonLinStr 3 6 835.35 20 -
---------------------- SOLVER OPTIONS ---------------------------------------
0.001 dtM - time step to use in mooring integration (s)
3.0e6 kbot - bottom stiffness (Pa/m)
3.0e5 cbot - bottom damping (Pa-s/m)
2.0 dtIC - time interval for analyzing convergence during IC gen (s)
60.0 TmaxIC - max time for ic gen (s)
4.0 CdScaleIC - factor by which to scale drag coefficients during dynamic relaxation (-)
0.01 threshIC - threshold for IC convergence (-)
------------------------ OUTPUTS --------------------------------------------
FairTen1
FairTen2
FairTen3
AnchTen1
AnchTen2
AnchTen3
END
------------------------- need this line --------------------------------------

@Asma.Omar thank you, can you also share your strain.txt file? MoorDyn can be quite picky when it comes to formatting some times. In the meantime I would suggest updating to OpenFAST 3.5.3, as there have been a number of updated to MoorDyn since 3.5.1.

Hey @Ryan.Davies,
The contents of strain.txt file are:
----Polyester----
Strain Tension
(-) (N)
0.0 0.0
100 1e8

I will update OpenFAST to v 3.5.3, hoping this can solve the issue. Thank you for your assistance.

@Asma.Omar I just double checked your input file against the dev branch of OpenFAST and had no issues, so I am guessing the update on your end will change things. You might need to remove the Echo flag if you are using the MoorDyn driver.

Hi @Ryan.Davies,
Thank you for you continuous help!

I have updated OpenFAST to v 3.5.3, and I still have the same type of error. However, you mentioned above "The example I provided would work with the MoorDyn driver, using a standard driver file. ", I would like to inform you that I’m running MoorDyn as part of OpenFAST, and I’m placing “strain.txt” file in the same directory as the openfast executable file. I was guessing that I might have placed the look-up table file in the wrong directory!

I appreciate your assistance.

@Asma.Omar a couple thoughts. I tried running the two input files you provided with the MD driver on v3.5.3 and was not able to replicate your error. MoorDyn ran fine and properly read the strain.txt file. However I did notice if the strain.txt file was not located in the same folder as the executable MoorDyn shows the following:

Running MoorDyn (v2.0.0, 2023-09-18).
    This is MoorDyn v2, with significant input file changes from v1.
    Copyright: (C) 2023 National Renewable Energy Laboratory, (C) 2019 Matt Hall
    Parsing MoorDyn input file: strain_stuff.dat
 found A letter in the line coefficient value so will try to load the filename.
 Read 5 data lines from lookup table file
   Created mooring system:  3 lines, 6 points, 0 rods, 0 bodies.

If you see the above (Read 5 data lines from…), then treat that as a warning that the file is in the wrong place. In the dev branch of OpenFAST we have error handling of this, but it has not yet been merged to the main branch.

If you are still getting the 2 line error I would suggest double checking you have the right OpenFAST version installed. Otherwise you could try compiling the source code from the github repo for the main branch.