def test4(self): loads = RotorLoads() loads.F = [123.0, 101.0, -50.0] loads.M = [4843.0, -2239.0, 1232.0] loads.r_hub = [2.0, -3.2, 4.5] loads.rna_cm = [-3.0, 1.6, -4.0] loads.m_RNA = 200.0 loads.tilt = 13.2 loads.g = 9.81 loads.rna_weightM = False check_gradient_unit_test(self, loads)
def test2(self): loads = RotorLoads() loads.F = [123.0, 0.0, 0.0] loads.M = [4843.0, 0.0, 0.0] loads.r_hub = [2.0, -3.2, 4.5] loads.rna_cm = [-3.0, 1.6, -4.0] loads.m_RNA = 200.0 loads.tilt = 13.2 loads.g = 9.81 loads.downwind = True check_gradient_unit_test(self, loads, tol=2e-6)
def configure(self): self.add('PrepArray',PrepArray()) self.add('rotorLoads', RotorLoads()) self.add('WWloads', AeroHydroLoads()) self.add('TwrUtil', TwrUtilization()) self.add('JcktUtil', JcktUtilization()) #self.driver.workflow.add(['PrepArray', 'rotorLoads', 'JcktUtil', 'TwrUtil']) self.driver.workflow.add(['rotorLoads', 'JcktUtil', 'TwrUtil']) #connections to PrepArray #self.connect('RNA_FM', 'PrepArray.RNA_FM') # connections to rotorLoads self.connect('RNA_F', 'rotorLoads.F') self.connect('RNA_M', 'rotorLoads.M') self.connect('rna_weightM','rotorLoads.rna_weightM') self.connect('r_hub', 'rotorLoads.r_hub') self.connect('r_cm', 'rotorLoads.rna_cm') self.connect('Twr_data.TopMass[0]', 'rotorLoads.m_RNA') self.connect('tilt', 'rotorLoads.tilt') self.connect('g', 'rotorLoads.g') #connections to WWLoads self.connect('towerWindLoads', 'WWloads.windLoads') self.connect('towerWaveLoads', 'WWloads.waveLoads') self.connect('towerWindLoads.z', 'WWloads.z') # connections to TwrUtil self.connect('rotorLoads.top_F', 'TwrUtil.top_F') self.connect('rotorLoads.top_M', 'TwrUtil.top_M') ##self.connect('towerWindLoads', 'TwrUtil.towerWindLoads') ##self.connect('towerWaveLoads', 'TwrUtil.towerWaveLoads') self.connect('WWloads.outloads', 'TwrUtil.towerWWLoads') #self.connect('yaw', 'distLoads.yaw') set yaw=0, i.e. the rotor is aligned with the wind, although 45 deg from global x self.connect('Dt', 'TwrUtil.Dt') self.connect('tt', 'TwrUtil.tt') self.connect('Twr_data', 'TwrUtil.Twr_data') self.connect('L_reinforced', 'TwrUtil.L_reinforced') self.connect('IECpsfIns', 'TwrUtil.IECpsfIns') self.connect('g', 'TwrUtil.g') #Connections to inputs of JcktUtilization self.create_passthrough('JcktUtil.Legmems') self.create_passthrough('JcktUtil.Pilemems') self.create_passthrough('JcktUtil.Twrmems') self.create_passthrough('JcktUtil.TPmems') self.create_passthrough('JcktUtil.MbrFrcs') self.create_passthrough('JcktUtil.nlegs') self.create_passthrough('JcktUtil.XjntIDs') self.create_passthrough('JcktUtil.KjntIDs') self.create_passthrough('JcktUtil.JcktGeoOut') #Connections to outputs self.connect('TwrUtil.utilization', 'tower_utilization') self.connect('JcktUtil.Utilouts', 'jacket_utilization')
def configure_turbine_with_jacket(assembly, with_new_nacelle=False, flexible_blade=False, with_3pt_drive=False): """a stand-alone configure method to allow for flatter assemblies Parameters ---------- assembly : Assembly an openmdao assembly to be configured with_new_nacelle : bool False uses the default implementation, True uses an experimental implementation designed to smooth out discontinities making in amenable for gradient-based optimization flexible_blade : bool if True, internally solves the coupled aero/structural deflection using fixed point iteration. Note that the coupling is currently only in the flapwise deflection, and is primarily only important for highly flexible blades. If False, the aero loads are passed to the structure but there is no further iteration. """ # --- general turbine configuration inputs--- assembly.add( 'rho', Float(1.225, iotype='in', units='kg/m**3', desc='density of air', deriv_ignore=True)) assembly.add( 'mu', Float(1.81206e-5, iotype='in', units='kg/m/s', desc='dynamic viscosity of air', deriv_ignore=True)) assembly.add( 'shear_exponent', Float(0.2, iotype='in', desc='shear exponent', deriv_ignore=True)) assembly.add('hub_height', Float(90.0, iotype='in', units='m', desc='hub height')) assembly.add( 'turbine_class', Enum('I', ('I', 'II', 'III'), iotype='in', desc='IEC turbine class')) assembly.add( 'turbulence_class', Enum('B', ('A', 'B', 'C'), iotype='in', desc='IEC turbulence class class')) assembly.add( 'g', Float(9.81, iotype='in', units='m/s**2', desc='acceleration of gravity', deriv_ignore=True)) assembly.add( 'cdf_reference_height_wind_speed', Float( 90.0, iotype='in', desc= 'reference hub height for IEC wind speed (used in CDF calculation)' )) assembly.add('downwind', Bool(False, iotype='in', desc='flag if rotor is downwind')) assembly.add('tower_dt', Float(iotype='in', units='m', desc='tower top diameter')) # update for jacket assembly.add('generator_speed', Float(iotype='in', units='rpm', desc='generator speed')) assembly.add( 'machine_rating', Float(5000.0, units='kW', iotype='in', desc='machine rated power')) assembly.add( 'rna_weightM', Bool(True, iotype='in', desc='flag to consider or not the RNA weight effect on Moment')) assembly.add('rotor', RotorSE()) if with_new_nacelle: assembly.add('hub', HubSE()) if with_3pt_drive: assembly.add('nacelle', Drive3pt()) else: assembly.add('nacelle', Drive4pt()) else: assembly.add('nacelle', DriveWPACT()) assembly.add('hub', HubWPACT()) assembly.add('rna', RNAMass()) assembly.add('rotorloads1', RotorLoads()) assembly.add('rotorloads2', RotorLoads()) assembly.add('jacket', JacketSE()) assembly.add('maxdeflection', MaxTipDeflection()) if flexible_blade: assembly.add('fpi', FixedPointIterator()) assembly.fpi.workflow.add(['rotor']) assembly.fpi.add_parameter('rotor.delta_precurve_sub', low=-1.e99, high=1.e99) assembly.fpi.add_parameter('rotor.delta_bladeLength', low=-1.e99, high=1.e99) assembly.fpi.add_constraint( 'rotor.delta_precurve_sub = rotor.delta_precurve_sub_out') assembly.fpi.add_constraint( 'rotor.delta_bladeLength = rotor.delta_bladeLength_out') assembly.fpi.max_iteration = 20 assembly.fpi.tolerance = 1e-8 assembly.driver.workflow.add(['fpi']) else: assembly.driver.workflow.add(['rotor']) assembly.driver.workflow.add([ 'hub', 'nacelle', 'jacket', 'maxdeflection', 'rna', 'rotorloads1', 'rotorloads2' ]) # TODO: rotor drivetrain design should be connected to nacelle drivetrain design # connections to rotor assembly.connect('machine_rating', 'rotor.control.ratedPower') assembly.connect('rho', 'rotor.rho') assembly.connect('mu', 'rotor.mu') assembly.connect('shear_exponent', 'rotor.shearExp') assembly.connect('hub_height', 'rotor.hubHt') assembly.connect('turbine_class', 'rotor.turbine_class') assembly.connect('turbulence_class', 'rotor.turbulence_class') assembly.connect('g', 'rotor.g') assembly.connect('cdf_reference_height_wind_speed', 'rotor.cdf_reference_height_wind_speed') # connections to hub assembly.connect('rotor.mass_one_blade', 'hub.blade_mass') assembly.connect('rotor.root_bending_moment', 'hub.rotor_bending_moment') assembly.connect('rotor.diameter', 'hub.rotor_diameter') assembly.connect('rotor.hub_diameter', 'hub.blade_root_diameter') assembly.connect('rotor.nBlades', 'hub.blade_number') if with_new_nacelle: assembly.connect('nacelle.MB1_location', 'hub.MB1_location') assembly.connect('rotor.tilt', 'hub.gamma') assembly.connect('nacelle.L_rb', 'hub.L_rb') # connections to nacelle #TODO: fatigue option variables assembly.connect('rotor.diameter', 'nacelle.rotor_diameter') if not with_new_nacelle: assembly.connect( 'rotor.mass_all_blades + hub.hub_system_mass', 'nacelle.rotor_mass' ) #DODO: circular dependency if using DriveSE (nacelle csm --> hub, hub mass --> nacelle) if with_new_nacelle: assembly.connect('rotor.nBlades', 'nacelle.blade_number') assembly.connect('rotor.tilt', 'nacelle.shaft_angle') assembly.connect('333.3 * machine_rating / 1000.0', 'nacelle.shrink_disc_mass') assembly.connect('1.5 * rotor.ratedConditions.Q', 'nacelle.rotor_torque') assembly.connect('rotor.ratedConditions.T', 'nacelle.rotor_thrust') assembly.connect('rotor.ratedConditions.Omega', 'nacelle.rotor_speed') assembly.connect('machine_rating', 'nacelle.machine_rating') assembly.connect('rotor.root_bending_moment', 'nacelle.rotor_bending_moment') assembly.connect('generator_speed/rotor.ratedConditions.Omega', 'nacelle.gear_ratio') '''if with_new_nacelle: assembly.connect('rotor.g', 'nacelle.g')''' # Only drive smooth taking g from rotor; TODO: update when drive_smooth is updated assembly.connect( 'tower_dt', 'nacelle.tower_top_diameter' ) # OpenMDAO circular dependency issue # update for jacket input # connections to rna assembly.connect('rotor.mass_all_blades', 'rna.blades_mass') assembly.connect('rotor.I_all_blades', 'rna.blades_I') assembly.connect('hub.hub_system_mass', 'rna.hub_mass') assembly.connect('hub.hub_system_cm', 'rna.hub_cm') assembly.connect('hub.hub_system_I', 'rna.hub_I') assembly.connect('nacelle.nacelle_mass', 'rna.nac_mass') assembly.connect('nacelle.nacelle_cm', 'rna.nac_cm') assembly.connect('nacelle.nacelle_I', 'rna.nac_I') # connections to rotorloads1 assembly.connect('downwind', 'rotorloads1.downwind') assembly.connect('rna_weightM', 'rotorloads1.rna_weightM') assembly.connect('1.8 * rotor.ratedConditions.T', 'rotorloads1.F[0]') assembly.connect('rotor.ratedConditions.Q', 'rotorloads1.M[0]') assembly.connect('hub.hub_system_cm', 'rotorloads1.r_hub') assembly.connect('rna.rna_cm', 'rotorloads1.rna_cm') assembly.connect('rotor.tilt', 'rotorloads1.tilt') assembly.connect('g', 'rotorloads1.g') assembly.connect('rna.rna_mass', 'rotorloads1.m_RNA') # connections to rotorloads2 assembly.connect('downwind', 'rotorloads2.downwind') assembly.connect('rna_weightM', 'rotorloads2.rna_weightM') assembly.connect('rotor.T_extreme', 'rotorloads2.F[0]') assembly.connect('rotor.Q_extreme', 'rotorloads2.M[0]') assembly.connect('hub.hub_system_cm', 'rotorloads2.r_hub') assembly.connect('rna.rna_cm', 'rotorloads2.rna_cm') assembly.connect('rotor.tilt', 'rotorloads2.tilt') assembly.connect('g', 'rotorloads2.g') assembly.connect('rna.rna_mass', 'rotorloads2.m_RNA') # connections to jacket assembly.connect('rho', 'jacket.Windinputs.rho') # jacket input assembly.connect('mu', 'jacket.Windinputs.mu') # jacket input assembly.connect('-g', 'jacket.FrameAuxIns.gvector[2]') # jacket input assembly.connect('hub_height', 'jacket.Windinputs.HH') # jacket input assembly.connect('tower_dt', 'jacket.Twrinputs.Dt') # jacket input assembly.connect('rotor.yaw', 'jacket.RNAinputs.yawangle') # jacket input #assembly.connect('hub_height - nacelle.nacelle_cm[2]', 'jacket.Twrinputs.Htwr') # jacket input; TODO: probably irrelevant for this purpose, tower length is now determined in jacket assembly.connect('rna.rna_mass', 'jacket.RNAinputs.mass') # jacket input assembly.connect('rna.rna_cm', 'jacket.RNAinputs.CMoff') # jacket input assembly.connect('rna.rna_I_TT', 'jacket.RNAinputs.I') # jacket input # Rated rotor loads (Option 1) assembly.connect('rotor.ratedConditions.V', 'jacket.Windinputs.U50HH') # jacket input assembly.connect('rotorloads1.top_F', 'jacket.RNA_F[0:3]') # jacket input assembly.connect('rotorloads1.top_M', 'jacket.RNA_F[3:6]') # jacket input # Survival rotor loads (Option 2) #assembly.connect('rotor.V_extreme', 'tower.Windinputs.U50HH') # jacket input #assembly.connect('rotorloads2.top_F', 'jacket.RNA_F') # jacket input #assembly.connect('rotorloads2.top_M', 'jacket.RNA_M') # jacket input # connections to maxdeflection assembly.connect('rotor.Rtip', 'maxdeflection.Rtip') assembly.connect('rotor.precurveTip', 'maxdeflection.precurveTip') assembly.connect('rotor.presweepTip', 'maxdeflection.presweepTip') assembly.connect('rotor.precone', 'maxdeflection.precone') assembly.connect('rotor.tilt', 'maxdeflection.tilt') assembly.connect('hub.hub_system_cm', 'maxdeflection.hub_tt') assembly.connect( 'jacket.Twrouts.nodes[2,:]', 'maxdeflection.tower_z' ) # jacket input, had to make array dimensions explicit on instantiation for this connect to work ---THIS is the z at CMzoff, not necessarily the top flange assembly.connect('jacket.Twrouts', 'maxdeflection.Twrouts' ) # TODO: jacket input - doesnt recognize logobj assembly.connect('jacket.Twrouts.Htwr', 'maxdeflection.towerHt') # jacket input
def configure_turbine(assembly, with_new_nacelle=True, flexible_blade=False, with_3pt_drive=False): """a stand-alone configure method to allow for flatter assemblies Parameters ---------- assembly : Assembly an openmdao assembly to be configured with_new_nacelle : bool False uses the default implementation, True uses an experimental implementation designed to smooth out discontinities making in amenable for gradient-based optimization flexible_blade : bool if True, internally solves the coupled aero/structural deflection using fixed point iteration. Note that the coupling is currently only in the flapwise deflection, and is primarily only important for highly flexible blades. If False, the aero loads are passed to the structure but there is no further iteration. """ # --- general turbine configuration inputs--- assembly.add( 'rho', Float(1.225, iotype='in', units='kg/m**3', desc='density of air', deriv_ignore=True)) assembly.add( 'mu', Float(1.81206e-5, iotype='in', units='kg/m/s', desc='dynamic viscosity of air', deriv_ignore=True)) assembly.add( 'shear_exponent', Float(0.2, iotype='in', desc='shear exponent', deriv_ignore=True)) assembly.add('hub_height', Float(90.0, iotype='in', units='m', desc='hub height')) assembly.add( 'turbine_class', Enum('I', ('I', 'II', 'III', 'IV'), iotype='in', desc='IEC turbine class')) assembly.add( 'turbulence_class', Enum('B', ('A', 'B', 'C'), iotype='in', desc='IEC turbulence class class')) assembly.add( 'g', Float(9.81, iotype='in', units='m/s**2', desc='acceleration of gravity', deriv_ignore=True)) assembly.add( 'cdf_reference_height_wind_speed', Float( 90.0, iotype='in', desc= 'reference hub height for IEC wind speed (used in CDF calculation)' )) assembly.add('downwind', Bool(False, iotype='in', desc='flag if rotor is downwind')) assembly.add( 'tower_d', Array([0.0], iotype='in', units='m', desc='diameters along tower')) assembly.add('generator_speed', Float(iotype='in', units='rpm', desc='generator speed')) assembly.add( 'machine_rating', Float(5000.0, units='kW', iotype='in', desc='machine rated power')) assembly.add( 'rna_weightM', Bool(True, iotype='in', desc='flag to consider or not the RNA weight effect on Moment')) assembly.add('rotor', RotorSE()) if with_new_nacelle: assembly.add('hub', HubSE()) assembly.add('hubSystem', Hub_System_Adder_drive()) assembly.add('moments', blade_moment_transform()) assembly.add('forces', blade_force_transform()) if with_3pt_drive: assembly.add('nacelle', Drive3pt()) else: assembly.add('nacelle', Drive4pt()) else: assembly.add('nacelle', DriveWPACT()) assembly.add('hub', HubWPACT()) assembly.add('rna', RNAMass()) assembly.add('rotorloads1', RotorLoads()) assembly.add('rotorloads2', RotorLoads()) assembly.add('tower', TowerSE()) assembly.add('maxdeflection', MaxTipDeflection()) if flexible_blade: assembly.add('fpi', FixedPointIterator()) assembly.fpi.workflow.add(['rotor']) assembly.fpi.add_parameter('rotor.delta_precurve_sub', low=-1.e99, high=1.e99) assembly.fpi.add_parameter('rotor.delta_bladeLength', low=-1.e99, high=1.e99) assembly.fpi.add_constraint( 'rotor.delta_precurve_sub = rotor.delta_precurve_sub_out') assembly.fpi.add_constraint( 'rotor.delta_bladeLength = rotor.delta_bladeLength_out') assembly.fpi.max_iteration = 20 assembly.fpi.tolerance = 1e-8 assembly.driver.workflow.add(['fpi']) else: assembly.driver.workflow.add(['rotor']) assembly.driver.workflow.add([ 'hub', 'nacelle', 'tower', 'maxdeflection', 'rna', 'rotorloads1', 'rotorloads2' ]) if with_new_nacelle: assembly.driver.workflow.add(['hubSystem', 'moments', 'forces']) # TODO: rotor drivetrain design should be connected to nacelle drivetrain design # connections to rotor assembly.connect('machine_rating', 'rotor.control.ratedPower') assembly.connect('rho', 'rotor.rho') assembly.connect('mu', 'rotor.mu') assembly.connect('shear_exponent', 'rotor.shearExp') assembly.connect('hub_height', 'rotor.hubHt') assembly.connect('turbine_class', 'rotor.turbine_class') assembly.connect('turbulence_class', 'rotor.turbulence_class') assembly.connect('g', 'rotor.g') assembly.connect('cdf_reference_height_wind_speed', 'rotor.cdf_reference_height_wind_speed') # connections to hub and hub system assembly.connect('rotor.mass_one_blade', 'hub.blade_mass') assembly.connect('rotor.root_bending_moment', 'hub.rotor_bending_moment') assembly.connect('rotor.diameter', ['hub.rotor_diameter']) assembly.connect('rotor.hub_diameter', 'hub.blade_root_diameter') assembly.connect('rotor.nBlades', 'hub.blade_number') if with_new_nacelle: assembly.connect('machine_rating', 'hub.machine_rating') assembly.connect('rotor.diameter', ['hubSystem.rotor_diameter']) assembly.connect('nacelle.MB1_location', 'hubSystem.MB1_location') # TODO: bearing locations assembly.connect('nacelle.L_rb', 'hubSystem.L_rb') assembly.connect('rotor.tilt', 'hubSystem.shaft_angle') assembly.connect('hub.hub_diameter', 'hubSystem.hub_diameter') assembly.connect('hub.hub_thickness', 'hubSystem.hub_thickness') assembly.connect('hub.hub_mass', 'hubSystem.hub_mass') assembly.connect('hub.spinner_mass', 'hubSystem.spinner_mass') assembly.connect('hub.pitch_system_mass', 'hubSystem.pitch_system_mass') # connections to nacelle #TODO: fatigue option variables assembly.connect('rotor.diameter', 'nacelle.rotor_diameter') assembly.connect('1.5 * rotor.ratedConditions.Q', 'nacelle.rotor_torque') assembly.connect('rotor.ratedConditions.T', 'nacelle.rotor_thrust') assembly.connect('rotor.ratedConditions.Omega', 'nacelle.rotor_speed') assembly.connect('machine_rating', 'nacelle.machine_rating') assembly.connect('rotor.root_bending_moment', 'nacelle.rotor_bending_moment') assembly.connect('generator_speed/rotor.ratedConditions.Omega', 'nacelle.gear_ratio') assembly.connect( 'tower_d[-1]', 'nacelle.tower_top_diameter') # OpenMDAO circular dependency issue assembly.connect( 'rotor.mass_all_blades + hub.hub_system_mass', 'nacelle.rotor_mass') # assuming not already in rotor force / moments # variable connections for new nacelle if with_new_nacelle: assembly.connect('rotor.nBlades', 'nacelle.blade_number') assembly.connect('rotor.tilt', 'nacelle.shaft_angle') assembly.connect('333.3 * machine_rating / 1000.0', 'nacelle.shrink_disc_mass') assembly.connect('rotor.hub_diameter', 'nacelle.blade_root_diameter') #moments # assembly.connect('rotor.Q_extreme','nacelle.rotor_bending_moment_x') assembly.connect('rotor.Mxyz_0', 'moments.b1') assembly.connect('rotor.Mxyz_120', 'moments.b2') assembly.connect('rotor.Mxyz_240', 'moments.b3') assembly.connect('rotor.Pitch', 'moments.pitch_angle') assembly.connect('rotor.TotalCone', 'moments.cone_angle') assembly.connect('moments.Mx', 'nacelle.rotor_bending_moment_x' ) #accounted for in ratedConditions.Q assembly.connect('moments.My', 'nacelle.rotor_bending_moment_y') assembly.connect('moments.Mz', 'nacelle.rotor_bending_moment_z') #forces # assembly.connect('rotor.T_extreme','nacelle.rotor_force_x') assembly.connect('rotor.Fxyz_0', 'forces.b1') assembly.connect('rotor.Fxyz_120', 'forces.b2') assembly.connect('rotor.Fxyz_240', 'forces.b3') assembly.connect('rotor.Pitch', 'forces.pitch_angle') assembly.connect('rotor.TotalCone', 'forces.cone_angle') assembly.connect('forces.Fx', 'nacelle.rotor_force_x') assembly.connect('forces.Fy', 'nacelle.rotor_force_y') assembly.connect('forces.Fz', 'nacelle.rotor_force_z') '''if with_new_nacelle: assembly.connect('rotor.g', 'nacelle.g') # Only drive smooth taking g from rotor; TODO: update when drive_smooth is updated''' # connections to rna assembly.connect('rotor.mass_all_blades', 'rna.blades_mass') assembly.connect('rotor.I_all_blades', 'rna.blades_I') if with_new_nacelle: assembly.connect('hubSystem.hub_system_mass', 'rna.hub_mass') assembly.connect('hubSystem.hub_system_cm', 'rna.hub_cm') assembly.connect('hubSystem.hub_system_I', 'rna.hub_I') else: assembly.connect('hub.hub_system_mass', 'rna.hub_mass') assembly.connect('hub.hub_system_cm', 'rna.hub_cm') assembly.connect('hub.hub_system_I', 'rna.hub_I') assembly.connect('nacelle.nacelle_mass', 'rna.nac_mass') assembly.connect('nacelle.nacelle_cm', 'rna.nac_cm') assembly.connect('nacelle.nacelle_I', 'rna.nac_I') # connections to rotorloads1 assembly.connect('downwind', 'rotorloads1.downwind') assembly.connect('rna_weightM', 'rotorloads1.rna_weightM') assembly.connect('1.8 * rotor.ratedConditions.T', 'rotorloads1.F[0]') assembly.connect('rotor.ratedConditions.Q', 'rotorloads1.M[0]') if with_new_nacelle: assembly.connect('hubSystem.hub_system_cm', 'rotorloads1.r_hub') else: assembly.connect('hub.hub_system_cm', 'rotorloads1.r_hub') assembly.connect('rna.rna_cm', 'rotorloads1.rna_cm') assembly.connect('rotor.tilt', 'rotorloads1.tilt') assembly.connect('g', 'rotorloads1.g') assembly.connect('rna.rna_mass', 'rotorloads1.m_RNA') # connections to rotorloads2 assembly.connect('downwind', 'rotorloads2.downwind') assembly.connect('rna_weightM', 'rotorloads2.rna_weightM') assembly.connect('rotor.T_extreme', 'rotorloads2.F[0]') assembly.connect('rotor.Q_extreme', 'rotorloads2.M[0]') if with_new_nacelle: assembly.connect('hubSystem.hub_system_cm', 'rotorloads2.r_hub') else: assembly.connect('hub.hub_system_cm', 'rotorloads2.r_hub') assembly.connect('rna.rna_cm', 'rotorloads2.rna_cm') assembly.connect('rotor.tilt', 'rotorloads2.tilt') assembly.connect('g', 'rotorloads2.g') assembly.connect('rna.rna_mass', 'rotorloads2.m_RNA') # connections to tower assembly.connect('rho', 'tower.wind_rho') assembly.connect('mu', 'tower.wind_mu') assembly.connect('g', 'tower.g') assembly.connect('hub_height', 'tower.wind_zref') assembly.connect('tower_d', 'tower.d_param') assembly.connect('rotor.ratedConditions.V', 'tower.wind_Uref1') assembly.connect('rotor.V_extreme', 'tower.wind_Uref2') assembly.connect('rotor.yaw', 'tower.yaw') assembly.connect('hub_height - nacelle.nacelle_cm[2]', 'tower.z_param[-1]') #TODO: hub height should be derived assembly.connect('rna.rna_mass', 'tower.m[0]') assembly.connect('rna.rna_cm[0]', 'tower.mrhox[0]') assembly.connect('rna.rna_cm[1]', 'tower.mrhoy[0]') assembly.connect('rna.rna_cm[2]', 'tower.mrhoz[0]') assembly.connect('rna.rna_I_TT[0]', 'tower.mIxx[0]') assembly.connect('rna.rna_I_TT[1]', 'tower.mIyy[0]') assembly.connect('rna.rna_I_TT[2]', 'tower.mIzz[0]') assembly.connect('rna.rna_I_TT[3]', 'tower.mIxy[0]') assembly.connect('rna.rna_I_TT[4]', 'tower.mIxz[0]') assembly.connect('rna.rna_I_TT[5]', 'tower.mIyz[0]') assembly.connect('rotorloads1.top_F[0]', 'tower.Fx1[0]') assembly.connect('rotorloads1.top_F[1]', 'tower.Fy1[0]') assembly.connect('rotorloads1.top_F[2]', 'tower.Fz1[0]') assembly.connect('rotorloads1.top_M[0]', 'tower.Mxx1[0]') assembly.connect('rotorloads1.top_M[1]', 'tower.Myy1[0]') assembly.connect('rotorloads1.top_M[2]', 'tower.Mzz1[0]') assembly.connect('rotorloads2.top_F[0]', 'tower.Fx2[0]') assembly.connect('rotorloads2.top_F[1]', 'tower.Fy2[0]') assembly.connect('rotorloads2.top_F[2]', 'tower.Fz2[0]') assembly.connect('rotorloads2.top_M[0]', 'tower.Mxx2[0]') assembly.connect('rotorloads2.top_M[1]', 'tower.Myy2[0]') assembly.connect('rotorloads2.top_M[2]', 'tower.Mzz2[0]') # connections to maxdeflection assembly.connect('rotor.Rtip', 'maxdeflection.Rtip') assembly.connect('rotor.precurveTip', 'maxdeflection.precurveTip') assembly.connect('rotor.presweepTip', 'maxdeflection.presweepTip') assembly.connect('rotor.precone', 'maxdeflection.precone') assembly.connect('rotor.tilt', 'maxdeflection.tilt') if with_new_nacelle: assembly.connect('hubSystem.hub_system_cm', 'maxdeflection.hub_tt') else: assembly.connect('hub.hub_system_cm', 'maxdeflection.hub_tt') assembly.connect('tower.z_param', 'maxdeflection.tower_z') assembly.connect('tower.d_param', 'maxdeflection.tower_d') assembly.connect('hub_height - nacelle.nacelle_cm[2]', 'maxdeflection.towerHt')