Skip to content

Commit 277bdd9

Browse files
committed
RAFT model update, documentation improvements, fairlead warning
-- updated RAFT development to allow creation of raft input dictionary based on project state rather than just input yaml - you can use helpers.createRAFTDict() to create a RAFT dictionary input based on project's current state, then call project.getRAFT() to make the raft model - this process is shown in examples/03_Frequency_Domain_Analysis_RAFT/02_FOWT - fixes small bug if getRAFT is called multiple times, to ensure the platform heading is not reversed -- documentation imporvements to examples in examples/02_Mooring_Analysis_MoorPy and examples/08_Design_Adjustment/01_Fairleads.yaml -- added exception when loading in a yaml if multiple moorings attached to 1 fairlead. This is a common mistake in yamls, so this exception explains the error and hwo to fix
1 parent d5bfef2 commit 277bdd9

File tree

9 files changed

+78
-1448
lines changed

9 files changed

+78
-1448
lines changed

examples/01_Visualization/02_visual_moorings.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ mooring_line_configs:
7070
sections: #in order from anchor to fairlead
7171
- mooringFamily: chain # ID of a mooring line section material type
7272
# (alternatively could define mooring material properties in a mooring_line_properties section and use type: <mooring prop id> instead of mooringFamily and d_nom))
73-
d_nom: .1549 # nominal diameter of material [m] (not required if using type: <mooring prop id> instead of mooringFamily)
73+
d_nom: .1549 # nominal diameter of material [m] (used to scale the material properties of the line correctly) (not required if using type: <mooring prop id> instead of mooringFamily)
7474
length: 497.7 # [m] usntretched length of line section
7575
- mooringFamily: polyester # ID of a mooring line section material type
76-
d_nom: .182 # nominal diameter of material [m]
76+
d_nom: .182 # nominal diameter of material [m] (used to scale the material properties of the line correctly) (not required if using type: <mooring prop id> instead of mooringFamily)
7777
length: 199.8 # [m] length (unstretched)
7878

7979

examples/02_Mooring_Analysis_MoorPy/01_moorings.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,12 @@ array:
99
keys : [ID, topsideID, platformID, mooringID, x_location, y_location, heading_adjust]
1010
data : # ID# ID# ID# [m] [m] [deg]
1111
- [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 ]
12+
- [fowt0, 0, 1, ms1, -1600, -1600, 0 ]
2013

2114
platform:
22-
type : FOWT
23-
rFair : 58
24-
zFair : -14
15+
type : FOWT # designates a floating offshore wind turbine platform. other types can be WEC (wave energy converter), substation, etc
16+
rFair : 58 # fairlead radius from platform center [m]
17+
zFair : -14 # fairlead depth from platform center [m]
2518

2619

2720

@@ -34,7 +27,15 @@ mooring_systems:
3427
name: 2-line semi-taut polyester mooring system with a third line shared
3528

3629
keys: [MooringConfigID, heading, anchorType, lengthAdjust]
30+
# MooringConfigID: references a key from mooring_line_configs section.
31+
# In this case, we have a mooring line configuration defined below called 'semitaut-poly_1'. Each mooring line in this system (ms1) uses that configuration.
32+
# heading: compass heading, relative to 0 deg platform heading
33+
# In this case, we have a mooring line at 150 deg (Southeast if platform heading is 0),
34+
# a line at 270 deg (due West if platform heading is 0), and a line at 30 deg (Northeast if platform heading is 0).
35+
# anchorType: references a key from anchor_types section. In this case, we have a drag-embedment anchor type defined below called 'drag-embedment1'.
36+
# Each mooring line in this system (ms1) uses that anchor type.
3737
data:
38+
# the order of lines here corresponds to the order they are added to the project mooringList, and affects their name. The first line will have name fowt0a, second fowt0b, etc.
3839
- [ semitaut-poly_1, 150 , drag-embedment1, 0 ]
3940
- [ semitaut-poly_1, 270 , drag-embedment1, 0 ]
4041
- [ semitaut-poly_1, 30 , drag-embedment1, 0 ]
@@ -50,11 +51,11 @@ mooring_line_configs:
5051
span: 642 # 2D x-y distance from fairlead to anchor
5152

5253
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]
54+
- mooringFamily: chain # ID of a mooring line material
55+
d_nom: .1549 # nominal diameter of material [m] (used to scale the material properties of the line correctly)
5556
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]
57+
- mooringFamily: polyester # ID of a mooring line material
58+
d_nom: .182 # nominal diameter of material [m] (used to scale the material properties of the line correctly)
5859
length: 199.8 # [m] length (unstretched)
5960

