Closed Ahirvoas closed 2 years ago
Hi Ahirvoas,
Thanks for reaching out. It's very exciting to see the code being used by more people! Apologies for the delayed response.
In general, MoorPy is still very much in a "development" phase and the documentation is still very much in progress.
It seems like your approach and logic are all correct, but I'll offer some suggestions to get things working:
I'm not sure which branch you are using, but the "master" branch has not been updated in a while. The "dev" branch is the most up-to-date.
The System.solveEquilibrium() method is very out-of-date. We have been using the System.solveEquilibrium3() method for all of our equilibrium solves
I just pushed an update to the dev branch that comments out the solveEquilibrium() method, renames the solveEquilibrium3() method to solveEquilibrium(), and adds in another solveEquilibrium3() method to call the new solveEquilibrium() method to account for our other dependencies. So for now, keep calling solveEquilibrium().
I am slightly confused because I don't see the getSystemStiffness() method calling any solveEquilibrium() method
Here are my suggestions of what you should do to produce the stiffness matrix of the OC3 spar:
ms = mp.System('NRELOffshrBsline5MW_OC3Hywind_MoorDyn.dat', depth=320)
ms.initialize(plots=0)
print(ms.bodyList[0].type)
If the above printed line is 0, then the body is a free body. If it's 1, it's fixed. If it's -1, it's coupled
ms.solveEquilibrium(DOFtype="free", plots=0, rmsTol=10, maxIter=200)
This call to solveEquilibrium (see the recent commit) will not change anything if the body type is 1 or -1, since there are no free points to equilibrate If the body type is 0, then the body will want to balance forces, which include weight/buoyancy (see the Body class)
Now that the system is equilibrated, we can calculate the stiffness matrix If the body type is 0, I would recommend
K_mooring1 = ms.getSystemStiffness(DOFtype="free", dx = 0.1, dth = 0.1, solveOption=1, plots=0)
If the body is -1, I would recommend
K_mooring2 = ms.getCoupledStiffness(any optional inputs you want)
Regardless of the body type, I would still recommend running
K_mooringA = ms.getSystemStiffnessA(options)
And comparing this to any of the other system stiffness matrices, especially in terms of run time (it's a much more efficient method)
Hopefully this clears up any issues between solveEquilibrium and any system stiffness method.
Stein
Presumably resolve, so closing this issue.
Dear Moorpy developers,
I noticed a strange behavior of MoorPy 0.9.0 when estimating the stiffness matrix of the OC3-Hywind system. Indeed, the value of the lastly mentioned matrix varies depending on the selection (or not) of the plots parameter in the solveEquilibrium method.
Below is the input file I used with MoorPy:
And hereafter, the python script used to compute the stiffness matrices:
Then, I figured out, thanks to the source code, that the method getSystemStiffness is calling solveEquilibrium function with plots parameter sets to zero. Thus, I am now using the following approach to get the stiffness matrix:
Best regards,