-
Notifications
You must be signed in to change notification settings - Fork 44
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
Problems encountered when compiling V2 for matlab #274
Comments
Just disable the Python wrapper on CMake setting the option PYTHON_WRAPPER
as OFF
…On Sun, 17 Nov 2024, 23:36 frozenheartsaber, ***@***.***> wrote:
Hello everybody
I am trying to use Moordyn with my code in matlab. I tried to compile it
as mentioned in :
https://moordyn.readthedocs.io/en/latest/compiling.html#id4
I installed Cmake, MinGW and added them into path. I find Cmake ask me to
install a fortran installer which I fixed by installing
mingw-w64-x86_64-gcc-fortran in MINGW64. But then Cmake shows :" PyPA’s
build package is required. Please install it typing
msys64/mingw64/bin/python3.12.exe -m pip install --upgrade build". I use
cmd to install it and Cmake seems to run well, but when I use:
mingw32-make, it fails as shown in picture. I wonder how to fix it? I
tried to reinstall mingw or cmake, nothing works.
error.png (view on web)
<https://github.com/user-attachments/assets/d58b948a-a9b3-4866-9c76-7c6d6c140698>
—
Reply to this email directly, view it on GitHub
<#274>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMXKKEXLNPOR43UFOLC6IT2BELALAVCNFSM6AAAAABR6MW3CWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY3DMNRTG4ZDQNY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I installed it and found only libmoordyn.dll in the source. As shown on the website, there should be libmoordyn、libmoordyn.2 and libmoordyn.2.2. I added the path C:\Program Files (x86)MoorDynbin into Matlab, and I copied the code given in Matlab, but it could not run, I doubt if I forgot something. I hope to fix this problem. |
It seems like the path you have added does not include the MATLAB wrapper files. Try specifically adding |
Can you share your MATLAB code (if it is different from the one shared above) and MoorDyn input file? I suspect things are linked up correctly but MoorDyn is being used incorrectly |
I find the reason, so sorry for my last question. I forgot I need to create a line.txt in this example. I will try to change my old .txt here to test again. Really thank you for your advice. |
Another problem is that, during the test above, I found the result different with Orcaflex when using catenary, the tension at the fairlead seems to be fun. But tensions of lines from the anchor point to the touch down point are different in Moordyn and Orcaflex. I think it might be caused by the friction force? As I changed the shear stiffness of the seabed to 0, the result seemed to be similar in Orcaflex. I changed the cbot and friction coefficient in .txt, but nothing changed. I also changed the time step and section length into smaller pieces , but nothing helps. |
Yeah, MoorDyn and Orcaflex have different seabed friction models. Just look
for some literature about that on Google Scholar.
I tend to think that the Orcaflex model is rather inconsistent. But to be
honest, I do not know any paper with an actual validation. Not for Orcaflex
nor for MoorDyn. So take my comment just as an opinion.
…On Wed, 20 Nov 2024, 16:16 frozenheartsaber, ***@***.***> wrote:
Another problem is that, during the test above, I found the result
different with Orcaflex when using catenary, the tension at the fairlead
seems to be fun. But tensions of lines from the anchor point to the touch
down point are different in Moordyn and Orcaflex. I think it might be
caused by the friction force? As I changed the shear stiffness of the
seabed to 0, the result seemed to be similar in Orcaflex. I changed the
cbot and friction coefficient in .txt, but nothing changed.
—
Reply to this email directly, view it on GitHub
<#274 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMXKKGB7FDU5WQ75MY4YLD2BSRWVAVCNFSM6AAAAABR6MW3CWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBYHA2TKNJTHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
P.S. Another difference that shall be incidentally considered, which might
significantly affect the results on some dynamic cases, is the time
integration scheme. OrcaFlex considers a quite dissipative (rho=0.4)
generalized-alpha scheme. I sometimes needed to increase the internal
damping to compensate that.
On Wed, 20 Nov 2024, 17:33 pepe cullera, ***@***.***>
wrote:
… Yeah, MoorDyn and Orcaflex have different seabed friction models. Just
look for some literature about that on Google Scholar.
I tend to think that the Orcaflex model is rather inconsistent. But to be
honest, I do not know any paper with an actual validation. Not for Orcaflex
nor for MoorDyn. So take my comment just as an opinion.
On Wed, 20 Nov 2024, 16:16 frozenheartsaber, ***@***.***>
wrote:
> Another problem is that, during the test above, I found the result
> different with Orcaflex when using catenary, the tension at the fairlead
> seems to be fun. But tensions of lines from the anchor point to the touch
> down point are different in Moordyn and Orcaflex. I think it might be
> caused by the friction force? As I changed the shear stiffness of the
> seabed to 0, the result seemed to be similar in Orcaflex. I changed the
> cbot and friction coefficient in .txt, but nothing changed.
>
> —
> Reply to this email directly, view it on GitHub
> <#274 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAMXKKGB7FDU5WQ75MY4YLD2BSRWVAVCNFSM6AAAAABR6MW3CWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBYHA2TKNJTHE>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
I'll point to the references in the documentation for some papers regarding the seabed contact approaches used in MoorDyn: https://moordyn.readthedocs.io/en/latest/references.html#references However note that the axial and transverse friction as described in https://doi.org/10.1088/1742-6596/2362/1/012018 have only been implemented in MD-F. |
Thank you for your advice. I think other main problems will be that , I can not use current or wave by changing 0 or 1 in .txt, so as changing to the implicit time integration method. And I use my old code to make an example to do another test with current as given in the following zips. (results saves the .mat)(the fairlead point is also forced to move with assigned path) 1m_s_test_orca_compare.zip It can be found with figures below, at the begining of the simulation, an unexpected large force occurs in Moordyn, I think it is because Orcaflex did a static simulation before the dynamic simulation. I hope to try it in Moordyn. But as I can not use the new code with current, I have not tried it. And I think as said in the document, Moordyn has already used catenary solver for static caculation? In order to avoid numerical damping , I changed orcaflex into explicit calculation. But It can also be seen that, the anchor force seems to be pretty different as I mentioned before, as I know it may be caused by different firiction from your suggestion. But no matter I change which parameter, the anchor force seems do not change. I wonder how to solve above problems, I do not know if it is because I am using matlab version or I missed something else? |
I'm not sure I understand your question about currents and time integrators. A couple things to check: Does MoorDyn reach equilibrium before the simulation states? If it fails to initialized you will get a warning in the console like: "Fairlead tensions did not converge". The initial force you see is likely due to a failure to find the steady state. Secondly, it seems that after this initial transient, the anchor force (Force on Line end A) converges on a similar value to your OrcaFlex outputs, just over 5e4 N. It might be helpful to output the motions of the fairlead point from MoorDyn using Point2PX/Y/Z. This will tell you if it is actually moving as you desire. Based on your outputs there, it seems the point is stationary. |
If you could provide the console outputs moordyn produces, or your log file, it would help figure out what's going on here. |
|
Hi @frozenheartsaber, I tried replicating your error and got:
This might be a bug with the paths being picked up. I will take a look at it tomorrow. For dev notes: this is caused by the path passed to waves->setup: Line 581 in 2dadb16
What issues have you had with the time integrators? |
|
Take care, It is case sensitive. Probably we should change that
…On Tue, 26 Nov 2024, 10:27 frozenheartsaber, ***@***.***> wrote:
s->s
I put the .log with time integrator here. It shows "WRN
D:\Moordyn\MoorDyn\source\MoorDyn2.cpp:2187 readOptionsLine(): Warning:
Unrecognized option 'tscheme'"
line_implicit.log
<https://github.com/user-attachments/files/17917090/line_implicit.log>
—
Reply to this email directly, view it on GitHub
<#274 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMXKKDH275OA5IYA2OTLFL2CQ5HDAVCNFSM6AAAAABR6MW3CWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBQGA4TINBXHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I added the section and get a better results, but the initial problem is still here. I added the log file and source code below. I did not find the Point2PX/Y/Z so I used x(:,i) obtained from belowing code as an instead to show the position of the top node. |
Thank you for your advice. And I tried to change RK4 into rk4 or reverse, it works well. But no matter using ACA5 or aca5 (given in the document), it can not find the right integrator. |
Agreed @sanguinariojoe, while I'm changing the options list in Alex's PR I'll add this in |
Does moordyn say |
@frozenheartsaber that approach will work for getting the node positions in real time. In your MoorDyn outputs you need to specify specifically POINT2PX, POINT2PY, or POINT2PZ. Just double checking are you saying that one of those output channels was not working? |
Sorry,I misunderstand POINT2PX that I thought I should find it in functions, I will use it to get some output. |
It shows "Unrecognized option 'tscheme'" |
Try tScheme This case sensitivity stuff can be annoying. I'll work on making it case insensitive in an upcoming PR |
Thank you for this advice. Implicit integration works now. |
PR #276 contains a fix to the path error you were seeing @frozenheartsaber. It was only appearing in the MATLAB wrapper, which we didn't have a robust set of tests for because MATLAB is annoying. If you compile the dev branch you should now be able to run things. |
Thank you for your help! I will test it in next week. I was busy with some coupling problems last week. |
@frozenheartsaber , can we close this? |
So sorry for my late reply. I was writing a code of rigid body in the past weeks. . I will focus on running the new code with Moordyn. |
Hello everybody
I am trying to use Moordyn with my code in matlab. I tried to compile it as mentioned in : https://moordyn.readthedocs.io/en/latest/compiling.html#id4

I installed Cmake, MinGW and added them into path. I find Cmake ask me to install a fortran installer which I fixed by installing mingw-w64-x86_64-gcc-fortran in MINGW64. But then Cmake shows :" PyPA’s build package is required. Please install it typing msys64/mingw64/bin/python3.12.exe -m pip install --upgrade build". I use cmd to install it and Cmake seems to run well, but when I use:
mingw32-make, it fails as shown in picture. I wonder how to fix it? I tried to reinstall mingw or cmake, nothing works.
The text was updated successfully, but these errors were encountered: