Skip to content

Commit a219591

Browse files
committed
Mooring analysis basic examples and start of documentation
1 parent 024fba8 commit a219591

File tree

10 files changed

+602
-5
lines changed

10 files changed

+602
-5
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Simple driver file to create an FAModel project and make a moorpy system model
4+
of the array including moorings.
5+
The input file only contains the bare minimum information to build a moorpy
6+
array with moorings.
7+
"""
8+
9+
from famodel import Project
10+
import matplotlib.pyplot as plt
11+
import numpy as np
12+
13+
# define name of ontology input file
14+
input_file = '01_moorings.yaml'
15+
16+
# initialize Project class with input file, we don't need RAFT for this so mark False
17+
project = Project(file=input_file,raft=False)
18+
19+
# create moorpy array
20+
project.getMoorPyArray()
21+
22+
# - - - Let's do a quick simulation of force on the moorpy array - - -
23+
ms = project.ms # create a variable shortcut to moorpy system model
24+
print(f"Body initial position is {ms.bodyList[0].r6}") # print initial position of a platform
25+
fig, ax = ms.plot() # plot the system in original configuration
26+
ms.bodyList[0].f6Ext = np.array([3e6, 0, 0, 0, 0, 0]) # apply an external force on the body
27+
ms.solveEquilibrium3(DOFtype='both') # equilibrate
28+
fig, ax = ms.plot(ax=ax, color='red') # plot the system in displaced configuration (on the same plot, in red)
29+
30+
print(f"Body offset position is {ms.bodyList[0].r6}") # print offset position of a platform for comparison
31+
32+
33+
plt.show()
34+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Site inputs
2+
site:
3+
general:
4+
water_depth: 200
5+
# ----- Array-level inputs -----
6+
7+
# Wind turbine array layout
8+
array:
9+
keys : [ID, topsideID, platformID, mooringID, x_location, y_location, heading_adjust]
10+
data : # ID# ID# ID# [m] [m] [deg]
11+
- [fowt0, 0, 1, ms1, -1600, -1600, 180 ]
12+
# - [fowt1, 0, 1, ms1, 0, -1600, 0 ] # 2 array, shared moorings
13+
# - [fowt2, 0, 1, ms1, 1600, -1600, 0 ]
14+
# - [fowt3, 0, 1, ms1, -1600, 0, 0 ]
15+
# - [fowt4, 0, 1, ms1, 0, 0, 45 ]
16+
# - [fowt5, 0, 1, ms1, 1600, 0, 0 ]
17+
# - [fowt6, 0, 1, ms1, -1600, 1600, 0 ]
18+
# - [fowt7, 0, 1, ms1, 0, 1600, 0 ]
19+
# - [fowt8, 0, 1, ms1, 1600, 1600, 0 ]
20+
21+
platform:
22+
type : FOWT
23+
rFair : 58
24+
zFair : -14
25+
26+
27+
28+
# ----- Mooring system -----
29+
30+
# Mooring system descriptions (each for an individual FOWT with no sharing)
31+
mooring_systems:
32+
33+
ms1:
34+
name: 2-line semi-taut polyester mooring system with a third line shared
35+
36+
keys: [MooringConfigID, heading, anchorType, lengthAdjust]
37+
data:
38+
- [ semitaut-poly_1, 150 , drag-embedment1, 0 ]
39+
- [ semitaut-poly_1, 270 , drag-embedment1, 0 ]
40+
- [ semitaut-poly_1, 30 , drag-embedment1, 0 ]
41+
42+
43+
# Mooring line configurations
44+
mooring_line_configs:
45+
46+
semitaut-poly_1: # mooring line configuration identifier, matches MooringConfigID
47+
48+
name: Semitaut polyester configuration 1 # descriptive name
49+
50+
span: 642 # 2D x-y distance from fairlead to anchor
51+
52+
sections: #in order from anchor to fairlead
53+
- mooringFamily: chain # ID of a mooring line section type
54+
d_nom: .1549 # nominal diameter of material [m]
55+
length: 497.7 # [m] usntretched length of line section
56+
- mooringFamily: polyester # ID of a mooring line section type
57+
d_nom: .182 # nominal diameter of material [m]
58+
length: 199.8 # [m] length (unstretched)
59+
60+
61+
62+
# Anchor type properties
63+
anchor_types:
64+
65+
drag-embedment1:
66+
type : DEA # type of anchor (drag-embedment anchor)
67+
68+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Simple driver file to create an FAModel project and make a moorpy system model
4+
of the array including moorings and dynamic cables.
5+
The input file only contains the bare minimum information to build a moorpy
6+
array with moorings and dynamic cables (static cables are not modeled in MoorPy)
7+
"""
8+
9+
from famodel import Project
10+
import matplotlib.pyplot as plt
11+
import numpy as np
12+
13+
# define name of ontology input file
14+
input_file = '02_moorings_cables.yaml'
15+
16+
# initialize Project class with input file, we don't need RAFT for this so mark False
17+
project = Project(file=input_file,raft=False)
18+
19+
# create moorpy array
20+
project.getMoorPyArray()
21+
22+
# - - - Let's do a quick simulation of force on the moorpy array - - -
23+
ms = project.ms # create a variable shortcut to moorpy system model
24+
print(f"Body initial position is {ms.bodyList[0].r6}") # print initial position of a platform
25+
fig, ax = ms.plot() # plot the system in original configuration
26+
ms.bodyList[0].f6Ext = np.array([3e6, 0, 0, 0, 0, 0]) # apply an external force on the body [N]
27+
ms.solveEquilibrium3(DOFtype='both') # equilibrate
28+
fig, ax = ms.plot(ax=ax, color='red') # plot the system in displaced configuration (on the same plot, in red)
29+
30+
print(f"Body offset position is {ms.bodyList[0].r6}") # print offset position of a platform for comparison
31+
32+
33+
plt.show()
34+
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Site inputs
2+
site:
3+
general:
4+
water_depth: 200
5+
# ----- Array-level inputs -----
6+
7+
# Wind turbine array layout
8+
array:
9+
keys : [ID, topsideID, platformID, mooringID, x_location, y_location, heading_adjust]
10+
data : # ID# ID# ID# [m] [m] [deg]
11+
- [fowt0, 0, 1, ms1, -1600, -1600, 0 ]
12+
- [fowt1, 0, 1, ms1, 0, -1600, 180 ] # 2 array, shared moorings
13+
- [fowt2, 0, 1, ms1, 1600, -1600, 0 ]
14+
# - [fowt3, 0, 1, ms1, -1600, 0, 0 ]
15+
# - [fowt4, 0, 1, ms1, 0, 0, 45 ]
16+
# - [fowt5, 0, 1, ms1, 1600, 0, 0 ]
17+
# - [fowt6, 0, 1, ms1, -1600, 1600, 0 ]
18+
# - [fowt7, 0, 1, ms1, 0, 1600, 0 ]
19+
# - [fowt8, 0, 1, ms1, 1600, 1600, 0 ]
20+
21+
platform:
22+
type : FOWT
23+
rFair : 58
24+
zFair : -14
25+
26+
27+
28+
# ----- Mooring system -----
29+
30+
# Mooring system descriptions (each for an individual FOWT with no sharing)
31+
mooring_systems:
32+
33+
ms1:
34+
name: 2-line semi-taut polyester mooring system with a third line shared
35+
36+
keys: [MooringConfigID, heading, anchorType, lengthAdjust]
37+
data:
38+
- [ semitaut-poly_1, 150 , drag-embedment1, 0 ]
39+
- [ semitaut-poly_1, 270 , drag-embedment1, 0 ]
40+
- [ semitaut-poly_1, 30 , drag-embedment1, 0 ]
41+
42+
43+
# Mooring line configurations
44+
mooring_line_configs:
45+
46+
semitaut-poly_1: # mooring line configuration identifier, matches MooringConfigID
47+
48+
name: Semitaut polyester configuration 1 # descriptive name
49+
50+
span: 642 # 2D x-y distance from fairlead to anchor
51+
52+
sections: #in order from anchor to fairlead
53+
- mooringFamily: chain # ID of a mooring line section type
54+
d_nom: .1549 # nominal diameter of material [m]
55+
length: 497.7 # [m] usntretched length of line section
56+
- mooringFamily: polyester # ID of a mooring line section type
57+
d_nom: .182 # nominal diameter of material [m]
58+
length: 199.8 # [m] length (unstretched)
59+
60+
61+
62+
# Anchor type properties
63+
anchor_types:
64+
65+
drag-embedment1:
66+
type : DEA # type of anchor (drag-embedment anchor)
67+
68+
69+
# Array cables
70+
array_cables:
71+
keys: [ AttachA, AttachB, DynCableA, DynCableB, headingA, headingB, cableType]
72+
data:
73+
- [ fowt0, fowt1, suspended_1, None, 90, 90, None] # suspended cable, so only one dynamic cable configuration, no static cable
74+
- [ fowt1, fowt2, lazy_wave1, lazy_wave1, 240, 300, static_cable_66]
75+
76+
# Dynamic and cable configurations
77+
dynamic_cable_configs:
78+
# contains the subsections that make up each section of the subsea cable (i.e., what sections make up the lazywave cable in array_cable_1)
79+
lazy_wave1:
80+
name: Lazy wave configuration 1 (simpler approach)
81+
voltage: 66 # [kV]
82+
span : 195 # [m] horizontal distance to end of dynamic cable from attachment point
83+
A: 300 # cable conductor area [mm^2]
84+
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
85+
length: 353.505 # [m] length (unstretched)
86+
rJTube : 5 # [m] radial distance from center of platform that J-tube is located
87+
88+
sections:
89+
- type: Buoyancy_750m # name of buoy type from famodel/cables/cableProps_default.yaml - buoy design info read in automatically from this!
90+
L_mid: 200 # [m] from platform connection
91+
N_modules: 6
92+
spacing: 11.23 # [m]
93+
V: 1 # [m^3]
94+
95+
96+
suspended_1:
97+
name: Dynamic suspended cable configuration 1
98+
voltage: 33 # [kV]
99+
span: 1512 # [m]
100+
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
101+
A: 300 # cable conductor area [mm^2]
102+
length: 1500 # [m] length (unstretched)
103+
rJTube : 58 # [m] radial distance from center of platform that J-tube is located
104+
105+
sections:
106+
- type: Buoyancy_750m
107+
L_mid: 510 # [m] from end A
108+
N_modules: 6
109+
spacing: 18 # [m]
110+
V: 2 # [m^3]
111+
112+
- type: Buoyancy_750m
113+
L_mid: 1040 # [m] from end A
114+
N_modules: 6
115+
spacing: 18 # [m]
116+
V: 2 # [m^3]
117+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Simple driver file to create an FAModel project and make a moorpy system model
4+
of the array including moorings and dynamic cables.
5+
The input file only contains the bare minimum information to build a moorpy
6+
array with moorings and dynamic cables (static cables are not modeled in MoorPy)
7+
"""
8+
9+
from famodel import Project
10+
import matplotlib.pyplot as plt
11+
import numpy as np
12+
13+
# define name of ontology input file
14+
input_file = '03_platform-hydrostatics.yaml'
15+
16+
# initialize Project class with input file, we don't need RAFT for this so mark False
17+
project = Project(file=input_file,raft=False)
18+
19+
# create moorpy array
20+
project.getMoorPyArray() # Platform hydrostatics information from ontology now used instead of default UMaine VolturnUS-S
21+
22+
# - - - Let's do a quick simulation of force on the moorpy array - - -
23+
ms = project.ms # create a variable shortcut to moorpy system model
24+
print(f"Body initial position is {ms.bodyList[0].r6}") # print initial position of a platform
25+
fig, ax = ms.plot() # plot the system in original configuration
26+
ms.bodyList[0].f6Ext = np.array([3e6, 0, 0, 0, 0, 0]) # apply an external force on the body [N]
27+
ms.solveEquilibrium3(DOFtype='both') # equilibrate
28+
fig, ax = ms.plot(ax=ax, color='red') # plot the system in displaced configuration (on the same plot, in red)
29+
30+
print(f"Body offset position is {ms.bodyList[0].r6}") # print offset position of a platform for comparison
31+
32+
33+
plt.show()
34+

0 commit comments

Comments
 (0)