Skip to content

Commit 5560099

Browse files
committed
Added marine growth example in examples/02_Mooring_Analysis_MoorPy/05_moorings_cables_marine_growth
1 parent 47aee9a commit 5560099

File tree

2 files changed

+178
-0
lines changed

2 files changed

+178
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
For more information on MoorPy, please see MoorPy documentation at https://github.com/NREL/MoorPy
9+
"""
10+
11+
from famodel import Project
12+
import matplotlib.pyplot as plt
13+
import numpy as np
14+
import os
15+
from copy import deepcopy
16+
17+
# define name of ontology input file
18+
dir = os.path.dirname(os.path.realpath(__file__))
19+
input_file = os.path.join(dir,'05_moorings_cables_marine_growth.yaml')
20+
21+
# initialize Project class with input file, we don't need RAFT for this so mark False
22+
project = Project(file=input_file,raft=False)
23+
24+
# create moorpy array
25+
project.getMoorPyArray()
26+
27+
# - - - Let's add marine growth to moorings and cables - - -
28+
# pick a mooring line to check that mg was added on
29+
moor_to_check = list(project.mooringList.values())[0]
30+
31+
# pull out nominal diameter of top line section before adding marine growth
32+
reg_line_d = deepcopy(moor_to_check.ss.lineList[-1].type['d_nom'])
33+
print('\n-------------------Initial mooring line properties--------------------')
34+
print(moor_to_check.ss.lineList[-1].type) # top line section
35+
print('----------------------------------------------------------------------\n')
36+
# Note: all line properties for all sections of a mooring line can be accessed in moor_to_check.ss.lineTypes
37+
# to ge the specific line properties of a specific section of a mooring line, use moor_to_check.ss.lineList[x].type
38+
# where x is the index of the line section. Adding marine growth generally increases # of line sections
39+
40+
# add marine growth to all mooring lines (mg added based on dict in yaml)
41+
print('Adding marine growth')
42+
project.getMarineGrowth(tol=2.5) # tol is tolerance for depth that the mooring line changes from one thickness to the next.
43+
# If tol=2.5 and thickness changes at -40 m, the thickness change can be -40 +/- 2.5 m
44+
45+
print('\n----------Marine growth 0.05 m thick mooring line properties-----------')
46+
print(moor_to_check.ss.lineList[-1].type) # top line section
47+
print('----------------------------------------------------------------------\n')
48+
49+
# pull out nominal diameter of top line section after applying marine growth
50+
mg_line_d = moor_to_check.ss.lineList[-1].type['d_nom']
51+
52+
# at top, the nominal diameter should have increased 0.2 m (.1 m thickness on each side)
53+
print('\nPristine line nominal diameter just below surface: ',reg_line_d)
54+
print('Marine growth line nominal diameter just below surface: ',mg_line_d)
55+
56+
# plot again just to make sure the mooring still looks right
57+
project.plot3d()
58+
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Site inputs
2+
site:
3+
general:
4+
water_depth: 200
5+
6+
marine_growth:
7+
keys: [thickness, lowerRange, upperRange, density]
8+
data: # (m) (m) (m) (kg/m^3)
9+
- [0.00,-200,-170, 1325] # no marine growth below 170 m depth
10+
- [0.01,-170,-40, 1325] # 10 mm marine growth between -170 m and -40 m, mg density 1325 kg/m^3
11+
- [0.05,-40,0, 1325] # 50 mm marine growth between -40 m and 0 m, mg density 1325 kg/m^3
12+
buoys: [0.01,0.01] # marine growth thickness on buoys (m)
13+
# ----- Array-level inputs -----
14+
15+
# Wind turbine array layout
16+
array:
17+
keys : [ID, topsideID, platformID, mooringID, x_location, y_location, heading_adjust]
18+
data : # ID# ID# ID# [m] [m] [deg]
19+
- [fowt0, 0, 1, ms1, -1600, -1600, 0 ]
20+
- [fowt1, 0, 1, ms1, 0, -1600, 180 ]
21+
- [fowt2, 0, 1, ms1, 1600, -1600, 0 ]
22+
23+
platform:
24+
type : FOWT
25+
rFair : 58
26+
zFair : -14
27+
28+
29+
30+
# ----- Mooring system -----
31+
32+
# Mooring system descriptions (each for an individual FOWT with no sharing)
33+
mooring_systems:
34+
35+
ms1:
36+
name: 2-line semi-taut polyester mooring system with a third line shared
37+
38+
keys: [MooringConfigID, heading, anchorType, lengthAdjust]
39+
data:
40+
- [ semitaut-poly_1, 150 , drag-embedment1, 0 ]
41+
- [ semitaut-poly_1, 270 , drag-embedment1, 0 ]
42+
- [ semitaut-poly_1, 30 , drag-embedment1, 0 ]
43+
44+
45+
# Mooring line configurations
46+
mooring_line_configs:
47+
# see 01_moorings.yaml in this folder or 01_Visualization/02_visual_moorings.yaml for explanation of each entry
48+
semitaut-poly_1: # mooring line configuration identifier, matches MooringConfigID
49+
50+
name: Semitaut polyester configuration 1 # descriptive name
51+
52+
span: 642 # 2D x-y distance from fairlead to anchor
53+
54+
sections: #in order from anchor to fairlead
55+
- mooringFamily: chain # ID of a mooring line section type
56+
d_nom: .1549 # nominal diameter of material [m]
57+
length: 497.7 # [m] usntretched length of line section
58+
- connectorType: shackle
59+
- mooringFamily: polyester # ID of a mooring line section type
60+
d_nom: .182 # nominal diameter of material [m]
61+
length: 199.8 # [m] length (unstretched)
62+
63+
64+
65+
# Anchor type properties
66+
anchor_types:
67+
68+
drag-embedment1:
69+
type : DEA # type of anchor (drag-embedment anchor)
70+
71+
72+
# Array cables
73+
array_cables:
74+
keys: [ AttachA, AttachB, DynCableA, DynCableB, headingA, headingB, cableType]
75+
data:
76+
- [ fowt0, fowt1, suspended_1, None, 90, 90, None] # suspended cable, so only one dynamic cable configuration, no static cable
77+
- [ fowt1, fowt2, lazy_wave1, lazy_wave1, 240, 300, static_cable_66]
78+
79+
# Dynamic and cable configurations
80+
dynamic_cable_configs:
81+
# contains the subsections that make up each section of the subsea dynamic cable (i.e., what sections make up the lazywave cable in array_cable_1)
82+
lazy_wave1:
83+
name: Lazy wave configuration 1
84+
voltage: 66 # [kV]
85+
span : 195 # [m] horizontal distance to end of dynamic cable from attachment point
86+
A: 300 # cable conductor area [mm^2]
87+
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
88+
length: 353.505 # [m] length (unstretched)
89+
rJTube : 5 # [m] radial distance from center of platform that J-tube is located, can be used instead of a J-tube designation in the platform description
90+
91+
sections:
92+
- type: Buoyancy_750m # name of buoy type from famodel/cables/cableProps_default.yaml - buoy design info read in automatically from this!
93+
L_mid: 200 # [m] length of cable from platform connection to midpoint of buoyancy section
94+
N_modules: 6 # number of buoyancy modules
95+
spacing: 11.23 # [m] spacing between buoyancy modules
96+
V: 1 # [m^3] volume of each buoyancy module, used to scale buoyancy module properties
97+
98+
99+
suspended_1:
100+
name: Dynamic suspended cable configuration 1
101+
voltage: 33 # [kV]
102+
span: 1512 # [m]
103+
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
104+
A: 300 # cable conductor area [mm^2]
105+
length: 1500 # [m] length (unstretched)
106+
rJTube : 58 # [m] radial distance from center of platform that J-tube is located
107+
108+
sections:
109+
- type: Buoyancy_750m
110+
L_mid: 510 # [m] from end A
111+
N_modules: 6
112+
spacing: 18 # [m]
113+
V: 2 # [m^3]
114+
115+
- type: Buoyancy_750m
116+
L_mid: 1040 # [m] from end A
117+
N_modules: 6
118+
spacing: 18 # [m]
119+
V: 2 # [m^3]
120+

0 commit comments

Comments
 (0)