-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Subsystem updates for "span" consistency, "heading", plus a couple te…
…sts updates: - In Subsystem, "span" is now used consistently to be the horizontal distance from end A to end B. - rAFair and rBFair are gone, replaced with rad_fair, z_fair , and span. - Subsystem.Heading is now compass heading in degrees. - Added a couple missing tests files, hopefully automated tests now pass.
- Loading branch information
Showing
3 changed files
with
121 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
MoorDyn Input File | ||
Case 7: Single catenary line attached to body to test 6DOF stifness - case b: 3Doffset | ||
----------------------- LINE TYPES ------------------------------------------ | ||
Name Diam MassDen EA BA/-zeta EI Cd Ca CdAx CaAx | ||
(-) (m) (kg/m) (N) (N-s/-) (-) (-) (-) (-) (-) | ||
main 0.2 200.00 2.0E+09 -1 0 4 0.27 4 0.20 | ||
----------------------- BODIES ------------------------------------------------------ | ||
ID Attachment X0 Y0 Z0 r0 p0 y0 Mass CG* I* Volume CdA* Ca* | ||
(#) (-) (m) (m) (m) (deg) (deg) (deg) (kg) (m) (kg-m^2) (m^3) (m^2) (-) | ||
1 coupled 0.00 0.00 0.00 0.00 0.00 0.00 0.0 0.0 0.000e+00 0.0 0.00 0.00 | ||
---------------------- POINTS -------------------------------- | ||
Node Type X Y Z M V CdA CA | ||
(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) | ||
1 Fixed 100.0 0.0 -50.0 0 0 0 0 | ||
2 Body1 5.0 3.0 -10.0 0 0 0 0 | ||
---------------------- LINES -------------------------------------- | ||
Line LineType EndA EndB UnstrLen NumSegs Flags/Outputs | ||
(-) (-) (-) (-) (m) (-) (-) | ||
1 main 1 2 107.00 80 pt | ||
---------------------- SOLVER OPTIONS --------------------------------------- | ||
50 WtrDpth | ||
0.0002 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) | ||
60.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 (-) | ||
------------------------ OUTPUTS -------------------------------------------- | ||
FairTen1 | ||
AnchTen1 | ||
Con1fx | ||
Con1fy | ||
Con1fz | ||
Con2fx | ||
Con2fy | ||
Con2fz | ||
Con2px | ||
Con2py | ||
Con2pz | ||
Body1fx | ||
Body1fy | ||
Body1fz | ||
Body1mx | ||
Body1my | ||
Body1mz | ||
------------------------- need this line -------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# tests MoorPy Line functionality and results (work in progres) | ||
|
||
import pytest | ||
|
||
from numpy.testing import assert_allclose | ||
|
||
import numpy as np | ||
import moorpy as mp | ||
#from moorpy.MoorProps import getLineProps | ||
from moorpy.helpers import getLineProps | ||
|
||
import matplotlib.pyplot as plt | ||
|
||
|
||
inCBs = [0, 1.0, 10.0] # friction coefficients as inputs for test_seabed | ||
|
||
|
||
|
||
def test_line_stiffness(): | ||
'''Checks stiffness of mooring lines.''' | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
|
||
import moorpy as mp | ||
import matplotlib.pyplot as plt | ||
|
||
ms = mp.System(depth=100) | ||
ms.setLineType(100, 'chain', name='chain') | ||
|
||
ms.addPoint(1, [1, 0, -100]) # anchor point | ||
ms.addPoint(-1, [0, 0, 0]) # moving point | ||
|
||
ms.addLine(99, 'chain', pointA=1, pointB=2) | ||
|
||
ms.initialize() | ||
|
||
fig, ax = ms.plot() | ||
|
||
ms.solveEquilibrium() | ||
f0 = ms.pointList[1].getForces() | ||
print(f0) | ||
print(ms.lineList[0].KA[1,1]) | ||
|
||
ms.pointList[1].setPosition([0,0.1,0]) | ||
ms.solveEquilibrium() | ||
f1 = ms.pointList[1].getForces() | ||
print(f1) | ||
print(ms.lineList[0].KA[1,1]) | ||
|
||
ms.plot(ax=ax, color='red') | ||
|
||
plt.show() | ||
|