Skip to content

Commit

Permalink
tests should be working now
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarter committed Dec 10, 2020
1 parent 22921b0 commit 2acd141
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 62 deletions.
1 change: 0 additions & 1 deletion examples/05_tower_monopile/monopile_direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@

# Set geometry and turbine values
prob["hub_height"] = hubH
prob["foundation_height"] = -water_depth

prob["tower_foundation_height"] = htrans
prob["tower_height"] = h_paramT.sum()
Expand Down
8 changes: 3 additions & 5 deletions wisdem/floatingse/floating.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import openmdao.api as om
from wisdem.towerse.tower import TowerLeanSE
from wisdem.floatingse.column import Column
from wisdem.floatingse.substructure import Substructure, SubstructureGeometry
from wisdem.floatingse.loading import Loading
from wisdem.floatingse.map_mooring import MapMooring
from wisdem.towerse.tower import TowerLeanSE
import numpy as np
from wisdem.floatingse.substructure import Substructure, SubstructureGeometry


class FloatingSE(om.Group):
Expand Down Expand Up @@ -51,8 +50,7 @@ def setup(self):
"E_mat",
"G_mat",
"sigma_y_mat",
("transition_piece_height", "main_freeboard"),
("foundation_height", "main_freeboard"),
("tower_foundation_height", "main_freeboard"),
],
)

Expand Down
13 changes: 1 addition & 12 deletions wisdem/glue_code/gc_LoadInputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,7 @@ def set_run_flags(self):
):
print("WARNING: Environment provided but no related component found found")

# Tower, monopile and foundation
if flags["tower"] and not flags["foundation"] and not flags["monopile"] and not flags["floating_platform"]:
raise ValueError("Tower analysis is requested but no foundation, no monopile, and no floating are found")
if flags["monopile"] and not flags["foundation"]:
raise ValueError("Monopile analysis is requested but no foundation is found")
if flags["foundation"] and not (flags["tower"] or flags["monopile"]):
print("WARNING: Foundation provided but no tower/monopile found or TowerSE deactivated")

# Foundation and floating/monopile
if flags["floating_platform"] and flags["foundation"]:
raise ValueError("Cannot have both floating and foundation components")
# Floating/monopile
if flags["floating_platform"] and flags["monopile"]:
raise ValueError("Cannot have both floating and monopile components")

Expand Down Expand Up @@ -913,7 +903,6 @@ def write_ontology(self, wt_opt, fname_output):

# Update monopile
if self.modeling_options["flags"]["monopile"]:
self.wt_init["components"]["monopile"]["suctionpile_depth"] = float(wt_opt["monopile.suctionpile_depth"])
self.wt_init["components"]["monopile"]["outer_shape_bem"]["outer_diameter"]["grid"] = wt_opt[
"monopile.s"
].tolist()
Expand Down
12 changes: 4 additions & 8 deletions wisdem/glue_code/gc_WT_DataStruc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,10 @@ def setup(self):
desc="Scalar of the tower length computed along its curved axis. A standard straight tower will be as high as long.",
)
self.add_output(
"foundation_height", val=0.0, units="m", desc="Foundation height in respect to the ground level."
"foundation_height",
val=0.0,
units="m",
desc="Foundation height in respect to the ground level.",
)

# Declare all partial derivatives.
Expand Down Expand Up @@ -1840,16 +1843,9 @@ def setup(self):
ivc.add_output(
"outfitting_factor", val=0.0, desc="Multiplier that accounts for secondary structure mass inside of tower"
)
ivc.add_output(
"transition_piece_height", val=0.0, units="m", desc="point mass height of transition piece above water line"
)
ivc.add_output("transition_piece_mass", val=0.0, units="kg", desc="point mass of transition piece")
ivc.add_output("transition_piece_cost", val=0.0, units="USD", desc="cost of transition piece")
ivc.add_output("gravity_foundation_mass", val=0.0, units="kg", desc="extra mass of gravity foundation")
ivc.add_output("suctionpile_depth", val=0.0, units="m", desc="depth of foundation in the soil")
ivc.add_output(
"suctionpile_depth_diam_ratio", 0.0, desc="ratio of sunction pile depth to mudline monopile diameter"
)

self.add_subsystem("compute_monopile_grid", Compute_Grid(n_height=n_height), promotes=["*"])

Expand Down
3 changes: 0 additions & 3 deletions wisdem/glue_code/gc_WT_InitModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,12 +874,9 @@ def assign_monopile_values(wt_opt, modeling_options, monopile):
wt_opt["monopile.layer_thickness"] = 0.5 * (thickness[:, :-1] + thickness[:, 1:])

wt_opt["monopile.outfitting_factor"] = monopile["internal_structure_2d_fem"]["outfitting_factor"]
wt_opt["monopile.transition_piece_height"] = monopile["transition_piece_height"]
wt_opt["monopile.transition_piece_mass"] = monopile["transition_piece_mass"]
wt_opt["monopile.transition_piece_cost"] = monopile["transition_piece_cost"]
wt_opt["monopile.gravity_foundation_mass"] = monopile["gravity_foundation_mass"]
wt_opt["monopile.suctionpile_depth"] = monopile["suctionpile_depth"]
wt_opt["monopile.suctionpile_depth_diam_ratio"] = monopile["suctionpile_depth_diam_ratio"]

