Skip to content

Commit 892a992

Browse files
committed
Many important updates/bug fixes
-- SWITCHED TO WORK WITH LATEST RAFT VERSION, updated environment yaml to automatically load in RAFT dev branch -- plot2d and plot3d input names changed for uniformity; now plot_x to show things, i.e. plot_bathymetry, plot_axes, plot_fowt -- mooring line rB now always adjusted to midpoint of fairlead(s) if they exist - fixes issues when r_rel of fairleads change -- bug fix unload to ensure updated fairleads/jtubes/rFair/zFair values used -- all examples and project.getRAFT() fixed to work with new RAFT changes and plot input changes -- bug fix plot2d() to fix previous changaes with depth plotting to work for non-subsystems as well -- anchors are once again represented as points in moorpy system. Connector attached to anchor is simply not used as a point in parallel systems now (cannot have point connect to point in MoorPy) -- bug fix project.loadDesign when loading in j-tubes -- bug fix project.getMoorPyArray() when creating cables to properly attach to things when Jtubes are used -- fairleads method added to Mooring, which returns a list of the fairleads attached to that mooring object -- bug fix Section to add lineType to ms.lineTypes if it isn't already in there (important for unloading when you have non-subsystems) -- added example of how to convert moorpy systems with some subsystems and some not (bc of parallel components) into all lines for unloading to a MoorDyn file -- small fixes in some example files to make sure everything is square with recent changes
1 parent 7a2c155 commit 892a992

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+479
-238
lines changed

examples/01_Visualization/01_2D-visual_turbine_locations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77

88
from famodel import Project
99
import matplotlib.pyplot as plt
10+
import os
1011

1112
# define name of ontology input file
12-
input_file = '01_2D-visual_turbine_locations.yaml'
13+
dir = os.path.dirname(os.path.realpath(__file__))
14+
input_file = os.path.join(dir,'01_2D-visual_turbine_locations.yaml')
1315

1416
# initialize Project class with input file, we don't need RAFT for this so mark False
1517
project = Project(file=input_file,raft=False)

examples/01_Visualization/02_visual_moorings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99

1010
from famodel import Project
1111
import matplotlib.pyplot as plt
12+
import os
1213

1314
# define name of ontology input file
14-
input_file = '02_visual_moorings.yaml'
15+
dir = os.path.dirname(os.path.realpath(__file__))
16+
input_file = os.path.join(dir,'02_visual_moorings.yaml')
1517

1618
# initialize Project class with input file, we don't need RAFT for this so mark False
1719
project = Project(file=input_file,raft=False)

examples/01_Visualization/03_visual_cables.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99

1010
from famodel import Project
1111
import matplotlib.pyplot as plt
12+
import os
1213

1314
# define name of ontology input file
14-
input_file = '03_visual_cables.yaml'
15+
dir = os.path.dirname(os.path.realpath(__file__))
16+
input_file = os.path.join(dir,'03_visual_cables.yaml')
1517

1618
# initialize Project class with input file, we don't need RAFT for this so mark False
1719
project = Project(file=input_file,raft=False)

examples/01_Visualization/04_visual_bathymetry.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
from famodel import Project
1010
import matplotlib.pyplot as plt
11+
import os
1112

1213
# define name of ontology input file
13-
input_file = '04_visual_bathymetry.yaml'
14+
dir = os.path.dirname(os.path.realpath(__file__))
15+
input_file = os.path.join(dir,'04_visual_bathymetry.yaml')
1416

1517
# initialize Project class with input file, we don't need RAFT for this so mark False
1618
project = Project(file=input_file,raft=False)

examples/01_Visualization/05_visual_lease_boundaries.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99

1010
from famodel import Project
1111
import matplotlib.pyplot as plt
12+
import os
1213

1314
# define name of ontology input file
14-
input_file = '06_visual_lease_boundaries.yaml'
15+
dir = os.path.dirname(os.path.realpath(__file__))
16+
input_file = os.path.join(dir,'05_visual_lease_boundaries.yaml')
1517

1618
# initialize Project class with input file, we don't need RAFT for this so mark False
1719
project = Project(file=input_file,raft=False)

examples/01_Visualization/06_2D-visual_misc_platforms.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77

88
from famodel import Project
99
import matplotlib.pyplot as plt
10+
import os
1011

1112
# define name of ontology input file
12-
input_file = '06_2D-visual_misc_platforms.yaml'
13+
dir = os.path.dirname(os.path.realpath(__file__))
14+
input_file = os.path.join(dir,'06_2D-visual_misc_platforms.yaml')
1315

1416
# initialize Project class with input file, we don't need RAFT for this so mark False
1517
project = Project(file=input_file,raft=False)

examples/01_Visualization/07_3D-visual_platform.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77

88
from famodel import Project
99
import matplotlib.pyplot as plt
10+
import os
1011

1112
# define name of ontology input file
12-
input_file = '07_3D-visual_platform.yaml'
13+
dir = os.path.dirname(os.path.realpath(__file__))
14+
input_file = os.path.join(dir,'07_3D-visual_platform.yaml')
1315

1416
# initialize Project class with input file, we don't need RAFT for this so mark False
1517
project = Project(file=input_file,raft=True)
1618

1719
# plot
18-
project.plot3d(fowt=True)
20+
project.plot3d(plot_fowt=True)
1921

2022
plt.show()

