Steps to compile MoorDyn

Provide feedback, request enhancements, and get help with wind-turbine computer-aided engineering tools.

Moderators: Bonnie.Jonkman, Jason.Jonkman

Bingjun.Luo
Posts: 6
Joined: Wed Apr 24, 2019 8:49 pm
Organization: HITSZ
Location: China

Steps to compile MoorDyn

Postby Bingjun.Luo » Mon Jul 01, 2019 3:54 am

I get MoorDyn source files from the web at www.matt-hall.ca/moordyn. However there isn't a file to instruct me to compile. I learn that there are different makefiles to compile the code. Doer anybody know the steps to compile the code?

Matt.Hall
Posts: 18
Joined: Tue Apr 05, 2011 2:41 pm
Organization: NREL
Location: Boulder, CO

Re: Steps to compile MoorDyn

Postby Matt.Hall » Mon Jul 01, 2019 5:39 pm

Hi,

If you are simply looking to use MoorDyn, I'd recommend downloading the already compiled libraries rather than the source code. If you are looking to edit the code, please see below.

For Windows, the makefiles provided with MoorDyn were set up for use with MinGW. If you don't already have it, I'd suggest downloading and installing MinGW-w64. Then, you can edit the file compile32.bat (or compile64.bat for 64-bit programs) so that

Code: Select all

set PATH=C:\mingw64\bin;%PATH%
points to the "bin" directory of your MinGW installation. After that, running the .bat file is all that should be required to compile MoorDyn.

If you are using Linux or macOS, please let us know and somebody else may be able to provide better guidance.

Best,
Matt

Bingjun.Luo
Posts: 6
Joined: Wed Apr 24, 2019 8:49 pm
Organization: HITSZ
Location: China

Re: Steps to compile MoorDyn

Postby Bingjun.Luo » Sat Jul 13, 2019 9:54 am

@Matt.Hall
Thank you for your reply!
I have already compiled MoorDyn source files into MoorDyn.so file under Linux system. When I use MoorDyn to do some calculation, I meet a problem. Some errors appear like the followings:

Error: NaN value detected in MoorDyn state at dynamic relaxation time 1 s.
Error: NaN value detected in MoorDyn state at time 0.2 s.

I try to change the unstretch length of line smaller. Then these errors don't appear anymore. Though changing the unstretch length can solve the problem, the unstretch length is determinated in reality and I can't change. Does any methods to treat these errors?
My input file is shown below:
lines.txt
(2.39 KiB) Downloaded 16 times

Bingjun.Luo
Posts: 6
Joined: Wed Apr 24, 2019 8:49 pm
Organization: HITSZ
Location: China

Re: Steps to compile MoorDyn

Postby Bingjun.Luo » Sun Jul 14, 2019 3:21 am

After doing some tests, I find that if I set the Z coordinate of anchor points a little smaller than the water depth, the above errors don't appear anymore. For example, water depth is set 200 m and the Z coordinate is set -199.9 m. I know that the actual Z coordinate should be equal to the water depth, but I don't know why the above error appear.
If I set Z coordinate of anchor points a little smaller than water depth, is it OK for the calculation? Are there any big effects on the calculation?

Matt.Hall
Posts: 18
Joined: Tue Apr 05, 2011 2:41 pm
Organization: NREL
Location: Boulder, CO

Re: Steps to compile MoorDyn

Postby Matt.Hall » Fri Aug 23, 2019 4:13 pm

This is an interesting problem that I haven't figured out yet. I see that you're using the standard OC4-DeepCwind mooring system description and it was a surprise to me that the simulation was unstable (the NaN value errors). These errors don't occur in MoorDyn v1.01.00 but do occur in v1.01.01, which I assume you're using.

Your work-around of changing the anchor position to slightly above the seabed is a good approach -- I don't think this should cause any noticeable differences in the mooring dynamics results. I found that the model will also run successfully if NumSegs is reduced from 20 to 15.

Hopefully I can find the problem that is causing this and fix it in the next update. Thanks for sharing this issue!


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest