Skip to content

Commit 0cddc40

Browse files
committed
Add simple visualization examples, update unload
-- added a set of simple visualization examples with minimal ontologies -- updated cleanDataTypes() helpers function to have option to convert lowest-level lists to ruamel.yaml list objects with flow style for ease of reading when unloading a project -- added some default site values
1 parent 5f2e63a commit 0cddc40

File tree

11 files changed

+450
-22
lines changed

11 files changed

+450
-22
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""
2+
Simple driver file to create a 2d plot of an platform locations in an array.
3+
The input file only contains the bare minimum information to build a 2d plot
4+
of the turbine locations (no moorings, cables, anchors, platform design, turbines,
5+
site condition information, etc.)
6+
"""
7+
8+
from famodel import Project
9+
import matplotlib.pyplot as plt
10+
11+
# define name of ontology input file
12+
input_file = '01_2D-visual_turbine_locations.yaml'
13+
14+
# initialize Project class with input file, we don't need RAFT for this so mark False
15+
project = Project(file=input_file,raft=False)
16+
17+
# plot
18+
project.plot2d()
19+
20+
plt.show()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# ----- Array-level inputs -----
3+
4+
# Wind turbine array layout
5+
array:
6+
keys : [ID, topsideID, platformID, mooringID, x_location, y_location, heading_adjust]
7+
data : # ID# ID# ID# [m] [m] [deg]
8+
- [fowt0, 0, 1, 0, -1600, -1600, 0 ]
9+
- [fowt1, 0, 1, 0, 0, -1600, 0 ] # 2 array, shared moorings
10+
- [fowt2, 0, 1, 0, 1600, -1600, 0 ]
11+
- [fowt3, 0, 1, 0, -1600, 0, 0 ]
12+
- [fowt4, 0, 1, 0, 0, 0, 0 ]
13+
- [fowt5, 0, 1, 0, 1600, 0, 0 ]
14+
- [fowt6, 0, 1, 0, -1600, 1600, 0 ]
15+
- [fowt7, 0, 1, 0, 0, 1600, 0 ]
16+
- [fowt8, 0, 1, 0, 1600, 1600, 0 ]
17+
18+
platform:
19+
type : FOWT
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Simple driver file to create a 2d plot of an platform locations with
4+
mooring lines in an array.
5+
The input file only contains the bare minimum information to build a 2d plot
6+
of the turbine locations and moorings (no cables, platform design, turbines,
7+
site condition information, etc.)
8+
"""
9+
10+
from famodel import Project
11+
import matplotlib.pyplot as plt
12+
13+
# define name of ontology input file
14+
input_file = '02_visual_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+
# plot
20+
project.plot2d()
21+
22+
plt.show()
23+
24+
project.unload()
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
2+
# ----- Array-level inputs -----
3+
4+
# Wind turbine array layout
5+
array:
6+
keys : [ID, topsideID, platformID, mooringID, x_location, y_location, heading_adjust]
7+
data : # ID# ID# ID# [m] [m] [deg]
8+
- [fowt0, 0, 1, ms1, -1600, -1600, 180 ]
9+
- [fowt1, 0, 1, ms1, 0, -1600, 0 ] # 2 array, shared moorings
10+
- [fowt2, 0, 1, ms1, 1600, -1600, 0 ]
11+
- [fowt3, 0, 1, ms1, -1600, 0, 0 ]
12+
- [fowt4, 0, 1, ms1, 0, 0, 45 ]
13+
- [fowt5, 0, 1, ms1, 1600, 0, 0 ]
14+
- [fowt6, 0, 1, ms1, -1600, 1600, 0 ]
15+
- [fowt7, 0, 1, ms1, 0, 1600, 0 ]
16+
- [fowt8, 0, 1, ms1, 1600, 1600, 0 ]
17+
18+
platform:
19+
type : FOWT
20+
rFair : 58
21+
zFair : -14
22+
23+
24+
25+
# ----- Mooring system -----
26+
27+
# Mooring system descriptions (each for an individual FOWT with no sharing)
28+
mooring_systems:
29+
30+
ms1:
31+
name: 2-line semi-taut polyester mooring system with a third line shared
32+
33+
keys: [MooringConfigID, heading, anchorType, lengthAdjust]
34+
data:
35+
- [ semitaut-poly_1, 150 , drag-embedment1, 0 ]
36+
- [ semitaut-poly_1, 270 , drag-embedment1, 0 ]
37+
- [ semitaut-poly_1, 30 , drag-embedment1, 0 ]
38+
39+
40+
# Mooring line configurations
41+
mooring_line_configs:
42+
43+
semitaut-poly_1: # mooring line configuration identifier, matches MooringConfigID
44+
45+
name: Semitaut polyester configuration 1 # descriptive name
46+
47+
span: 642 # 2D x-y distance from fairlead to anchor
48+
49+
sections: #in order from anchor to fairlead
50+
- mooringFamily: chain # ID of a mooring line section type
51+
d_nom: .1549 # nominal diameter of material [m]
52+
length: 497.7 # [m] usntretched length of line section
53+
- mooringFamily: polyester # ID of a mooring line section type
54+
d_nom: .182 # nominal diameter of material [m]
55+
length: 199.8 # [m] length (unstretched)
56+
57+
58+
59+
# Anchor type properties
60+
anchor_types:
61+
62+
drag-embedment1:
63+
type : DEA # type of anchor (drag-embedment anchor)
64+
65+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Simple driver file to create a 2d plot of an platform locations with
4+
mooring lines in an array.
5+
The input file only contains the bare minimum information to build a 2d plot
6+
of the turbine locations and moorings (no cables, platform design, turbines,
7+
site condition information, etc.)
8+
"""
9+
10+
from famodel import Project
11+
import matplotlib.pyplot as plt
12+
13+
# define name of ontology input file
14+
input_file = '03_visual_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+
# plot
20+
project.plot2d()
21+
22+
plt.show()
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
2+
# ----- Array-level inputs -----
3+
4+
# Wind turbine array layout
5+
array:
6+
keys : [ID, topsideID, platformID, mooringID, x_location, y_location, heading_adjust]
7+
data : # ID# ID# ID# [m] [m] [deg]
8+
- [fowt0, 0, 1, 0, -1600, -1600, 0 ]
9+
- [fowt1, 0, 1, 0, 0, -1600, 0 ] # 2 array, shared moorings
10+
- [fowt2, 0, 1, 0, 1600, -1600, 0 ]
11+
- [fowt3, 0, 1, 0, -1600, 0, 0 ]
12+
- [fowt4, 0, 1, 0, 0, 0, 0 ]
13+
- [fowt5, 0, 1, 0, 1600, 0, 0 ]
14+
- [fowt6, 0, 1, 0, -1600, 1600, 0 ]
15+
- [fowt7, 0, 1, 0, 0, 1600, 0 ]
16+
- [fowt8, 0, 1, 0, 1600, 1600, 0 ]
17+
18+
platform:
19+
type : FOWT
20+
21+
# Array cables
22+
array_cables:
23+
keys: [ AttachA, AttachB, DynCableA, DynCableB, headingA, headingB, cableType]
24+
data:
25+
- [ fowt0, fowt1, suspended_1, None, 90, 270, None] # suspended cable, so only one dynamic cable configuration, no static cable
26+
- [ fowt1, fowt2, lazy_wave1, lazy_wave1, 90, 270, static_cable_66]
27+
28+
# Dynamic and cable configurations
29+
dynamic_cable_configs:
30+
# 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)
31+
lazy_wave1:
32+
name: Lazy wave configuration 1 (simpler approach)
33+
voltage: 66 # [kV]
34+
span : 195 # [m] horizontal distance to end of dynamic cable from attachment point
35+
A: 300 # cable conductor area [mm^2]
36+
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
37+
length: 353.505 # [m] length (unstretched)
38+
rJTube : 5 # [m] radial distance from center of platform that J-tube is located
39+
40+
sections:
41+
- type: Buoyancy_750m # name of buoy type from famodel/cables/cableProps_default.yaml - buoy design info read in automatically from this!
42+
L_mid: 200 # [m] from platform connection
43+
N_modules: 6
44+
spacing: 11.23 # [m]
45+
V: 1 # [m^3]
46+
47+
48+
suspended_1:
49+
name: Dynamic suspended cable configuration 1
50+
voltage: 33 # [kV]
51+
span: 1512 # [m]
52+
cable_type: dynamic_cable_66 # ID of a cable section type from famodel/cables/cableProps_default.yaml. Cable props loaded automatically from this!
53+
A: 300 # cable conductor area [mm^2]
54+
length: 1550 # [m] length (unstretched)
55+
rJTube : 58 # [m] radial distance from center of platform that J-tube is located
56+
57+
sections:
58+
- type: Buoyancy_750m
59+
L_mid: 510 # [m] from end A
60+
N_modules: 6
61+
spacing: 18 # [m]
62+
V: 2 # [m^3]
63+
64+
- type: Buoyancy_750m
65+
L_mid: 1040 # [m] from end A
66+
N_modules: 6
67+
spacing: 18 # [m]
68+
V: 2 # [m^3]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Mooring Analysis
2+
Mooring line and cable motions and forces can be determined in FAModel through the FAModel MoorPy integration.
3+
4+
A MoorPy model of the array can automatically be developed from FAModel, and it is then saved as a property of the project object called 'ms'.
5+
6+
Users can perform their own analyses with the moorpy model, or use one of the built-in analysis tools such as:
7+
- array watch circle analysis from turbine thrust forces and save motion envelopes of moorings, as well as provide maximum forces.
8+
9+
10+
## Build MoorPy System Model of Array
11+
A MoorPy model of the array can be built with the method getMoorPyArray(). This can include information on moorings, dynamic cables, platform hydrostatics, connectors, and anchors, but the getMoorPyArray() method is flexible and will build only what you have included.
12+
13+
14+
15+
| Options | Min. Required Information | Ontology Sections to Include |
16+
| ---------------- | ---------------|---------------|
17+
| Platform locations | Platform x,y coordinates<br>Platform entity type (i.e. 'FOWT') | Array data table<br>Platforms |
18+
| Mooring lines | Platform x,y coordinates<br>Platform entity type (i.e. 'FOWT')<br>Platform fairlead radius<br>Platform fairlead depth<br>Mooring line span<br>Anchor type | Array data table<br>Platforms<br>mooring_systems AND/OR array_mooring table<br>mooring_line_configs<br>mooring_line_types<br>anchor_types|
19+
| Cables | Platform x,y coordinates<br>Platform entity type (i.e. 'FOWT')<br>Cable attachments<br>Dynamic cable span<br>Dynamic cable properties<br>Static cable properties (if applicable) | Array data table<br>Platforms<br>dynamic_cable_configs<br>\*\*cable_types<br>array_cables table AND/OR cables<br>\*\*cable_appendages |
20+
Bathymetry | MoorDyn bathymetry file | site -> bathymetry |
21+
| Soil | MoorDyn soil file | site -> seabed |
22+
| Lease boundaries | Lease coordinates | site -> boundaries |
23+
24+
## 3D Plot
25+
26+
3D plots of the array are also flexible, with the required inputs depending on what the user wants to visualize.
27+
28+
The following table describes the required inputs for each optional use of the 3D plotting feature. See the ontology YAMLs in this folder to understand how to format this input information in an ontology file. The name of the ontology file matches the name of the option in the table below. To see all of these options together, check out the ontology YAML entitled 'plotting_3d_all.yaml'. The python script 'plot_3d_examples.py' shows example plots for each option, as well as a plot combining all of the options.
29+
30+
| Options | Minimum Required Inputs | Ontology Sections |
31+
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
32+
| Mooring lines | Platform x,y coordinates<br>Platform entity type (i.e. 'FOWT')<br>Platform fairlead radius<br>Platform fairlead depth<br>Mooring line span<br>Mooring line configuration<br>Mooring Line Types | Array data table<br>Platforms<br>mooring_systems AND/OR array_mooring table<br>mooring_line_configs<br>mooring_line_types |
33+
| Cables | Platform x,y coordinates<br>Platform entity type (i.e. 'FOWT')<br>Cable attachments<br>Dynamic cable span<br>Dynamic cable properties<br>Static cable properties (if applicable) | Array data table<br>Platforms<br>dynamic_cable_configs<br>\*\*cable_types<br>array_cables table AND/OR cables<br>\*\*cable_appendages |
34+
| Platforms | RAFT platform description<br>Platform x,y coordinates<br>Platform entity type (i.e.'FOWT')<br>Platform fairlead radius<br>Platform fairlead depth | Platforms<br>Array data table |
35+
| Turbines | RAFT platform description<br>Platform x,y coordinates<br>Platform entity type (i.e.'FOWT')<br>Platform fairlead radius<br>Platform fairlead depth<br>RAFT turbine description | Platforms<br>Array data table<br>Topsides |
36+
Bathymetry | MoorDyn bathymetry file | site -> bathymetry |
37+
| Soil | MoorDyn soil file | site -> seabed |
38+
| Lease boundaries | Lease coordinates | site -> boundaries |

0 commit comments

Comments
 (0)