return wt_opt

Expand Down
12 changes: 6 additions & 6 deletions wisdem/glue_code/glue_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def setup(self):
self.connect("env.mu_air", "towerse.mu_air")
self.connect("env.shear_exp", "towerse.shearExp")
self.connect("assembly.hub_height", "towerse.hub_height")
self.connect("tower.foundation_height", "towerse.tower_foundation_height") # TODO: towerse.wind_z0"
self.connect("tower_grid.foundation_height", "towerse.tower_foundation_height") # TODO: towerse.wind_z0"
self.connect("tower.diameter", "towerse.tower_outer_diameter_in")
self.connect("tower_grid.height", "towerse.tower_height")
self.connect("tower_grid.s", "towerse.tower_s")
Expand All @@ -487,17 +487,17 @@ def setup(self):
self.connect("env.hsig_wave", "towerse.hsig_wave")
self.connect("env.Tsig_wave", "towerse.Tsig_wave")
self.connect("monopile.diameter", "towerse.monopile_outer_diameter_in")
self.connect("monopile.foundation_height", "monopile.tower_foundation_height") # TODO: towerse.wind_z0"
self.connect(
"monopile.foundation_height", "towerse.monopile_foundation_height"
) # TODO: towerse.wind_z0"
self.connect("monopile.height", "towerse.monopile_height")
self.connect("monopile.s", "towerse.monopile_s")
self.connect("monopile.layer_thickness", "towerse.monopile_layer_thickness")
self.connect("monopile.layer_mat", "towerse.monopile_layer_materials")
self.connect("monopile.outfitting_factor", "towerse.monopile_outfitting_factor")
self.connect("monopile.transition_piece_height", "towerse.transition_piece_height")
self.connect("monopile.transition_piece_cost", "towerse.transition_piece_cost")
self.connect("monopile.transition_piece_mass", "towerse.transition_piece_mass")
self.connect("monopile.gravity_foundation_mass", "towerse.gravity_foundation_mass")
self.connect("monopile.suctionpile_depth", "towerse.suctionpile_depth")
self.connect("monopile.suctionpile_depth_diam_ratio", "towerse.suctionpile_depth_diam_ratio")

# Connections to turbine constraints
if modeling_options["flags"]["blade"] and modeling_options["flags"]["tower"]:
Expand Down Expand Up @@ -653,7 +653,7 @@ def setup(self):
self.connect("drivese.nacelle_mass", "landbosse.nacelle_mass")
self.connect("drivese.hub_system_mass", "landbosse.hub_mass")
self.connect("re.precomp.blade_mass", "landbosse.blade_mass")
self.connect("foundation.height", "landbosse.foundation_height")
self.connect("tower_grid.foundation_height", "landbosse.foundation_height")
self.connect("bos.plant_turbine_spacing", "landbosse.turbine_spacing_rotor_diameters")
self.connect("bos.plant_row_spacing", "landbosse.row_spacing_rotor_diameters")
self.connect("bos.commissioning_pct", "landbosse.commissioning_pct")
Expand Down
3 changes: 0 additions & 3 deletions wisdem/inputs/geometry_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,9 @@ components:
values: [0.05697, 0.05697, 0.05047, 0.04664, 0.03935, 0.03354, 0.02801, 0.02357, 0.02374, 0.02241, 0.02674]
# Monopile
monopile:
transition_piece_height: 0.0
transition_piece_mass: 0.0
transition_piece_cost: 0.0
gravity_foundation_mass: 0.0
suctionpile_depth: 0.0
suctionpile_depth_diam_ratio: 0.0
outer_shape_bem:
reference_axis: &ref_axis_mono
x:
Expand Down
24 changes: 0 additions & 24 deletions wisdem/inputs/geometry_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1047,20 +1047,10 @@ properties:
- outer_shape_bem
- internal_structure_2d_fem
optional:
- transition_piece_height
- transition_piece_mass
- transition_piece_cost
- gravity_foundation_mass
- suctionpile_depth
- suctionpile_depth_diam_ratio
properties:
transition_piece_height:
type: number
description: Height of transition piece top where tower attaches
unit: m
minimum: 0.0
maximum: 100.0
default: 0.0
transition_piece_mass:
type: number
description: Total mass of transition piece
Expand All @@ -1079,20 +1069,6 @@ properties:
unit: kg
minimum: 0.0
default: 0.0
suctionpile_depth:
type: number
description: Depth below sea floor that monopile length extends
unit: m
minimum: 0.0
maximum: 100.0
default: 0.0
suctionpile_depth_diam_ratio:
type: number
description: Let suction pile depth be determined by multiplying this value by the monopile diameter at the mudline
unit: m
minimum: 0.0
maximum: 50.0
default: 0.0
outer_shape:
type: object
required:
Expand Down

0 comments on commit 2acd141

Please sign in to comment.