-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,423 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
general: | ||
folder_output: outputs/18_owens_optimization | ||
fname_output: refturb_output | ||
|
||
design_variables: | ||
tower: | ||
outer_diameter: | ||
flag: True | ||
lower_bound: 3.87 | ||
upper_bound: 8.0 | ||
layer_thickness: | ||
flag: True | ||
lower_bound: 4e-3 | ||
upper_bound: 2e-1 | ||
|
||
merit_figure: tower_mass | ||
|
||
# constraints: | ||
# tower: | ||
# height_constraint: | ||
# flag: False | ||
# lower_bound: 1.e-2 | ||
# upper_bound: 1.e-2 | ||
# stress: | ||
# flag: True | ||
# global_buckling: | ||
# flag: True | ||
# shell_buckling: | ||
# flag: True | ||
# d_to_t: | ||
# flag: True | ||
# lower_bound: 120.0 | ||
# upper_bound: 500.0 | ||
# taper: | ||
# flag: True | ||
# lower_bound: 0.2 | ||
# slope: | ||
# flag: True | ||
# frequency_1: | ||
# flag: True | ||
# lower_bound: 0.13 | ||
# upper_bound: 0.40 | ||
|
||
driver: | ||
optimization: | ||
flag: False # Flag to enable optimization | ||
tol: 1.e-6 # Optimality tolerance | ||
# max_major_iter: 10 # Maximum number of major design iterations (SNOPT) | ||
# max_minor_iter: 100 # Maximum number of minor design iterations (SNOPT) | ||
max_iter: 100 # Maximum number of iterations (SLSQP) | ||
solver: SNOPT # Optimization solver. Other options are 'SLSQP' - 'CONMIN' | ||
step_size: 1.e-6 # Step size for finite differencing | ||
form: forward # Finite differencing mode, either forward or central | ||
# design_of_experiments: | ||
# flag: True # Flag to enable design of experiments | ||
# run_parallel: False # Flag to run using parallel processing | ||
# generator: Uniform # Type of input generator. (Uniform) | ||
# num_samples: 100 # number of samples for (Uniform only) | ||
# debug_print: True | ||
|
||
recorder: | ||
flag: True # Flag to activate OpenMDAO recorder | ||
file_name: log_opt.sql # Name of OpenMDAO recorder | ||
includes: ['*tower*', '*TMD*', '*mass*'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import shutil | ||
from weis.glue_code.runWEIS import run_weis | ||
import wisdem.inputs as sch | ||
import numpy as np | ||
from wisdem.commonse.mpi_tools import MPI | ||
import sys | ||
|
||
|
||
## File management | ||
mydir = os.path.dirname(os.path.realpath(__file__)) # get path to this file | ||
|
||
fname_wt_input = mydir + os.sep + 'owens_land.yaml' | ||
fname_modeling_options = mydir + os.sep + "modeling_options_OWENS_windioExample.yaml" | ||
fname_analysis_options = mydir + os.sep + "analysis_options_owens_DVs.yaml" | ||
|
||
# Change optimizer and output folder | ||
|
||
analysis_override = {} | ||
analysis_override['general'] = {} | ||
analysis_override['general']['folder_output'] = os.path.join('outputs/18_OWENS_OptStudies/1_change_opt/',"slsqp") | ||
analysis_override['driver'] = {} | ||
analysis_override['driver']['optimization'] = {} | ||
analysis_override['driver']['optimization']['solver'] = "SLSQP" | ||
|
||
wt_opt, modeling_options, analysis_options = run_weis( | ||
fname_wt_input, | ||
fname_modeling_options, | ||
fname_analysis_options, | ||
analysis_override=analysis_override | ||
) | ||
|
||
|
||
if MPI: | ||
rank = MPI.COMM_WORLD.Get_rank() | ||
else: | ||
rank = 0 | ||
if rank == 0: | ||
# shutil.copyfile(os.path.join(analysis_options['general']['folder_output'],analysis_options['general']['fname_output']+'.yaml'), fname_wt_input) | ||
print("Tower mass (kg) =", wt_opt["towerse.tower_mass"]) | ||
print("Floating platform mass (kg) =", wt_opt["floatingse.platform_mass"]) | ||
|
71 changes: 71 additions & 0 deletions
71
examples/18_owens/modeling_options_OWENS_windioExample.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
General: | ||
verbosity: False # When set to True, the code prints to screen many infos | ||
|
||
|
||
WISDEM: | ||
RotorSE: | ||
flag: False | ||
# spar_cap_ss: Spar_Cap_SS | ||
# spar_cap_ps: Spar_Cap_PS | ||
# te_ss: TE_reinforcement_SS | ||
# te_ps: TE_reinforcement_PS | ||
TowerSE: | ||
flag: False | ||
DriveSE: | ||
flag: False | ||
FloatingSE: | ||
flag: False | ||
rank_and_file: True | ||
# BOS: | ||
# flag: True | ||
|
||
OWENS: | ||
flag: True | ||
OWENS_project_path: /Users/yliao/Documents/Projects/CT-OPT/OWENS | ||
master_input: /Users/yliao/repos/OWENS.jl/docs/src/literate/sampleOWENS.yml | ||
analysisType: unsteady # unsteady, steady, modal | ||
turbineType: Darrieus #Darrieus, H-VAWT, ARCUS | ||
controlStrategy: constantRPM # TODO: incorporate the others | ||
RPM: 17.2 #RPM | ||
numTS: 20 # | ||
delta_t: 0.01 # s | ||
Nslices: 30 # number of OWENSAero discritizations #TODO: AD parameters | ||
ntheta: 30 # number of OWENSAero azimuthal discretizations | ||
AModel: DMS # AD, DMS, AC | ||
structuralModel: GX #GX, TNB, ROM | ||
structuralNonlinear: false #TODO: propogate | ||
ntelem: 10 #tower elements in each | ||
nbelem: 60 #blade elements in each | ||
ncelem: 10 #central cable elements in each if turbineType is ARCUS | ||
nselem: 5 #strut elements in each if turbineType has struts | ||
run_path: ../../../OWENS.jl/docs/src/literate/ | ||
|
||
# designParameters: | ||
eta: 0.5 # blade mount point ratio, 0.5 is the blade half chord is perpendicular with the axis of rotation, 0.25 is the quarter chord, etc | ||
# move to geometry? | ||
# Nbld: 3 # number of blades | ||
# Blade_Radius: 54.01123056 # blade height m | ||
# Blade_Height: 110.1829092 # blade radius m | ||
# towerHeight: 3.0 # m tower extension height below blades | ||
|
||
# operationParameters: | ||
# rho: 1.225 # air density | ||
# Vinf: 17.2 # m/s #optional, supersceeded if ifw=true | ||
|
||
# turbulentInflow: | ||
ifw: false | ||
windType: 3 | ||
windINPfilename: /Users/yliao/repos/OWENS.jl/examples/Optimization/data/turbsim/115mx115m_30x30_20.0msETM.bts | ||
ifw_libfiles: None | ||
|
||
# AeroParameters: | ||
adi_lib: None | ||
adi_rootname: "/ExampleB" | ||
|
||
# structuralParameters: | ||
# NuMad_geom_xlscsv_file_twr: /data/NuMAD_Geom_SNL_5MW_D_TaperedTower.csv | ||
# NuMad_mat_xlscsv_file_twr: /data/NuMAD_Materials_SNL_5MW.csv | ||
# NuMad_geom_xlscsv_file_bld: /data/NuMAD_Geom_SNL_5MW_D_Carbon_LCDT_ThickFoils_ThinSkin.csv | ||
# NuMad_mat_xlscsv_file_bld: /data/NuMAD_Materials_SNL_5MW.csv | ||
# NuMad_geom_xlscsv_file_strut: /data/NuMAD_Geom_SNL_5MW_Struts.csv | ||
# NuMad_mat_xlscsv_file_strut: /data/NuMAD_Materials_SNL_5MW.csv |
Oops, something went wrong.