Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update openmdao connections with 'rotorse' prefix #100

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 50 additions & 50 deletions weis/glue_code/glue_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ def setup(self):
self.connect('blade.interp_airfoils.cm_interp', 'xf.cm_interp')

if modeling_options['Level3']['ROSCO']['flag']:
self.connect('rp.powercurve.rated_V', ['sse_tune.tune_rosco.v_rated'])
self.connect('rotorse.rp.powercurve.rated_V', ['sse_tune.tune_rosco.v_rated'])
#self.connect('rp.gust.V_gust', ['freq_rotor.aero_gust.V_load', 'freq_rotor.aero_hub_loads.V_load'])
self.connect('rp.powercurve.rated_Omega', 'sse_tune.tune_rosco.rated_rotor_speed')
self.connect('rotorse.rp.powercurve.rated_Omega', 'sse_tune.tune_rosco.rated_rotor_speed')
#self.connect('rp.powercurve.rated_pitch', ['freq_rotor.pitch_load', 'freq_rotor.tot_loads_gust.aeroloads_pitch'])
self.connect('rp.powercurve.rated_Q', 'sse_tune.tune_rosco.rated_torque')
self.connect('rotorse.rp.powercurve.rated_Q', 'sse_tune.tune_rosco.rated_torque')

self.connect('assembly.r_blade', 'sse_tune.r')
self.connect('assembly.rotor_radius', 'sse_tune.Rtip')
Expand Down Expand Up @@ -166,10 +166,10 @@ def setup(self):

self.connect('nacelle.gear_ratio', 'sse_tune.tune_rosco.gear_ratio')
self.connect('assembly.rotor_radius', 'sse_tune.tune_rosco.R')
self.connect('re.precomp.I_all_blades', 'sse_tune.tune_rosco.rotor_inertia', src_indices=[0])
self.connect('rs.frame.flap_mode_freqs','sse_tune.tune_rosco.flap_freq', src_indices=[0])
self.connect('rs.frame.edge_mode_freqs','sse_tune.tune_rosco.edge_freq', src_indices=[0])
self.connect('rp.powercurve.rated_efficiency', 'sse_tune.tune_rosco.generator_efficiency')
self.connect('rotorse.re.precomp.I_all_blades', 'sse_tune.tune_rosco.rotor_inertia', src_indices=[0])
self.connect('rotorse.rs.frame.flap_mode_freqs','sse_tune.tune_rosco.flap_freq', src_indices=[0])
self.connect('rotorse.rs.frame.edge_mode_freqs','sse_tune.tune_rosco.edge_freq', src_indices=[0])
self.connect('rotorse.rp.powercurve.rated_efficiency', 'sse_tune.tune_rosco.generator_efficiency')
self.connect('nacelle.gearbox_efficiency', 'sse_tune.tune_rosco.gearbox_efficiency')
self.connect('tune_rosco_ivc.max_pitch', 'sse_tune.tune_rosco.max_pitch')
self.connect('tune_rosco_ivc.min_pitch', 'sse_tune.tune_rosco.min_pitch')
Expand Down Expand Up @@ -226,7 +226,7 @@ def setup(self):
self.connect('drivese.above_yaw_cm', 'aeroelastic.nacelle_cm')
self.connect('drivese.generator_I', 'aeroelastic.GenIner', src_indices=[0])
self.connect('nacelle.gear_ratio', 'aeroelastic.gearbox_ratio')
self.connect('rp.powercurve.rated_efficiency', 'aeroelastic.generator_efficiency')
self.connect('rotorse.rp.powercurve.rated_efficiency', 'aeroelastic.generator_efficiency')
self.connect('control.max_pitch_rate' , 'aeroelastic.max_pitch_rate')
self.connect('nacelle.gearbox_efficiency', 'aeroelastic.gearbox_efficiency')
self.connect('nacelle.uptilt', 'aeroelastic.tilt')
Expand Down Expand Up @@ -301,21 +301,21 @@ def setup(self):
self.connect('xf.cm_interp_flaps', 'aeroelastic.airfoils_cm')
self.connect('blade.interp_airfoils.r_thick_interp', 'aeroelastic.rthick')
self.connect('blade.interp_airfoils.ac_interp', 'aeroelastic.ac')
self.connect('re.rhoA', 'aeroelastic.beam:rhoA')
self.connect('re.EIxx', 'aeroelastic.beam:EIxx')
self.connect('re.EIyy', 'aeroelastic.beam:EIyy')
self.connect('re.Tw_iner', 'aeroelastic.beam:Tw_iner')
self.connect('rs.frame.flap_mode_shapes', 'aeroelastic.flap_mode_shapes')
self.connect('rs.frame.edge_mode_shapes', 'aeroelastic.edge_mode_shapes')
self.connect('rp.powercurve.V', 'aeroelastic.U_init')
self.connect('rp.powercurve.Omega', 'aeroelastic.Omega_init')
self.connect('rp.powercurve.pitch', 'aeroelastic.pitch_init')
self.connect('rp.powercurve.V_R25', 'aeroelastic.V_R25')
self.connect('rp.powercurve.rated_V', 'aeroelastic.Vrated')
self.connect('rp.gust.V_gust', 'aeroelastic.Vgust')
self.connect('wt_class.V_extreme1', 'aeroelastic.V_extreme1')
self.connect('wt_class.V_extreme50', 'aeroelastic.V_extreme50')
self.connect('wt_class.V_mean', 'aeroelastic.V_mean_iec')
self.connect('rotorse.rhoA', 'aeroelastic.beam:rhoA')
self.connect('rotorse.EIxx', 'aeroelastic.beam:EIxx')
self.connect('rotorse.EIyy', 'aeroelastic.beam:EIyy')
#self.connect('rotorse.Tw_iner', 'aeroelastic.beam:Tw_iner')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Tw_iner does not exist in connections.html -- commented out for now.