examples/01_Visualization/07_3D-visual_platform.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ platform:
3434
members: # list all members here
3535

3636
- name : center_column # [-] an identifier (no longer has to be number)
37-
type : 2 # [-]
37+
type : rigid # [-]
3838
rA : [ 0, 0, -20] # [m] end A coordinates
3939
rB : [ 0, 0, 15] # [m] and B coordinates
4040
shape : circ # [-] circular or rectangular
@@ -56,7 +56,7 @@ platform:
5656

5757

5858
- name : outer_column # [-] an identifier (no longer has to be number)
59-
type : 2 # [-]
59+
type : rigid # [-]
6060
rA : [51.75, 0, -20] # [m] end A coordinates
6161
rB : [51.75, 0, 15] # [m] and B coordinates
6262
heading : [ 60, 180, 300] # [deg] heading rotation of column about z axis (for repeated members)
@@ -82,7 +82,7 @@ platform:
8282

8383

8484
- name : pontoon # [-] an identifier (no longer has to be number)
85-
type : 2 # [-]
85+
type : rigid # [-]
8686
rA : [ 5 , 0, -16.5] # [m] end A coordinates
8787
rB : [ 45.5, 0, -16.5] # [m] and B coordinates
8888
heading : [ 60, 180, 300] # [deg] heading rotation of column about z axis (for repeated members)
@@ -103,7 +103,7 @@ platform:
103103

104104

105105
- name : upper_support # [-] an identifier (no longer has to be number)
106-
type : 2 # [-]
106+
type : rigid # [-]
107107
rA : [ 5 , 0, 14.545] # [m] end A coordinates
108108
rB : [ 45.5, 0, 14.545] # [m] and B coordinates
109109
heading : [ 60, 180, 300] # [deg] heading rotation of column about z axis (for repeated members)

examples/01_Visualization/08_3D-visual_turbine.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77

88
from famodel import Project
99
import matplotlib.pyplot as plt
10+
import os
1011

1112
# define name of ontology input file
12-
input_file = '08_3D-visual_turbine.yaml'
13+
dir = os.path.dirname(os.path.realpath(__file__))
14+
input_file = os.path.join(dir,'08_3D-visual_turbine.yaml')
1315

1416
# initialize Project class with input file, we don't need RAFT for this so mark False
1517
project = Project(file=input_file,raft=True)
1618

1719
# plot
18-
project.plot3d(fowt=True)
20+
project.plot3d(plot_fowt=True)
1921

2022
plt.show()

examples/01_Visualization/08_3D-visual_turbine.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ topsides:
3636
nBlades : 3 # number of blades
3737
Zhub : 150.0 # hub height [m]
3838
Rhub : 3.97 # hub radius [m]
39-
precone : 4.0 # [deg]
40-
shaft_tilt : 6.0 # [deg]
39+
precone : -4.0 # [deg]
40+
shaft_tilt : -6.0 # [deg]
4141
overhang : -12.0313 # [m]
4242
aeroMod : 1 # 0 aerodynamics off; 1 aerodynamics on
4343

@@ -1059,7 +1059,7 @@ topsides:
10591059
dlsMax : 5.0 # maximum node splitting section amount; can't be 0
10601060

10611061
name : tower # [-] an identifier (no longer has to be number)
1062-
type : 1 # [-]
1062+
type : rigid # [-]
10631063
rA : [ 0, 0, 15] # [m] end A coordinates
10641064
rB : [ 0, 0, 144.582] # [m] and B coordinates
10651065
shape : circ # [-] circular or rectangular
@@ -1085,7 +1085,7 @@ platform:
10851085
members: # list all members here
10861086

10871087
- name : center_column # [-] an identifier (no longer has to be number)
1088-
type : 2 # [-]
1088+
type : rigid # [-]
10891089
rA : [ 0, 0, -20] # [m] end A coordinates
10901090
rB : [ 0, 0, 15] # [m] and B coordinates
10911091
shape : circ # [-] circular or rectangular
@@ -1107,7 +1107,7 @@ platform:
11071107

11081108

11091109
- name : outer_column # [-] an identifier (no longer has to be number)
1110-
type : 2 # [-]
1110+
type : rigid # [-]
11111111
rA : [51.75, 0, -20] # [m] end A coordinates
11121112
rB : [51.75, 0, 15] # [m] and B coordinates
11131113
heading : [ 60, 180, 300] # [deg] heading rotation of column about z axis (for repeated members)
@@ -1133,7 +1133,7 @@ platform:
11331133

11341134

11351135
- name : pontoon # [-] an identifier (no longer has to be number)
1136-
type : 2 # [-]
1136+
type : rigid # [-]
11371137
rA : [ 5 , 0, -16.5] # [m] end A coordinates
11381138
rB : [ 45.5, 0, -16.5] # [m] and B coordinates
11391139
heading : [ 60, 180, 300] # [deg] heading rotation of column about z axis (for repeated members)
@@ -1154,7 +1154,7 @@ platform:
11541154

11551155

11561156
- name : upper_support # [-] an identifier (no longer has to be number)
1157-
type : 2 # [-]
1157+
type : rigid # [-]
11581158
rA : [ 5 , 0, 14.545] # [m] end A coordinates
11591159
rB : [ 45.5, 0, 14.545] # [m] and B coordinates
11601160
heading : [ 60, 180, 300] # [deg] heading rotation of column about z axis (for repeated members)

0 commit comments

Comments
 (0)