6061

examples/02_Mooring_Analysis_MoorPy/02_moorings_cables.yaml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ array:
1111
- [fowt0, 0, 1, ms1, -1600, -1600, 0 ]
1212
- [fowt1, 0, 1, ms1, 0, -1600, 180 ] # 2 array, shared moorings
1313
- [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 ]
2014

2115
platform:
2216
type : FOWT
@@ -42,7 +36,7 @@ mooring_systems:
4236

4337
# Mooring line configurations
4438
mooring_line_configs:
45-
39+
# see 01_moorings.yaml in this folder or 01_Visualization/02_visual_moorings.yaml for explanation of each entry
4640
semitaut-poly_1: # mooring line configuration identifier, matches MooringConfigID
4741

4842
name: Semitaut polyester configuration 1 # descriptive name
@@ -76,22 +70,22 @@ array_cables:
7670

7771
# Dynamic and cable configurations
7872
dynamic_cable_configs:
79-
# 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)
73+
# 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)
8074
lazy_wave1:
81-
name: Lazy wave configuration 1 (simpler approach)
75+
name: Lazy wave configuration 1
8276
voltage: 66 # [kV]
8377
span : 195 # [m] horizontal distance to end of dynamic cable from attachment point
8478
A: 300 # cable conductor area [mm^2]
85-
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
79+
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
8680
length: 353.505 # [m] length (unstretched)
87-
rJTube : 5 # [m] radial distance from center of platform that J-tube is located
81+
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
8882

8983
sections:
9084
- type: Buoyancy_750m # name of buoy type from famodel/cables/cableProps_default.yaml - buoy design info read in automatically from this!
91-
L_mid: 200 # [m] from platform connection
92-
N_modules: 6
93-
spacing: 11.23 # [m]
94-
V: 1 # [m^3]
85+
L_mid: 200 # [m] length of cable from platform connection to midpoint of buoyancy section
86+
N_modules: 6 # number of buoyancy modules
87+
spacing: 11.23 # [m] spacing between buoyancy modules
88+
V: 1 # [m^3] volume of each buoyancy module, used to scale buoyancy module properties
9589

9690

9791
suspended_1:

examples/02_Mooring_Analysis_MoorPy/03_platform-hydrostatics.yaml

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,16 @@ array:
1111
- [fowt0, 0, 1, ms1, -1600, -1600, 0 ]
1212
- [fowt1, 0, 1, ms1, 0, -1600, 180 ] # 2 array, shared moorings
1313
- [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 ]
2014

2115
platform:
2216
type : FOWT
2317
rFair : 58
2418
zFair : -14
25-
hydrostatics : {m: 19911423.956678286,
26-
rCG: [ 1.49820657e-15, 1.49820657e-15, -2.54122031e+00],
27-
v: 19480.104108645974,
28-
rM: [2.24104273e-15, 1.49402849e-15, 1.19971829e+01],
29-
AWP: 446.69520543229874}
19+
hydrostatics : {m: 19911423.956678286, # mass centered at CG [kg]
20+
rCG: [ 1.49820657e-15, 1.49820657e-15, -2.54122031e+00], # center of gravity [m]
21+
v: 19480.104108645974, # volume [m^3]
22+
rM: [2.24104273e-15, 1.49402849e-15, 1.19971829e+01], # coordinates or height of metacenter relative to body reference frame [m]
23+
AWP: 446.69520543229874} # waterplane area [m^2]
3024

3125

3226

@@ -74,53 +68,3 @@ anchor_types:
7468
drag-embedment1:
7569
type : DEA # type of anchor (drag-embedment anchor)
7670

