Skip to content

Commit

Permalink
Add option to disable ghost node calculation for some members
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Sep 26, 2023
1 parent cef6855 commit 9489f4f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions WISDEM/wisdem/glue_code/gc_LoadInputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ def set_openmdao_vectors(self):
self.modeling_options["floating"]["members"]["n_ballasts"] = np.zeros(n_members, dtype=int)
self.modeling_options["floating"]["members"]["n_bulkheads"] = np.zeros(n_members, dtype=int)
self.modeling_options["floating"]["members"]["n_axial_joints"] = np.zeros(n_members, dtype=int)
self.modeling_options["floating"]["members"]["no_intersect"] = np.full(n_members, fill_value=False)
ballast_types = []
for i in range(n_members):
self.modeling_options["floating"]["members"]["name"][i] = self.wt_init["components"][
Expand Down Expand Up @@ -500,6 +501,8 @@ def set_openmdao_vectors(self):
else:
self.modeling_options["floating"]["members"]["n_axial_joints"][i] = 0

self.modeling_options['floating']['members']['no_intersect'][i] = self.wt_init['components']['floating_platform']['members'][i]['no_intersect']

final_grid = np.unique(grid)
final_geom_grid = np.unique(geom_grid)
self.modeling_options["floating"]["members"][
Expand Down
14 changes: 8 additions & 6 deletions WISDEM/wisdem/glue_code/gc_WT_DataStruc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2615,12 +2615,14 @@ def compute(self, inputs, outputs):
outputs["member_" + iname + ":joint2"] = joint2xyz
outputs["member_" + iname + ":height"] = hk

# Largest radius at connection points for this member
Rk = 0.5 * inputs["member_" + iname + ":outer_diameter"]
node_r[joint1id] = max(node_r[joint1id], Rk[0])
node_r[joint2id] = max(node_r[joint2id], Rk[-1])
intersects[joint1id] += 1
intersects[joint2id] += 1
# Largest radius at connection points for this member,
# Don't check radius if members are paralell, it's a flag for now, but can probably check if orthogonal in the future
if not floating_init_options['members']['no_intersect'][k]:
Rk = 0.5 * inputs["member_" + iname + ":outer_diameter"]
node_r[joint1id] = max(node_r[joint1id], Rk[0])
node_r[joint2id] = max(node_r[joint2id], Rk[-1])
intersects[joint1id] += 1
intersects[joint2id] += 1

# Store the ghost node non-dimensional locations
for k in range(n_members):
Expand Down
4 changes: 4 additions & 0 deletions WISDEM/wisdem/inputs/geometry_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1733,6 +1733,10 @@ properties:
type: number
default: 0.0
minimum: 0.0
no_intersect:
description: This member is parallel to another and intersecting "ghost nodes" should not be calculated
type: boolean
default: False
rigid_bodies:
type: array
descriptions: Additional point masses at joints with user-customized properties
Expand Down

0 comments on commit 9489f4f

Please sign in to comment.