Skip to content

Commit

Permalink
Merge pull request #400 from WISDEM/fiber
Browse files Browse the repository at this point in the history
adding tracking of fiber orientation
  • Loading branch information
gbarter committed Nov 17, 2022
2 parents 7dd22be + 4317f18 commit ff42596
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The installation instructions below use the environment name, "wisdem-env," but

1. Setup and activate the Anaconda environment from a prompt (Anaconda3 Power Shell on Windows or Terminal.app on Mac)

conda config --add channels conda-forge
conda create -y --name wisdem-env -f https://raw.githubusercontent.com/WISDEM/WISDEM/develop/environment.yml python=3.9
conda activate wisdem-env

Expand Down
12 changes: 12 additions & 0 deletions wisdem/glue_code/gc_WT_DataStruc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,12 @@ def setup(self):
units="m",
desc="2D array of the thickness of the layers of the blade structure. The first dimension represents each layer, the second dimension represents each entry along blade span.",
)
ivc.add_output(
"layer_orientation",
val=np.zeros((n_layers, n_span)),
units="rad",
desc="Fiber orientation of the composite layer with 0-value meaning alignment with reference axis. The first dimension represents each layer, the second dimension represents each entry along blade span.",
)
ivc.add_output(
"layer_midpoint_nd",
val=np.zeros((n_layers, n_span)),
Expand Down Expand Up @@ -1691,6 +1697,12 @@ def setup(self):
units="m",
desc="2D array of the thickness of the layers of the blade structure. The first dimension represents each layer, the second dimension represents each entry along blade span.",
)
self.add_input(
"layer_orientation",
val=np.zeros((n_layers, n_span)),
units="rad",
desc="Fiber orientation of the composite layer with 0-value meaning alignment with reference axis. The first dimension represents each layer, the second dimension represents each entry along blade span.",
)
self.add_input(
"layer_rotation_yaml",
val=np.zeros((n_layers, n_span)),
Expand Down
11 changes: 10 additions & 1 deletion wisdem/glue_code/gc_WT_InitModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ def assign_internal_structure_2d_fem_values(wt_opt, modeling_options, internal_s
layer_name = n_layers * [""]
layer_mat = n_layers * [""]
thickness = np.zeros((n_layers, n_span))
orientation = np.zeros((n_layers, n_span))
layer_rotation = np.zeros((n_layers, n_span))
layer_offset_y_pa = np.zeros((n_layers, n_span))
layer_width = np.zeros((n_layers, n_span))
Expand All @@ -283,13 +284,20 @@ def assign_internal_structure_2d_fem_values(wt_opt, modeling_options, internal_s
for i in range(n_layers):
layer_name[i] = modeling_options["WISDEM"]["RotorSE"]["layer_name"][i]
layer_mat[i] = modeling_options["WISDEM"]["RotorSE"]["layer_mat"][i]
thickness[i] = np.interp(
thickness[i, :] = np.interp(
nd_span,
internal_structure_2d_fem["layers"][i]["thickness"]["grid"],
internal_structure_2d_fem["layers"][i]["thickness"]["values"],
left=0.0,
right=0.0,
)
orientation[i, :] = np.interp(
nd_span,
internal_structure_2d_fem["layers"][i]["fiber_orientation"]["grid"],
internal_structure_2d_fem["layers"][i]["fiber_orientation"]["values"],
left=0.0,
right=0.0,
)
if (
"rotation" not in internal_structure_2d_fem["layers"][i]
and "offset_y_pa" not in internal_structure_2d_fem["layers"][i]
Expand Down Expand Up @@ -500,6 +508,7 @@ def assign_internal_structure_2d_fem_values(wt_opt, modeling_options, internal_s
# Assign the openmdao values
wt_opt["blade.internal_structure_2d_fem.layer_side"] = layer_side
wt_opt["blade.internal_structure_2d_fem.layer_thickness"] = thickness
wt_opt["blade.internal_structure_2d_fem.layer_orientation"] = orientation
wt_opt["blade.internal_structure_2d_fem.layer_midpoint_nd"] = layer_midpoint_nd
wt_opt["blade.internal_structure_2d_fem.layer_web"] = layer_web
wt_opt["blade.internal_structure_2d_fem.definition_web"] = definition_web
Expand Down
17 changes: 17 additions & 0 deletions wisdem/inputs/geometry_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ properties:
fiber_orientation:
type: object
description: orientation of the fibers
default: {'grid':[0.0, 1.0], 'values':[0.0, 0.0]}
required:
- grid
- values
Expand Down Expand Up @@ -2892,6 +2893,7 @@ definitions:
grid_nd:
type: array
description: Grid along a beam expressed non-dimensional from 0 to 1
default: [0.0, 1.0]
items:
type: number
unit: none
Expand All @@ -2912,6 +2914,7 @@ definitions:
grid_aoa:
type: array
description: Grid of angles of attack to describe polars
default: [-3.14159265359, 3.14159265359]
items:
type: number
unit: radians
Expand All @@ -2936,6 +2939,7 @@ definitions:
nd:
type: array
description: Non dimensional quantity described along a beam and expressed non-dimensional
default: [0.0, 0.0]
items:
type: number
unit: none
Expand All @@ -2944,6 +2948,7 @@ definitions:
length:
type: array
description: Length quantity described along a beam, expressed in meter
default: [0.0, 0.0]
items:
type: number
unit: meter
Expand All @@ -2952,6 +2957,7 @@ definitions:
angle:
type: array
description: Angle quantity along a beam, expressed in radians
default: [0.0, 0.0]
items:
type: number
unit: radians
Expand All @@ -2960,6 +2966,7 @@ definitions:
mass_length:
type: array
description: Mass per unit length along a beam, expressed in kilogram per meter
default: [0.0, 0.0]
items:
type: number
unit: kg/m
Expand All @@ -2968,6 +2975,7 @@ definitions:
area:
type: array
description: Cross sectional area along a beam, expressed in meter squared
default: [0.0, 0.0]
items:
type: number
unit: m2
Expand All @@ -2977,6 +2985,7 @@ definitions:
elast_mod:
type: array
description: Modulus of elasticity of a material along a beam, expressed in Newton over meter squared
default: [0.0, 0.0]
items:
type: number
unit: N m2
Expand All @@ -2986,6 +2995,7 @@ definitions:
shear_mod:
type: array
description: Shear modulus of elasticity of a material along a beam, expressed in Newton over meter squared
default: [0.0, 0.0]
items:
type: number
unit: N/m2
Expand All @@ -2995,6 +3005,7 @@ definitions:
area_moment:
type: array
description: Area moment of inertia of a section along a beam, expressed in meter to the power of four
default: [0.0, 0.0]
items:
type: number
unit: m4
Expand All @@ -3004,6 +3015,7 @@ definitions:
mass_moment:
type: array
description: Mass moment of inertia of a section along a beam, expressed in kilogram times meter squared per meter
default: [0.0, 0.0]
items:
type: number
unit: kg*m2/m
Expand All @@ -3013,6 +3025,7 @@ definitions:
tors_stiff_const:
type: array
description: Torsional stiffness constant with respect to ze axis at the shear center [m4/rad]. For a circular section only this is identical to the polar moment of inertia
default: [0.0, 0.0]
items:
type: number
unit: m4/rad
Expand All @@ -3021,6 +3034,7 @@ definitions:
shear_stiff:
type: array
description: Shearing stiffness along the beam
default: [0.0, 0.0]
items:
type: number
unit: N
Expand All @@ -3029,6 +3043,7 @@ definitions:
axial_stiff:
type: array
description: Axial stiffness EA along the beam
default: [0.0, 0.0]
items:
type: number
unit: N
Expand All @@ -3037,6 +3052,7 @@ definitions:
bending_stiff:
type: array
description: Bending stiffness E11-E22 along the beam
default: [0.0, 0.0]
items:
type: number
unit: N/m2
Expand All @@ -3045,6 +3061,7 @@ definitions:
tors_stiff:
type: array
description: Torsional stiffness GJ along the beam
default: [0.0, 0.0]
items:
type: number
unit: N/m2
Expand Down

0 comments on commit ff42596

Please sign in to comment.