import numpy as np
import matplotlib.pyplot as plt
import moorpy as mp
from moorpy.MoorProps import getLineProps
test = mp.System(rho=0)
test.display=5
test.addLineType("main", 0.001, .14, 1e8)
test.addPoint(1, [ -2, 0, 2])
test.addPoint(1, [ 2, 0, 2])
test.addPoint(0, [ 0, 0, 1], m=2)
test.addLine(2.4, "main",100,1,3)
test.addLine(2.4, "main",100,2,3)
test.initialize()
print("tension on line 1 ", test.lineList[0].getTension(0))
print("tension on line 2 ", test.lineList[1].getTension(0))
fig, ax = test.plot2d() # plot the system in original configuration
test.solveEquilibrium()
fig, ax = test.plot2d(ax=ax, color='red')
test.unload("sample-test.txt")
print("position of vertex:", test.pointList[2].r)
print("force: ", test.pointList[2].getForces())
print("tension on line 1 ", test.lineList[0].getTension(0))
print("tension on line 2 ", test.lineList[1].getTension(0))
plt.show()
tension on line 1 3.316107942198013
tension on line 2 3.316107942198013
mooringEq X=[0. 0. 1.]
mooringEq f=[ 0. 0. -10.89274317]
mooringEq X=[-6.14721388e-33 -1.17560694e-16 2.18537683e-01]
mooringEq f=[0.00000000e+00 1.01816341e-09 1.54287891e+07]
mooringEq X=[-5.46088357e-33 -1.43598175e-16 5.88568566e-01]
mooringEq f=[0.00000000e+00 2.34083681e-10 2.30080642e+06]
mooringEq X=[-4.48518270e-33 -1.83264666e-16 6.68476925e-01]
mooringEq f=[0.00000000e+00 1.71378957e-11 1.24503070e+05]
mooringEq X=[-4.48518270e-33 -1.83264666e-16 6.68476925e-01]
mooringEq f=[0.00000000e+00 1.71378957e-11 1.24503070e+05]
attempting to write sample-test.txt for MoorDyn v2
Successfully written sample-test.txt input file using MoorDyn v2
position of vertex: [-4.48518270e-33 -1.83264666e-16 6.68476925e-01]
force: [0.00000000e+00 1.71378957e-11 1.24503070e+05]
tension on line 1 112343.32877753118
tension on line 2 112343.32877753118
based on the debug printout, it looks like the first iteration has the expected force of gravity (or close to it anyway, but the second iteration moves the force from -10 to + 1.5E7
it may be that what is happening is that I'm operating at a small enough scale that the time step is excessive and as a result, it moves too far, stretching the wires, producing insane forces. If this is it, I am not seeing where to change the resolution.