77-
78-
# Array cables
79-
array_cables:
80-
keys: [ AttachA, AttachB, DynCableA, DynCableB, headingA, headingB, cableType]
81-
data:
82-
- [ fowt0, fowt1, suspended_1, None, 90, 90, None] # suspended cable, so only one dynamic cable configuration, no static cable
83-
- [ fowt1, fowt2, lazy_wave1, lazy_wave1, 240, 300, static_cable_66]
84-
85-
# Dynamic and cable configurations
86-
dynamic_cable_configs:
87-
# 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)
88-
lazy_wave1:
89-
name: Lazy wave configuration 1 (simpler approach)
90-
voltage: 66 # [kV]
91-
span : 195 # [m] horizontal distance to end of dynamic cable from attachment point
92-
A: 300 # cable conductor area [mm^2]
93-
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
94-
length: 353.505 # [m] length (unstretched)
95-
rJTube : 5 # [m] radial distance from center of platform that J-tube is located
96-
97-
sections:
98-
- type: Buoyancy_750m # name of buoy type from famodel/cables/cableProps_default.yaml - buoy design info read in automatically from this!
99-
L_mid: 200 # [m] from platform connection
100-
N_modules: 6
101-
spacing: 11.23 # [m]
102-
V: 1 # [m^3]
103-
104-
105-
suspended_1:
106-
name: Dynamic suspended cable configuration 1
107-
voltage: 33 # [kV]
108-
span: 1512 # [m]
109-
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
110-
A: 300 # cable conductor area [mm^2]
111-
length: 1500 # [m] length (unstretched)
112-
rJTube : 58 # [m] radial distance from center of platform that J-tube is located
113-
114-
sections:
115-
- type: Buoyancy_750m
116-
L_mid: 510 # [m] from end A
117-
N_modules: 6
118-
spacing: 18 # [m]
119-
V: 2 # [m^3]
120-
121-
- type: Buoyancy_750m
122-
L_mid: 1040 # [m] from end A
123-
N_modules: 6
124-
spacing: 18 # [m]
125-
V: 2 # [m^3]
126-

examples/03_Frequency_Domain_Analysis_RAFT/02_FOWT.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,29 @@
88
from famodel import Project
99
import matplotlib.pyplot as plt
1010
import os
11+
from famodel.helpers import createRAFTDict
1112

1213
# define name of ontology input file
1314
dir = os.path.dirname(os.path.realpath(__file__))
1415
input_file = os.path.join(dir,'02_FOWT.yaml')
1516

16-
# initialize Project class with input file, we don't need RAFT for this so mark False
17+
# initialize Project class with input file
1718
project = Project(file=input_file,raft=True)
1819

19-
# pull out RAFT object, this will only have a raft platform (no turbine), because we didn't specify a RAFT turbine definition in the ontology file
20+
project.plot3d(plot_fowt=True) # plot the system
21+
22+
# - - - Let's adjust the heading of one platform, and then re-create the raft model - - -
23+
project.platformList['fowt0'].setPosition(project.platformList['fowt0'].r, heading=180, degrees=True) # rotate platform 180 degrees
24+
25+
project.getMoorPyArray() # re-create the moorpy array
26+
27+
rd = createRAFTDict(project) # create new raft input dictionary that will account for the heading change
28+
29+
project.getRAFT(rd) # create new RAFT model
30+
31+
project.plot3d(plot_fowt=True) # plot updated system
32+
33+
# pull out RAFT object
2034
raft_model = project.array # store short cut to raft model
2135

2236
# - - - Let's try running a case - - -

examples/08_Design_Adjustment/01_Fairleads.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ array:
1717

1818
platform:
1919
type : FOWT
20-
fairleads : # list of fairlead coordinates for the platform relative to platform coordinate and 0-degree heading
20+
fairleads : # list of fairlead coordinates for the platform relative to 0-degree heading
2121
- name : fairlead1
2222
r_rel : [58, 0, -14]
23-
headings : [30, 150, 270]
23+
headings : [30, 150, 270] # corresponds to 1,2, and 3 indices for fairlead entry in mooring_systems table below
24+
# if a platform is at 0 degree heading and placed at [0,0,0] location, the fairleads would be at [29, 50.23, -14], [29, -50.23, -14], and [-58, 0, -14] respectively
25+
# if a platform is at 45 degree heading and placed at [0, 0, 0]
2426

2527

2628

@@ -35,9 +37,9 @@ mooring_systems:
3537

3638
keys: [MooringConfigID, heading, anchorType, fairlead]
3739
data:
38-
- [ semitaut-poly_1, 135 , drag-embedment1, 2]
39-
- [ semitaut-poly_1, 270 , drag-embedment1, 3]
40-
- [ semitaut-poly_1, 45 , drag-embedment1, 1]
40+
- [ semitaut-poly_1, 135 , drag-embedment1, 2] # fairlead index from platform fairleads list above, corresponds to fairlead attachment at 150 deg, but then mooring line extends outward at 135 deg
41+
- [ semitaut-poly_1, 270 , drag-embedment1, 3] # corresponds to fairlead attachment at 270 deg heading for mooring line extending outward at 270 deg
42+
- [ semitaut-poly_1, 45 , drag-embedment1, 1] # corresponds to fairlead attachment at 30 deg heading for mooring line extending outward at 45 deg
4143

4244

4345
# Mooring line configurations

0 commit comments

Comments
 (0)