self.connect('rotorse.rs.frame.flap_mode_shapes', 'aeroelastic.flap_mode_shapes')
self.connect('rotorse.rs.frame.edge_mode_shapes', 'aeroelastic.edge_mode_shapes')
self.connect('rotorse.rp.powercurve.V', 'aeroelastic.U_init')
self.connect('rotorse.rp.powercurve.Omega', 'aeroelastic.Omega_init')
self.connect('rotorse.rp.powercurve.pitch', 'aeroelastic.pitch_init')
self.connect('rotorse.rp.powercurve.V_R25', 'aeroelastic.V_R25')
self.connect('rotorse.rp.powercurve.rated_V', 'aeroelastic.Vrated')
self.connect('rotorse.rp.gust.V_gust', 'aeroelastic.Vgust')
self.connect('rotorse.wt_class.V_extreme1', 'aeroelastic.V_extreme1')
self.connect('rotorse.wt_class.V_extreme50', 'aeroelastic.V_extreme50')
self.connect('rotorse.wt_class.V_mean', 'aeroelastic.V_mean_iec')
self.connect('control.V_out', 'aeroelastic.V_cutout')
self.connect('configuration.rated_power', 'aeroelastic.control_ratedPower')
self.connect('control.max_TS', 'aeroelastic.control_maxTS')
Expand Down Expand Up @@ -375,23 +375,23 @@ def setup(self):
self.connect('hub.cone', 'rlds_post.precone')
self.connect('nacelle.uptilt', 'rlds_post.tilt')

self.connect('re.A', 'rlds_post.A')
self.connect('re.EA', 'rlds_post.EA')
self.connect('re.EIxx', 'rlds_post.EIxx')
self.connect('re.EIyy', 'rlds_post.EIyy')
self.connect('re.GJ', 'rlds_post.GJ')
self.connect('re.rhoA', 'rlds_post.rhoA')
self.connect('re.rhoJ', 'rlds_post.rhoJ')
self.connect('re.x_ec', 'rlds_post.x_ec')
self.connect('re.y_ec', 'rlds_post.y_ec')
self.connect('re.precomp.xu_strain_spar', 'rlds_post.xu_strain_spar')
self.connect('re.precomp.xl_strain_spar', 'rlds_post.xl_strain_spar')
self.connect('re.precomp.yu_strain_spar', 'rlds_post.yu_strain_spar')
self.connect('re.precomp.yl_strain_spar', 'rlds_post.yl_strain_spar')
self.connect('re.precomp.xu_strain_te', 'rlds_post.xu_strain_te')
self.connect('re.precomp.xl_strain_te', 'rlds_post.xl_strain_te')
self.connect('re.precomp.yu_strain_te', 'rlds_post.yu_strain_te')
self.connect('re.precomp.yl_strain_te', 'rlds_post.yl_strain_te')
self.connect('rotorse.A', 'rlds_post.A')
self.connect('rotorse.EA', 'rlds_post.EA')
self.connect('rotorse.EIxx', 'rlds_post.EIxx')
self.connect('rotorse.EIyy', 'rlds_post.EIyy')
self.connect('rotorse.GJ', 'rlds_post.GJ')
self.connect('rotorse.rhoA', 'rlds_post.rhoA')
self.connect('rotorse.rhoJ', 'rlds_post.rhoJ')
self.connect('rotorse.x_ec', 'rlds_post.x_ec')
self.connect('rotorse.y_ec', 'rlds_post.y_ec')
self.connect('rotorse.xu_strain_spar', 'rlds_post.xu_strain_spar')
self.connect('rotorse.xl_strain_spar', 'rlds_post.xl_strain_spar')
self.connect('rotorse.yu_strain_spar', 'rlds_post.yu_strain_spar')
self.connect('rotorse.yl_strain_spar', 'rlds_post.yl_strain_spar')
self.connect('rotorse.xu_strain_te', 'rlds_post.xu_strain_te')
self.connect('rotorse.xl_strain_te', 'rlds_post.xl_strain_te')
self.connect('rotorse.yu_strain_te', 'rlds_post.yu_strain_te')
self.connect('rotorse.yl_strain_te', 'rlds_post.yl_strain_te')
self.connect('blade.outer_shape_bem.s','rlds_post.constr.s')

# Connections to DriveSE
Expand All @@ -412,17 +412,17 @@ def setup(self):
self.connect('assembly.rotor_diameter', 'drivese_post.rotor_diameter')
self.connect('configuration.upwind', 'drivese_post.upwind')
self.connect('control.minOmega' , 'drivese_post.minimum_rpm')
self.connect('rp.powercurve.rated_Omega', 'drivese_post.rated_rpm')
self.connect('rp.powercurve.rated_Q', 'drivese_post.rated_torque')
self.connect('rotorse.rp.powercurve.rated_Omega', 'drivese_post.rated_rpm')
self.connect('rotorse.rp.powercurve.rated_Q', 'drivese_post.rated_torque')
self.connect('configuration.rated_power', 'drivese_post.machine_rating')
self.connect('tower.diameter', 'drivese_post.D_top', src_indices=[-1])
self.connect('aeroelastic.Fxyz', 'drivese_post.F_hub')
self.connect('aeroelastic.Mxyz', 'drivese_post.M_hub')
self.connect('rlds_post.frame.root_M', 'drivese_post.pitch_system.BRFM', src_indices=[1])
self.connect('blade.pa.chord_param', 'drivese_post.blade_root_diameter', src_indices=[0])
self.connect('re.precomp.blade_mass', 'drivese_post.blade_mass')
self.connect('re.precomp.mass_all_blades', 'drivese_post.blades_mass')
self.connect('re.precomp.I_all_blades', 'drivese_post.blades_I')
self.connect('rotorse.re.precomp.blade_mass', 'drivese_post.blade_mass')
self.connect('rotorse.re.precomp.mass_all_blades', 'drivese_post.blades_mass')
self.connect('rotorse.re.precomp.I_all_blades', 'drivese_post.blades_I')

self.connect('nacelle.distance_hub2mb', 'drivese_post.L_h1')
self.connect('nacelle.distance_mb2mb', 'drivese_post.L_12')
Expand Down Expand Up @@ -548,7 +548,7 @@ def setup(self):
self.connect('generator.y_allow_pcent', 'drivese_post.generator.y_allow_pcent')
self.connect('generator.z_allow_deg' , 'drivese_post.generator.z_allow_deg')
self.connect('generator.B_tmax' , 'drivese_post.generator.B_tmax')
self.connect('rp.powercurve.rated_mech', 'drivese_post.generator.P_mech')
self.connect('rotorse.rp.powercurve.rated_mech', 'drivese_post.generator.P_mech')

if modeling_options['WISDEM']['GeneratorSE']['type'] in ['eesg','pmsg_arms','pmsg_disc']:
self.connect('generator.tau_p' , 'drivese_post.generator.tau_p')
Expand Down Expand Up @@ -579,7 +579,7 @@ def setup(self):
self.connect('drivese_post.rna_mass', 'towerse_post.rna_mass')

if modeling_options['Level3']['ROSCO']['flag']:
self.connect('rp.gust.V_gust', 'towerse_post.wind.Uref')
self.connect('rotorse.rp.gust.V_gust', 'towerse_post.wind.Uref')

self.connect('assembly.hub_height', 'towerse_post.wind_reference_height') # TODO- environment
self.connect('tower_grid.foundation_height', 'towerse_post.tower_foundation_height') # TODO- environment
Expand Down Expand Up @@ -644,7 +644,7 @@ def setup(self):
if modeling_options['openfast']['dlc_settings']['run_power_curve'] and modeling_options['openfast']['analysis_settings']['Analysis_Level'] == 2:
self.connect('aeroelastic.AEP', 'financese_post.turbine_aep')
elif modeling_options['Level3']['ROSCO']['flag']:
self.connect('rp.AEP', 'financese_post.turbine_aep')
self.connect('rotorse.rp.AEP', 'financese_post.turbine_aep')

self.connect('tcc.turbine_cost_kW', 'financese_post.tcc_per_kW')
if modeling_options['WISDEM']['BOS']['flag']:
Expand All @@ -667,10 +667,10 @@ def setup(self):
if modeling_options['openfast']['dlc_settings']['run_power_curve'] and modeling_options['openfast']['analysis_settings']['Analysis_Level'] == 2:
self.connect('aeroelastic.AEP', 'outputs_2_screen_weis.aep')
else:
self.connect('rp.AEP', 'outputs_2_screen_weis.aep')
self.connect('rotorse.rp.AEP', 'outputs_2_screen_weis.aep')
self.connect('financese_post.lcoe', 'outputs_2_screen_weis.lcoe')

self.connect('re.precomp.blade_mass', 'outputs_2_screen_weis.blade_mass')
self.connect('rotorse.re.precomp.blade_mass', 'outputs_2_screen_weis.blade_mass')
self.connect('aeroelastic.max_TipDxc', 'outputs_2_screen_weis.tip_deflection')

if modeling_options['openfast']['analysis_settings']['Analysis_Level'] == 2:
Expand Down