Exemplo n.º 1
0
def example_218WD_3MW():
    example = optimizationSpar()
    tt = time.time()
    example.spar.number_of_sections = 4
    example.spar.outer_diameter = [5., 6., 6., 9.]
    example.spar.length = [6., 12., 15., 47.]
    example.spar.end_elevation = [7., -5., -20., -67.]
    example.spar.start_elevation = [13., 7., -5., -20.]
    example.spar.bulk_head = ['N', 'T', 'N', 'B']
    example.spar.water_depth = 218.
    example.spar.load_condition = 'N'
    example.spar.significant_wave_height = 10.820
    example.spar.significant_wave_period = 9.800
    example.spar.wind_reference_speed = 11.
    example.spar.wind_reference_height = 75.
    example.spar.alpha = 0.110
    example.spar.RNA_keel_to_CG = 142.
    example.spar.RNA_mass = 125000.
    example.spar.tower_mass = 127877.
    example.spar.tower_center_of_gravity =  23.948
    example.spar.tower_wind_force = 19950.529
    example.spar.RNA_wind_force = 391966.178
    example.spar.RNA_center_of_gravity_x = 4.1
    example.spar.mooring_total_cost = 810424.053596  
    example.spar.mooring_keel_to_CG = 54.000
    example.spar.mooring_vertical_load = 1182948.791
    example.spar.mooring_horizontal_stiffness = 3145.200
    example.spar.mooring_vertical_stiffness =7111.072
    example.spar.sum_forces_x = [7886.848,437.844,253.782,174.651,124.198,85.424,50.689,17.999,-13.222,-43.894,-74.245,-105.117,-136.959,-170.729,-207.969,-251.793,-307.638,-386.514,-518.734,-859.583,-11091.252]
    example.spar.offset_x = [-40.362,-35.033,-29.703,-24.373,-19.044,-13.714,-8.385,-3.055,2.274,7.604,12.933,18.263,23.593,28.922,34.252,39.581,44.911,50.240,55.570,60.900,66.229]
    example.spar.damaged_mooring = [-40.079,65.824]
    example.spar.intact_mooring = [-39.782,65.399]
    example.spar.run()
    example.run()
    yna = convert_units(example.spar.neutral_axis ,'m','inch')
    fullStiffeners = full_stiffeners_table()
    for i in range (0,len(fullStiffeners)-1):
        stiffener_bef = fullStiffeners[i]
        stiffener_aft = fullStiffeners[i+1]
        if yna > stiffener_bef[6] and yna<stiffener_aft[6]:
            opt_index = i+1
    
    second_fit = Spar()
    second_fit.wall_thickness = example.spar.wall_thickness
    second_fit.number_of_rings = example.spar.number_of_rings
    second_fit.stiffener_curve_fit = False
    second_fit.stiffener_index = opt_index
    second_fit.number_of_sections = example.spar.number_of_sections
    second_fit.outer_diameter = example.spar.outer_diameter 
    second_fit.length = example.spar.length 
    second_fit.end_elevation = example.spar.end_elevation 
    second_fit.start_elevation = example.spar.start_elevation 
    second_fit.bulk_head = example.spar.bulk_head 
    second_fit.water_depth = example.spar.water_depth 
    second_fit.load_condition = example.spar.load_condition 
    second_fit.significant_wave_height = example.spar.significant_wave_height
    second_fit.significant_wave_period = example.spar.significant_wave_period 
    second_fit.wind_reference_speed = example.spar.wind_reference_speed 
    second_fit.wind_reference_height = example.spar.wind_reference_height 
    second_fit.alpha = example.spar.alpha 
    second_fit.RNA_keel_to_CG = example.spar.RNA_keel_to_CG 
    second_fit.RNA_mass = example.spar.RNA_mass
    second_fit.tower_mass = example.spar.tower_mass
    second_fit.tower_center_of_gravity = example.spar.tower_center_of_gravity 
    second_fit.tower_wind_force = example.spar.tower_wind_force 
    second_fit.RNA_wind_force = example.spar.RNA_wind_force 
    second_fit.RNA_center_of_gravity_x = example.spar.RNA_center_of_gravity_x 
    second_fit.mooring_total_cost = example.spar.mooring_total_cost  
    second_fit.mooring_keel_to_CG = example.spar.mooring_keel_to_CG 
    second_fit.mooring_vertical_load = example.spar.mooring_vertical_load 
    second_fit.mooring_horizontal_stiffness = example.spar.mooring_horizontal_stiffness 
    second_fit.mooring_vertical_stiffness = example.spar.mooring_vertical_stiffness 
    second_fit.sum_forces_x = example.spar.sum_forces_x 
    second_fit.offset_x = example.spar.offset_x
    second_fit.damaged_mooring = example.spar.damaged_mooring 
    second_fit.intact_mooring = example.spar.intact_mooring 
    second_fit.run()

    cost = second_fit.total_cost
    index = opt_index
    best_index = opt_index
    unity = max(second_fit.web_compactness,second_fit.flange_compactness,max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG))   
    for i in range(opt_index,326):
        index += 1
        second_fit.stiffener_index = index
        second_fit.run()
        unity = max(second_fit.web_compactness,second_fit.flange_compactness,max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG)) 
        if unity < 1.0:
            if second_fit.total_cost < cost : 
                cost=second_fit.total_cost 
                best_index = i
                second_fit.stiffener_index = best_index
                second_fit.run()
    print '--------------example_218WD_3MW------------------'
    print "Elapsed time: ", time.time()-tt, " seconds"
    sys_print(second_fit)
Exemplo n.º 2
0
    def configure(self):
        if OPTIMIZE:
            self.add('driver', COBYLAdriver())
            self.driver.maxfun = 20

        # select components
        self.add('tower_RNA', Tower_RNA())
        self.add('spar', Spar())
        self.add('mooring', Mooring())

        # workflow
        self.driver.workflow.add(['tower_RNA', 'mooring', 'spar'])
        # connect inputs
        self.connect('tower_base_outer_diameter',
                     'tower_RNA.base_outer_diameter')
        self.connect('tower_top_outer_diameter',
                     'tower_RNA.top_outer_diameter')
        self.connect('tower_length', 'tower_RNA.length')
        self.connect('air_density',
                     ['tower_RNA.air_density', 'spar.air_density'])
        self.connect(
            'wind_reference_speed',
            ['tower_RNA.wind_reference_speed', 'spar.wind_reference_speed'])
        self.connect(
            'wind_reference_height',
            ['tower_RNA.wind_reference_height', 'spar.wind_reference_height'])
        self.connect('gust_factor',
                     ['tower_RNA.gust_factor', 'spar.gust_factor'])
        self.connect('alpha', ['tower_RNA.alpha', 'spar.alpha'])
        self.connect('spar_elevations', [
            'tower_RNA.spar_elevations', 'mooring.spar_elevations',
            'spar.elevations'
        ])
        self.connect('example_turbine_size', 'tower_RNA.example_turbine_size')
        self.connect('rotor_diameter', 'tower_RNA.rotor_diameter')
        self.connect('RNA_center_of_gravity_x', [
            'tower_RNA.RNA_center_of_gravity_x', 'spar.RNA_center_of_gravity_x'
        ])
        self.connect('RNA_center_of_gravity_y',
                     'tower_RNA.RNA_center_of_gravity_y')
        self.connect('cut_out_speed', 'tower_RNA.cut_out_speed')
        self.connect('tower_mass', ['tower_RNA.tower_mass', 'spar.tower_mass'])
        self.connect('RNA_mass', ['tower_RNA.RNA_mass', 'spar.RNA_mass'])

        self.connect('fairlead_depth', 'mooring.fairlead_depth')
        self.connect('scope_ratio', 'mooring.scope_ratio')
        self.connect('pretension_percent', 'mooring.pretension_percent')
        self.connect('mooring_diameter', 'mooring.mooring_diameter')
        self.connect('number_of_mooring_lines',
                     'mooring.number_of_mooring_lines')
        self.connect('water_depth',
                     ['mooring.water_depth', 'spar.water_depth'])
        self.connect('mooring_type', 'mooring.mooring_type')
        self.connect('anchor_type', 'mooring.anchor_type')
        self.connect('fairlead_offset_from_shell',
                     'mooring.fairlead_offset_from_shell')
        self.connect('user_MBL', 'mooring.user_MBL')
        self.connect('user_WML', 'mooring.user_WML')
        self.connect('user_AE_storm', 'mooring.user_AE_storm')
        self.connect('user_MCPL', 'mooring.user_MCPL')
        self.connect('user_anchor_cost', 'mooring.user_anchor_cost')
        self.connect('misc_cost_factor', 'mooring.misc_cost_factor')
        self.connect('number_of_discretizations',
                     'mooring.number_of_discretizations')
        self.connect('spar_outer_diameter',
                     ['mooring.spar_outer_diameter', 'spar.outer_diameter'])
        self.connect('water_density',
                     ['mooring.water_density', 'spar.water_density'])

        self.connect('wall_thickness', 'spar.wall_thickness')
        self.connect('number_of_rings', 'spar.number_of_rings')
        self.connect('neutral_axis', 'spar.neutral_axis')
        #self.connect('stiffener_curve_fit','spar.stiffener_curve_fit')
        self.connect('stiffener_index', 'spar.stiffener_index')
        self.connect('number_of_sections', 'spar.number_of_sections')
        self.connect('bulk_head', 'spar.bulk_head')
        self.connect('straight_col_cost', 'spar.straight_col_cost')
        self.connect('tapered_col_cost', 'spar.tapered_col_cost')
        self.connect('outfitting_cost', 'spar.outfitting_cost')
        self.connect('ballast_cost', 'spar.ballast_cost')
        self.connect('gravity', 'spar.gravity')
        self.connect('load_condition', 'spar.load_condition')
        self.connect('significant_wave_height', 'spar.significant_wave_height')
        self.connect('significant_wave_period', 'spar.significant_wave_period')
        self.connect('material_density', 'spar.material_density')
        self.connect('E', 'spar.E')
        self.connect('nu', 'spar.nu')
        self.connect('yield_stress', 'spar.yield_stress')
        self.connect('shell_mass_factor', 'spar.shell_mass_factor')
        self.connect('bulkhead_mass_factor', 'spar.bulkhead_mass_factor')
        self.connect('ring_mass_factor', 'spar.ring_mass_factor')
        self.connect('outfitting_factor', 'spar.outfitting_factor')
        self.connect('spar_mass_factor', 'spar.spar_mass_factor')
        self.connect('permanent_ballast_height',
                     'spar.permanent_ballast_height')
        self.connect('fixed_ballast_height', 'spar.fixed_ballast_height')
        self.connect('permanent_ballast_density',
                     'spar.permanent_ballast_density')
        self.connect('fixed_ballast_density', 'spar.fixed_ballast_density')
        self.connect('offset_amplification_factor',
                     'spar.offset_amplification_factor')

        # connect outputs to inputs
        self.connect('tower_RNA.RNA_keel_to_CG', 'spar.RNA_keel_to_CG')
        self.connect('tower_RNA.tower_center_of_gravity',
                     'spar.tower_center_of_gravity')
        self.connect('tower_RNA.tower_wind_force', 'spar.tower_wind_force')
        self.connect('tower_RNA.RNA_wind_force', 'spar.RNA_wind_force')
        self.connect('mooring.mooring_total_cost', 'spar.mooring_total_cost')
        self.connect('mooring.mooring_keel_to_CG', 'spar.mooring_keel_to_CG')
        self.connect('mooring.mooring_vertical_load',
                     'spar.mooring_vertical_load')
        self.connect('mooring.mooring_horizontal_stiffness',
                     'spar.mooring_horizontal_stiffness')
        self.connect('mooring.mooring_vertical_stiffness',
                     'spar.mooring_vertical_stiffness')
        self.connect('mooring.sum_forces_x', 'spar.sum_forces_x')
        self.connect('mooring.offset_x', 'spar.offset_x')
        self.connect('mooring.damaged_mooring', 'spar.damaged_mooring')
        self.connect('mooring.intact_mooring', 'spar.intact_mooring')
        self.connect('mooring.mooring_mass', 'spar.mooring_mass')

        if OPTIMIZE:
            # objective
            self.driver.add_objective('spar.spar_mass')

            # design variables
            self.driver.add_parameter('neutral_axis',
                                      low=10.,
                                      high=41.9,
                                      scaler=0.01)
            #self.driver.add_parameter('number_of_rings[0]',low=1,high=5)
            self.driver.add_parameter('number_of_rings[1]', low=1, high=10)
            self.driver.add_parameter('number_of_rings[2]', low=1, high=10)
            self.driver.add_parameter('number_of_rings[3]', low=1, high=50)
            self.driver.add_parameter('wall_thickness[0]',
                                      low=1.,
                                      high=10.,
                                      scaler=0.01)
            self.driver.add_parameter('wall_thickness[1]',
                                      low=1.,
                                      high=10.,
                                      scaler=0.01)
            self.driver.add_parameter('wall_thickness[2]',
                                      low=1.,
                                      high=10.,
                                      scaler=0.01)
            self.driver.add_parameter('wall_thickness[3]',
                                      low=10.,
                                      high=100.,
                                      scaler=0.001)
            self.driver.add_parameter('scope_ratio',
                                      low=15.,
                                      high=45.,
                                      scaler=0.1)
            self.driver.add_parameter('pretension_percent', low=2.5, high=10.)
            self.driver.add_parameter('mooring_diameter',
                                      low=30.,
                                      high=100.,
                                      scaler=0.001)
            self.driver.add_parameter('fixed_ballast_height',
                                      low=30.,
                                      high=100.,
                                      scaler=0.1)
            self.driver.add_parameter('permanent_ballast_height',
                                      low=30.,
                                      high=100.,
                                      scaler=0.1)

            # Constraints

            self.driver.add_constraint('spar.water_ballast_height < 7.5')
            self.driver.add_constraint('spar.water_ballast_height > 5.5')
            self.driver.add_constraint('spar.flange_compactness < 1.')
            self.driver.add_constraint('spar.web_compactness < 1.')

            self.driver.add_constraint('spar.VAL[0] < 0.99')
            self.driver.add_constraint('spar.VAL[1] < 0.99')
            self.driver.add_constraint('spar.VAL[2] < 0.99')
            self.driver.add_constraint('spar.VAL[3] < 0.99')

            self.driver.add_constraint('spar.VAG[0] < 0.99')
            self.driver.add_constraint('spar.VAG[1] < 0.99')
            self.driver.add_constraint('spar.VAG[2] < 0.99')
            self.driver.add_constraint('spar.VAG[3] < 0.99')

            self.driver.add_constraint('spar.VEL[0] < 0.99')
            self.driver.add_constraint('spar.VEL[1] < 0.99')
            self.driver.add_constraint('spar.VEL[2] < 0.99')
            self.driver.add_constraint('spar.VEL[3] < 0.99')

            self.driver.add_constraint('spar.VEG[0] < 0.99')
            self.driver.add_constraint('spar.VEG[1] < 0.99')
            self.driver.add_constraint('spar.VEG[2] < 0.99')
            self.driver.add_constraint('spar.VEG[3] < 0.99')
            self.driver.add_constraint('spar.platform_stability_check < 1.')
            self.driver.add_constraint('spar.heel_angle <= 6.')
            self.driver.add_constraint('spar.min_offset_unity < 1.0')
            self.driver.add_constraint('spar.max_offset_unity < 1.0')
Exemplo n.º 3
0
    def configure(self):
        # select components
        self.add('tower_RNA', Tower_RNA())
        self.add('spar', Spar())
        self.add('mooring', Mooring())

        # workflow
        self.driver.workflow.add(['tower_RNA', 'mooring', 'spar'])
        # connect inputs
        self.connect('tower_base_outer_diameter',
                     'tower_RNA.base_outer_diameter')
        self.connect('tower_top_outer_diameter',
                     'tower_RNA.top_outer_diameter')
        self.connect('tower_length', 'tower_RNA.length')
        self.connect('air_density',
                     ['tower_RNA.air_density', 'spar.air_density'])
        self.connect(
            'wind_reference_speed',
            ['tower_RNA.wind_reference_speed', 'spar.wind_reference_speed'])
        self.connect(
            'wind_reference_height',
            ['tower_RNA.wind_reference_height', 'spar.wind_reference_height'])
        self.connect('gust_factor',
                     ['tower_RNA.gust_factor', 'spar.gust_factor'])
        self.connect('alpha', ['tower_RNA.alpha', 'spar.alpha'])
        self.connect('spar_elevations', [
            'tower_RNA.spar_elevations', 'mooring.spar_elevations',
            'spar.elevations'
        ])
        self.connect('example_turbine_size', 'tower_RNA.example_turbine_size')
        self.connect('rotor_diameter', 'tower_RNA.rotor_diameter')
        self.connect('RNA_center_of_gravity_x', [
            'tower_RNA.RNA_center_of_gravity_x', 'spar.RNA_center_of_gravity_x'
        ])
        self.connect('RNA_center_of_gravity_y',
                     'tower_RNA.RNA_center_of_gravity_y')
        self.connect('cut_out_speed', 'tower_RNA.cut_out_speed')
        self.connect('tower_mass', ['tower_RNA.tower_mass', 'spar.tower_mass'])
        self.connect('RNA_mass', ['tower_RNA.RNA_mass', 'spar.RNA_mass'])

        self.connect('fairlead_depth', 'mooring.fairlead_depth')
        self.connect('scope_ratio', 'mooring.scope_ratio')
        self.connect('pretension_percent', 'mooring.pretension_percent')
        self.connect('mooring_diameter', 'mooring.mooring_diameter')
        self.connect('number_of_mooring_lines',
                     'mooring.number_of_mooring_lines')
        self.connect('water_depth',
                     ['mooring.water_depth', 'spar.water_depth'])
        self.connect('mooring_type', 'mooring.mooring_type')
        self.connect('anchor_type', 'mooring.anchor_type')
        self.connect('fairlead_offset_from_shell',
                     'mooring.fairlead_offset_from_shell')
        self.connect('user_MBL', 'mooring.user_MBL')
        self.connect('user_WML', 'mooring.user_WML')
        self.connect('user_AE_storm', 'mooring.user_AE_storm')
        self.connect('user_MCPL', 'mooring.user_MCPL')
        self.connect('user_anchor_cost', 'mooring.user_anchor_cost')
        self.connect('misc_cost_factor', 'mooring.misc_cost_factor')
        self.connect('number_of_discretizations',
                     'mooring.number_of_discretizations')
        self.connect('spar_outer_diameter',
                     ['mooring.spar_outer_diameter', 'spar.outer_diameter'])
        self.connect('water_density',
                     ['mooring.water_density', 'spar.water_density'])

        self.connect('wall_thickness', 'spar.wall_thickness')
        self.connect('number_of_rings', 'spar.number_of_rings')
        self.connect('neutral_axis', 'spar.neutral_axis')
        #self.connect('stiffener_curve_fit','spar.stiffener_curve_fit')
        self.connect('stiffener_index', 'spar.stiffener_index')
        self.connect('number_of_sections', 'spar.number_of_sections')
        self.connect('bulk_head', 'spar.bulk_head')
        self.connect('straight_col_cost', 'spar.straight_col_cost')
        self.connect('tapered_col_cost', 'spar.tapered_col_cost')
        self.connect('outfitting_cost', 'spar.outfitting_cost')
        self.connect('ballast_cost', 'spar.ballast_cost')
        self.connect('gravity', 'spar.gravity')
        self.connect('load_condition', 'spar.load_condition')
        self.connect('significant_wave_height', 'spar.significant_wave_height')
        self.connect('significant_wave_period', 'spar.significant_wave_period')
        self.connect('material_density', 'spar.material_density')
        self.connect('E', 'spar.E')
        self.connect('nu', 'spar.nu')
        self.connect('yield_stress', 'spar.yield_stress')
        self.connect('shell_mass_factor', 'spar.shell_mass_factor')
        self.connect('bulkhead_mass_factor', 'spar.bulkhead_mass_factor')
        self.connect('ring_mass_factor', 'spar.ring_mass_factor')
        self.connect('outfitting_factor', 'spar.outfitting_factor')
        self.connect('spar_mass_factor', 'spar.spar_mass_factor')
        self.connect('permanent_ballast_height',
                     'spar.permanent_ballast_height')
        self.connect('fixed_ballast_height', 'spar.fixed_ballast_height')
        self.connect('permanent_ballast_density',
                     'spar.permanent_ballast_density')
        self.connect('fixed_ballast_density', 'spar.fixed_ballast_density')
        self.connect('offset_amplification_factor',
                     'spar.offset_amplification_factor')

        # connect outputs to inputs
        self.connect('tower_RNA.RNA_keel_to_CG', 'spar.RNA_keel_to_CG')
        self.connect('tower_RNA.tower_center_of_gravity',
                     'spar.tower_center_of_gravity')
        self.connect('tower_RNA.tower_wind_force', 'spar.tower_wind_force')
        self.connect('tower_RNA.RNA_wind_force', 'spar.RNA_wind_force')
        self.connect('mooring.mooring_total_cost', 'spar.mooring_total_cost')
        self.connect('mooring.mooring_keel_to_CG', 'spar.mooring_keel_to_CG')
        self.connect('mooring.mooring_vertical_load',
                     'spar.mooring_vertical_load')
        self.connect('mooring.mooring_horizontal_stiffness',
                     'spar.mooring_horizontal_stiffness')
        self.connect('mooring.mooring_vertical_stiffness',
                     'spar.mooring_vertical_stiffness')
        self.connect('mooring.sum_forces_x', 'spar.sum_forces_x')
        self.connect('mooring.offset_x', 'spar.offset_x')
        self.connect('mooring.damaged_mooring', 'spar.damaged_mooring')
        self.connect('mooring.intact_mooring', 'spar.intact_mooring')
        self.connect('mooring.mooring_mass', 'spar.mooring_mass')
Exemplo n.º 4
0
    def configure(self):
        self.add('driver', COBYLAdriver())
        self.driver.maxfun = 100000
        self.add('spar', Spar())
        self.driver.workflow.add('spar')

        # objective
        self.driver.add_objective('spar.total_cost')

        # design variables
        self.driver.add_parameter('spar.neutral_axis',
                                  low=100.,
                                  high=419.,
                                  scaler=0.001)
        #self.driver.add_parameter('spar.number_of_rings[0]',low=10,high=50,scaler=0.1)
        self.driver.add_parameter('spar.number_of_rings[1]',
                                  low=10,
                                  high=100,
                                  scaler=0.1)
        self.driver.add_parameter('spar.number_of_rings[2]',
                                  low=10,
                                  high=100,
                                  scaler=0.1)
        self.driver.add_parameter('spar.number_of_rings[3]', low=1, high=80)
        self.driver.add_parameter('spar.wall_thickness[0]',
                                  low=100.,
                                  high=1000.,
                                  scaler=0.0001)
        self.driver.add_parameter('spar.wall_thickness[1]',
                                  low=100.,
                                  high=1000.,
                                  scaler=0.0001)
        self.driver.add_parameter('spar.wall_thickness[2]',
                                  low=100.,
                                  high=1000.,
                                  scaler=0.0001)
        self.driver.add_parameter('spar.wall_thickness[3]',
                                  low=100.,
                                  high=1000.,
                                  scaler=0.0001)
        # Constraints
        self.driver.add_constraint('spar.flange_compactness <= 1.')
        self.driver.add_constraint('spar.web_compactness <= 1.')
        self.driver.add_constraint('spar.platform_stability_check <= 1.')
        #self.driver.add_constraint('spar.heel_angle <= 6.')
        self.driver.add_constraint('spar.min_offset_unity <= 1.')
        self.driver.add_constraint('spar.max_offset_unity <= 1.')
        self.driver.add_constraint('spar.VAL[0] <= 1.')
        self.driver.add_constraint('spar.VAL[1] <= 1.')
        self.driver.add_constraint('spar.VAL[2] <= 1.')
        self.driver.add_constraint('spar.VAL[3] <= 1.')

        self.driver.add_constraint('spar.VAG[0] <= 1.')
        self.driver.add_constraint('spar.VAG[1] <= 1.')
        self.driver.add_constraint('spar.VAG[2] <= 1.')
        self.driver.add_constraint('spar.VAG[3] <= 1.')

        self.driver.add_constraint('spar.VEL[0] <= 1.')
        self.driver.add_constraint('spar.VEL[1] <= 1.')
        self.driver.add_constraint('spar.VEL[2] <= 1.')
        self.driver.add_constraint('spar.VEL[3] <= 1.')

        self.driver.add_constraint('spar.VEG[0] <= 1.')
        self.driver.add_constraint('spar.VEG[1] <= 1.')
        self.driver.add_constraint('spar.VEG[2] <= 1.')
        self.driver.add_constraint('spar.VEG[3] <= 1.')
Exemplo n.º 5
0
def example_218WD_3MW():
    example = optimizationSpar()
    tt = time.time()
    example.spar.number_of_sections = 4
    example.spar.outer_diameter = [5., 6., 6., 9.]
    example.spar.length = [6., 12., 15., 47.]
    example.spar.end_elevation = [7., -5., -20., -67.]
    example.spar.start_elevation = [13., 7., -5., -20.]
    example.spar.bulk_head = ['N', 'T', 'N', 'B']
    example.spar.water_depth = 218.
    example.spar.load_condition = 'N'
    example.spar.significant_wave_height = 10.820
    example.spar.significant_wave_period = 9.800
    example.spar.wind_reference_speed = 11.
    example.spar.wind_reference_height = 75.
    example.spar.alpha = 0.110
    example.spar.RNA_keel_to_CG = 142.
    example.spar.RNA_mass = 125000.
    example.spar.tower_mass = 127877.
    example.spar.tower_center_of_gravity = 23.948
    example.spar.tower_wind_force = 19950.529
    example.spar.RNA_wind_force = 391966.178
    example.spar.RNA_center_of_gravity_x = 4.1
    example.spar.mooring_total_cost = 810424.053596
    example.spar.mooring_keel_to_CG = 54.000
    example.spar.mooring_vertical_load = 1182948.791
    example.spar.mooring_horizontal_stiffness = 3145.200
    example.spar.mooring_vertical_stiffness = 7111.072
    example.spar.sum_forces_x = [
        7886.848, 437.844, 253.782, 174.651, 124.198, 85.424, 50.689, 17.999,
        -13.222, -43.894, -74.245, -105.117, -136.959, -170.729, -207.969,
        -251.793, -307.638, -386.514, -518.734, -859.583, -11091.252
    ]
    example.spar.offset_x = [
        -40.362, -35.033, -29.703, -24.373, -19.044, -13.714, -8.385, -3.055,
        2.274, 7.604, 12.933, 18.263, 23.593, 28.922, 34.252, 39.581, 44.911,
        50.240, 55.570, 60.900, 66.229
    ]
    example.spar.damaged_mooring = [-40.079, 65.824]
    example.spar.intact_mooring = [-39.782, 65.399]
    example.spar.run()
    example.run()
    yna = convert_units(example.spar.neutral_axis, 'm', 'inch')
    fullStiffeners = full_stiffeners_table()
    for i in range(0, len(fullStiffeners) - 1):
        stiffener_bef = fullStiffeners[i]
        stiffener_aft = fullStiffeners[i + 1]
        if yna > stiffener_bef[6] and yna < stiffener_aft[6]:
            opt_index = i + 1

    second_fit = Spar()
    second_fit.wall_thickness = example.spar.wall_thickness
    second_fit.number_of_rings = example.spar.number_of_rings
    second_fit.stiffener_curve_fit = False
    second_fit.stiffener_index = opt_index
    second_fit.number_of_sections = example.spar.number_of_sections
    second_fit.outer_diameter = example.spar.outer_diameter
    second_fit.length = example.spar.length
    second_fit.end_elevation = example.spar.end_elevation
    second_fit.start_elevation = example.spar.start_elevation
    second_fit.bulk_head = example.spar.bulk_head
    second_fit.water_depth = example.spar.water_depth
    second_fit.load_condition = example.spar.load_condition
    second_fit.significant_wave_height = example.spar.significant_wave_height
    second_fit.significant_wave_period = example.spar.significant_wave_period
    second_fit.wind_reference_speed = example.spar.wind_reference_speed
    second_fit.wind_reference_height = example.spar.wind_reference_height
    second_fit.alpha = example.spar.alpha
    second_fit.RNA_keel_to_CG = example.spar.RNA_keel_to_CG
    second_fit.RNA_mass = example.spar.RNA_mass
    second_fit.tower_mass = example.spar.tower_mass
    second_fit.tower_center_of_gravity = example.spar.tower_center_of_gravity
    second_fit.tower_wind_force = example.spar.tower_wind_force
    second_fit.RNA_wind_force = example.spar.RNA_wind_force
    second_fit.RNA_center_of_gravity_x = example.spar.RNA_center_of_gravity_x
    second_fit.mooring_total_cost = example.spar.mooring_total_cost
    second_fit.mooring_keel_to_CG = example.spar.mooring_keel_to_CG
    second_fit.mooring_vertical_load = example.spar.mooring_vertical_load
    second_fit.mooring_horizontal_stiffness = example.spar.mooring_horizontal_stiffness
    second_fit.mooring_vertical_stiffness = example.spar.mooring_vertical_stiffness
    second_fit.sum_forces_x = example.spar.sum_forces_x
    second_fit.offset_x = example.spar.offset_x
    second_fit.damaged_mooring = example.spar.damaged_mooring
    second_fit.intact_mooring = example.spar.intact_mooring
    second_fit.run()

    cost = second_fit.total_cost
    index = opt_index
    best_index = opt_index
    unity = max(second_fit.web_compactness, second_fit.flange_compactness,
                max(second_fit.VAL), max(second_fit.VAG), max(second_fit.VEL),
                max(second_fit.VEG))
    for i in range(opt_index, 326):
        index += 1
        second_fit.stiffener_index = index
        second_fit.run()
        unity = max(second_fit.web_compactness, second_fit.flange_compactness,
                    max(second_fit.VAL), max(second_fit.VAG),
                    max(second_fit.VEL), max(second_fit.VEG))
        if unity < 1.0:
            if second_fit.total_cost < cost:
                cost = second_fit.total_cost
                best_index = i
                second_fit.stiffener_index = best_index
                second_fit.run()
    print '--------------example_218WD_3MW------------------'
    print "Elapsed time: ", time.time() - tt, " seconds"
    sys_print(second_fit)
Exemplo n.º 6
0
def example_218WD_10MW():
    example = optimizationSpar()
    tt = time.time()
    example.water_depth = 218.
    example.load_condition = 'N'
    example.significant_wave_height = 10.820
    example.significant_wave_period = 9.800
    example.keel_cg_mooring = 45.
    example.keel_cg_operating_system = 30.730
    example.reference_wind_speed = 11.
    example.reference_height = 119.
    example.alpha = 0.110
    example.material_density = 7850.
    example.E = 200.e9
    example.nu = 0.3
    example.yield_stress = 345000000.
    example.rotor_mass = 677000.000
    example.tower_mass = 698235.000
    example.free_board = 13.
    example.draft = 92.
    example.fixed_ballast_mass = 6276669.794
    example.hull_mass = 2816863.293
    example.permanent_ballast_mass = 3133090.391
    example.variable_ballast_mass = 1420179.260
    example.number_of_sections = 4
    example.outer_diameter = [8.,9.,9.,15.]
    example.length = [6., 12., 15., 72.]
    example.end_elevation = [7., -5., -20., -92.]
    example.start_elevation = [13., 7., -5., -20.]
    example.bulk_head = ['N', 'T', 'N', 'B']
    #example.system_acceleration = 0.856545480516845
    example.gust_factor = 1.0
    example.tower_base_OD = 7.720
    example.tower_top_OD = 4.050
    example.tower_length = 102.63
    example.cut_out_speed = 25.
    example.turbine_size = '10MW'
    example.rotor_diameter = 194.0
    example.run()
    yna = convert_units(example.spar.neutral_axis ,'m','inch')
    filteredStiffeners = filtered_stiffeners_table()
    for i in range (0,len(filteredStiffeners)-1):
        stiffener_bef = filteredStiffeners[i]
        stiffener_aft = filteredStiffeners[i+1]
        if yna > stiffener_bef[6] and yna<stiffener_aft[6]:
            opt_index = i+1
    second_fit = Spar()
    second_fit.wall_thickness = example.spar.wall_thickness
    second_fit.number_of_rings = example.spar.number_of_rings
    second_fit.stiffener_index = opt_index
    second_fit.initial_pass = False

    second_fit.water_depth =  example.water_depth
    second_fit.load_condition = example.load_condition
    second_fit.significant_wave_height =  example.significant_wave_height
    second_fit.significant_wave_period = example.significant_wave_period
    second_fit.keel_cg_mooring = example.keel_cg_mooring
    second_fit.keel_cg_operating_system = example.keel_cg_operating_system
    second_fit.reference_wind_speed = example.reference_wind_speed
    second_fit.reference_height = example.reference_height
    second_fit.alpha = example.alpha
    second_fit.material_density = example.material_density
    second_fit.E = example.E
    second_fit.nu =example.nu
    second_fit.yield_stress = example.yield_stress
    second_fit.rotor_mass = example.rotor_mass
    second_fit.tower_mass = example.tower_mass
    second_fit.free_board = example.free_board
    second_fit.draft = example.draft
    second_fit.fixed_ballast_mass = example.fixed_ballast_mass
    second_fit.hull_mass = example.hull_mass
    second_fit.permanent_ballast_mass = example.permanent_ballast_mass
    second_fit.variable_ballast_mass = example.variable_ballast_mass
    second_fit.number_of_sections = example.number_of_sections
    second_fit.outer_diameter = example.outer_diameter
    second_fit.length = example.length
    second_fit.end_elevation = example.end_elevation
    second_fit.start_elevation = example.start_elevation
    second_fit.bulk_head = example.bulk_head
    #second_fit.system_acceleration=example.system_acceleration
    second_fit.gust_factor = example.gust_factor
    second_fit.tower_base_OD = example.tower_base_OD
    second_fit.tower_top_OD = example.tower_top_OD 
    second_fit.tower_length = example.tower_length 
    second_fit.cut_out_speed = example.cut_out_speed
    second_fit.turbine_size = example.turbine_size
    second_fit.rotor_diameter = example.rotor_diameter
    second_fit.run()
    index = opt_index
    unity = max(max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG))   
    while ((unity-1.0) > 1e-7):
        if index <124:
            index += 1
            second_fit.stiffener_index = index
            second_fit.run()
            unity = max(max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG)) 
            #print unity-1.0
        else:
            second_fit.stiffener_index = opt_index
            for i in range(0,second_fit.number_of_sections):
                if second_fit.VAL[i] >1. or second_fit.VAG[i]>1. or second_fit.VEL[i]>1. or second_fit.VEG[i]>1.:    
                    second_fit.number_of_rings[i] += 1 
                    second_fit.run()
                    unity = max(max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG)) 
                    #print second_fit.number_of_rings
    print '--------------example_218WD_10MW------------------'
    print "Elapsed time: ", time.time()-tt, " seconds"
    sys_print(second_fit)
Exemplo n.º 7
0
def example_218WD_6MW():
    example = optimizationSpar()
    tt = time.time()
    example.water_depth = 218.
    example.load_condition = 'N'
    example.significant_wave_height = 10.820
    example.significant_wave_period = 9.800
    example.keel_cg_mooring = 37.177
    example.keel_cg_operating_system = 24.059
    example.reference_wind_speed = 11.
    example.reference_height = 97.
    example.alpha = 0.110
    example.material_density = 7850.
    example.E = 200.e9
    example.nu = 0.3
    example.yield_stress = 345000000.
    example.rotor_mass = 365500.000
    example.tower_mass = 366952.000
    example.free_board = 13.
    example.draft = 72.
    example.fixed_ballast_mass = 3659547.034
    example.hull_mass = 1593822.041
    example.permanent_ballast_mass = 1761475.914
    example.variable_ballast_mass = 820790.246
    example.number_of_sections = 4
    example.outer_diameter = [7., 8., 8., 13.]
    example.length = [6., 12., 15., 52.]
    example.end_elevation = [7., -5., -20., -72.]
    example.start_elevation = [13., 7., -5., -20.]
    example.bulk_head = ['N', 'T', 'N', 'B']
    #example.system_acceleration = 1.12124749328663
    example.gust_factor = 1.0
    example.tower_base_OD = 6.0
    example.tower_top_OD = 3.51
    example.tower_length = 80.5
    example.cut_out_speed = 25.
    example.turbine_size = '6MW'
    example.rotor_diameter = 154.0

    example.run()
    yna = convert_units(example.spar.neutral_axis ,'m','inch')
    filteredStiffeners = filtered_stiffeners_table()
    for i in range (0,len(filteredStiffeners)-1):
        stiffener_bef = filteredStiffeners[i]
        stiffener_aft = filteredStiffeners[i+1]
        if yna > stiffener_bef[6] and yna<stiffener_aft[6]:
            opt_index = i+1
    second_fit = Spar()
    second_fit.wall_thickness = example.spar.wall_thickness
    second_fit.number_of_rings = example.spar.number_of_rings
    second_fit.stiffener_index = opt_index
    second_fit.initial_pass = False

    second_fit.water_depth =  example.water_depth
    second_fit.load_condition = example.load_condition
    second_fit.significant_wave_height =  example.significant_wave_height
    second_fit.significant_wave_period = example.significant_wave_period
    second_fit.keel_cg_mooring = example.keel_cg_mooring
    second_fit.keel_cg_operating_system = example.keel_cg_operating_system
    second_fit.reference_wind_speed = example.reference_wind_speed
    second_fit.reference_height = example.reference_height
    second_fit.alpha = example.alpha
    second_fit.material_density = example.material_density
    second_fit.E = example.E
    second_fit.nu =example.nu
    second_fit.yield_stress = example.yield_stress
    second_fit.rotor_mass = example.rotor_mass
    second_fit.tower_mass = example.tower_mass
    second_fit.free_board = example.free_board
    second_fit.draft = example.draft
    second_fit.fixed_ballast_mass = example.fixed_ballast_mass
    second_fit.hull_mass = example.hull_mass
    second_fit.permanent_ballast_mass = example.permanent_ballast_mass
    second_fit.variable_ballast_mass = example.variable_ballast_mass
    second_fit.number_of_sections = example.number_of_sections
    second_fit.outer_diameter = example.outer_diameter
    second_fit.length = example.length
    second_fit.end_elevation = example.end_elevation
    second_fit.start_elevation = example.start_elevation
    second_fit.bulk_head = example.bulk_head
    second_fit.gust_factor = example.gust_factor
    second_fit.tower_base_OD = example.tower_base_OD
    second_fit.tower_top_OD = example.tower_top_OD 
    second_fit.tower_length = example.tower_length 
    second_fit.cut_out_speed = example.cut_out_speed
    second_fit.turbine_size = example.turbine_size
    second_fit.rotor_diameter = example.rotor_diameter
    #second_fit.system_acceleration=example.system_acceleration
    second_fit.run()
    index = opt_index
    unity = max(max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG))   
    while ((unity-1.0) > 1e-7):
        if index <124:
            index += 1
            second_fit.stiffener_index = index
            second_fit.run()
            unity = max(max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG)) 
        else:
            second_fit.stiffener_index = opt_index
            for i in range(0,second_fit.number_of_sections):
                if second_fit.VAL[i] >1. or second_fit.VAG[i]>1. or second_fit.VEL[i]>1. or second_fit.VEG[i]>1.:    
                    second_fit.number_of_rings[i] += 1 
                    second_fit.run()
                    unity = max(max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG)) 
    print '--------------example_218WD_6MW------------------'
    print "Elapsed time: ", time.time()-tt, " seconds"
    sys_print(second_fit)
Exemplo n.º 8
0
def example_130WD_3MW():
    example = optimizationSpar()
    example.water_depth = 130.
    example.load_condition = 'N'
    example.significant_wave_height = 10.660
    example.significant_wave_period = 13.210
    example.keel_cg_mooring = 51.
    example.keel_cg_operating_system = 20.312
    example.reference_wind_speed = 11.
    example.reference_height = 75.
    example.alpha = 0.110
    example.material_density = 7850.
    example.E = 200.e9
    example.nu = 0.3
    example.yield_stress = 345000000.
    example.rotor_mass = 125000.
    example.tower_mass = 83705.
    example.free_board = 13.
    example.draft = 64.
    example.fixed_ballast_mass = 1244227.77
    example.hull_mass = 890985.086
    example.permanent_ballast_mass = 838450.256
    example.variable_ballast_mass = 418535.462
    example.number_of_sections = 4
    example.outer_diameter = [5., 6., 6., 9.]
    example.length = [6., 12., 15., 44.]
    example.end_elevation = [7., -5., -20., -64.]
    example.start_elevation = [13., 7., -5., -20.]
    example.bulk_head = ['N', 'T', 'N', 'B']
    #example.system_acceleration=1.2931
    example.run()

    yna = convert_units(example.spar.neutral_axis ,'m','inch')
    filteredStiffeners = filtered_stiffeners_table()
    for i in range (0,len(filteredStiffeners)-1):
        stiffener_bef = filteredStiffeners[i]
        stiffener_aft = filteredStiffeners[i+1]
        if yna > stiffener_bef[6] and yna<stiffener_aft[6]:
            opt_index = i+1
    second_fit = Spar()
    second_fit.wall_thickness = example.spar.wall_thickness
    second_fit.number_of_rings = example.spar.number_of_rings
    second_fit.stiffener_index = opt_index
    second_fit.initial_pass = False

    second_fit.water_depth =  example.water_depth
    second_fit.load_condition = example.load_condition
    second_fit.significant_wave_height =  example.significant_wave_height
    second_fit.significant_wave_period = example.significant_wave_period
    second_fit.keel_cg_mooring = example.keel_cg_mooring
    second_fit.keel_cg_operating_system = example.keel_cg_operating_system
    second_fit.reference_wind_speed = example.reference_wind_speed
    second_fit.reference_height = example.reference_height
    second_fit.alpha = example.alpha
    second_fit.material_density = example.material_density
    second_fit.E = example.E
    second_fit.nu =example.nu
    second_fit.yield_stress = example.yield_stress
    second_fit.rotor_mass = example.rotor_mass
    second_fit.tower_mass = example.tower_mass
    second_fit.free_board = example.free_board
    second_fit.draft = example.draft
    second_fit.fixed_ballast_mass = example.fixed_ballast_mass
    second_fit.hull_mass = example.hull_mass
    second_fit.permanent_ballast_mass = example.permanent_ballast_mass
    second_fit.variable_ballast_mass = example.variable_ballast_mass
    second_fit.number_of_sections = example.number_of_sections
    second_fit.outer_diameter = example.outer_diameter
    second_fit.length = example.length
    second_fit.end_elevation = example.end_elevation
    second_fit.start_elevation = example.start_elevation
    second_fit.bulk_head = example.bulk_head
    second_fit.system_acceleration=example.system_acceleration
    second_fit.run()
    index = opt_index
    unity = max(max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG))   
    while ((unity-1.0) > 1e-7):
        if index <124:
            index += 1
            second_fit.stiffener_index = index
            second_fit.run()
            unity = max(max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG)) 
        else:
            second_fit.stiffener_index = opt_index
            for i in range(0,second_fit.number_of_sections):
                if second_fit.VAL[i] >1. or second_fit.VAG[i]>1. or second_fit.VEL[i]>1. or second_fit.VEG[i]>1.:    
                    second_fit.number_of_rings[i] += 1 
                    second_fit.run()
                    unity = max(max(second_fit.VAL),max(second_fit.VAG),max(second_fit.VEL),max(second_fit.VEG)) 
    print '--------------example_130WD_3MW------------------'
    print "Elapsed time: ", time.time()-tt, " seconds"
    sys_print(second_fit)
Exemplo n.º 9
0
    def configure(self):
        """Select component instances."""
        self.add('tower_RNA', Tower_RNA())
        self.add('spar', Spar())
        self.add('mooring', Mooring())
        """Define iteration hierarchy."""
        self.driver.workflow.add(['tower_RNA', 'mooring', 'spar'])
        """Create a variable in the assembly and connects it to an internal
        component variable. If the variable is used again in a different 
        component instance, then it is manually connected."""
        self.create_passthrough('tower_RNA.base_outer_diameter',
                                'tower_base_outer_diameter')
        self.create_passthrough('tower_RNA.top_outer_diameter',
                                'tower_top_outer_diameter')
        self.create_passthrough('tower_RNA.length', 'tower_length')
        self.create_passthrough('tower_RNA.example_turbine_size',
                                'example_turbine_size')
        self.create_passthrough('tower_RNA.RNA_center_of_gravity_y',
                                'RNA_center_of_gravity_y')
        self.create_passthrough('spar.wall_thickness', 'wall_thickness')
        self.create_passthrough('tower_RNA.rotor_diameter', 'rotor_diameter')
        self.create_passthrough('tower_RNA.cut_out_speed', 'cut_out_speed')
        self.create_passthrough('tower_RNA.air_density', 'air_density')
        self.connect('air_density', 'spar.air_density')
        self.create_passthrough('spar.wind_reference_speed',
                                'wind_reference_speed')
        self.connect('wind_reference_speed', 'tower_RNA.wind_reference_speed')
        self.create_passthrough('spar.wind_reference_height',
                                'wind_reference_height')
        self.connect('wind_reference_height',
                     'tower_RNA.wind_reference_height')
        self.create_passthrough('spar.gust_factor', 'gust_factor')
        self.connect('gust_factor', 'tower_RNA.gust_factor')
        self.create_passthrough('spar.alpha', 'alpha')
        self.connect('alpha', 'tower_RNA.alpha')
        self.create_passthrough('spar.RNA_center_of_gravity_x',
                                'RNA_center_of_gravity_x')
        self.connect('RNA_center_of_gravity_x',
                     'tower_RNA.RNA_center_of_gravity_x')
        self.create_passthrough('spar.tower_mass', 'tower_mass')
        self.connect('tower_mass', 'tower_RNA.tower_mass')
        self.create_passthrough('spar.RNA_mass', 'RNA_mass')
        self.connect('RNA_mass', 'tower_RNA.RNA_mass')
        self.create_passthrough('spar.stiffener_index', 'stiffener_index')
        self.create_passthrough('spar.number_of_sections',
                                'number_of_sections')
        self.create_passthrough('spar.bulk_head', 'bulk_head')
        self.create_passthrough('spar.number_of_rings', 'number_of_rings')
        self.create_passthrough('spar.neutral_axis', 'neutral_axis')
        self.create_passthrough('spar.straight_col_cost', 'straight_col_cost')
        self.create_passthrough('spar.tapered_col_cost', 'tapered_col_cost')
        self.create_passthrough('spar.outfitting_cost', 'outfitting_cost')
        self.create_passthrough('spar.ballast_cost', 'ballast_cost')
        self.create_passthrough('spar.gravity', 'gravity')
        self.create_passthrough('spar.load_condition', 'load_condition')
        self.create_passthrough('spar.significant_wave_height',
                                'significant_wave_height')
        self.create_passthrough('spar.significant_wave_period',
                                'significant_wave_period')
        self.create_passthrough('spar.material_density', 'material_density')
        self.create_passthrough('spar.E', 'E')
        self.create_passthrough('spar.nu', 'nu')
        self.create_passthrough('spar.yield_stress', 'yield_stress')
        self.create_passthrough('spar.shell_mass_factor', 'shell_mass_factor')
        self.create_passthrough('spar.bulkhead_mass_factor',
                                'bulkhead_mass_factor')
        self.create_passthrough('spar.ring_mass_factor', 'ring_mass_factor')
        self.create_passthrough('spar.outfitting_factor', 'outfitting_factor')
        self.create_passthrough('spar.spar_mass_factor', 'spar_mass_factor')
        self.create_passthrough('spar.permanent_ballast_height',
                                'permanent_ballast_height')
        self.create_passthrough('spar.fixed_ballast_height',
                                'fixed_ballast_height')
        self.create_passthrough('spar.permanent_ballast_density',
                                'permanent_ballast_density')
        self.create_passthrough('spar.fixed_ballast_density',
                                'fixed_ballast_density')
        self.create_passthrough('spar.offset_amplification_factor',
                                'offset_amplification_factor')
        self.create_passthrough('spar.water_density', 'water_density')
        self.create_passthrough('spar.elevations', 'spar_elevations')
        self.create_passthrough('spar.outer_diameter', 'spar_outer_diameter')
        self.create_passthrough('spar.water_depth', 'water_depth')
        # self.create_passthrough('spar.stiffener_curve_fit', 'stiffener_curve_fit')

        #mooring connections
        self.create_passthrough('mooring.fairlead_depth', 'fairlead_depth')
        self.connect('spar_elevations',
                     ['tower_RNA.spar_elevations', 'mooring.spar_elevations'])
        self.connect('spar_outer_diameter', 'mooring.spar_outer_diameter')
        self.create_passthrough('mooring.scope_ratio', 'scope_ratio')
        self.create_passthrough('mooring.pretension_percent',
                                'pretension_percent')
        self.create_passthrough('mooring.mooring_diameter', 'mooring_diameter')
        self.create_passthrough('mooring.number_of_mooring_lines',
                                'number_of_mooring_lines')
        self.connect('water_depth', 'mooring.water_depth')
        self.create_passthrough('mooring.mooring_type', 'mooring_type')
        self.create_passthrough('mooring.anchor_type', 'anchor_type')
        self.create_passthrough('mooring.fairlead_offset_from_shell',
                                'fairlead_offset_from_shell')
        self.create_passthrough('mooring.user_MBL', 'user_MBL')
        self.create_passthrough('mooring.user_WML', 'user_WML')
        self.create_passthrough('mooring.user_AE_storm', 'user_AE_storm')
        self.create_passthrough('mooring.user_MCPL', 'user_MCPL')
        self.create_passthrough('mooring.user_anchor_cost', 'user_anchor_cost')
        self.create_passthrough('mooring.misc_cost_factor', 'misc_cost_factor')
        self.create_passthrough('mooring.number_of_discretizations',
                                'number_of_discretizations')
        self.connect('water_density', 'mooring.water_density')
        """Connect outputs to inputs."""
        self.connect('tower_RNA.RNA_keel_to_CG', 'spar.RNA_keel_to_CG')
        self.connect('tower_RNA.tower_center_of_gravity',
                     'spar.tower_center_of_gravity')
        self.connect('tower_RNA.tower_wind_force', 'spar.tower_wind_force')
        self.connect('tower_RNA.RNA_wind_force', 'spar.RNA_wind_force')

        #mooring connections
        self.connect('mooring.mooring_total_cost', 'spar.mooring_total_cost')
        self.connect('mooring.mooring_keel_to_CG', 'spar.mooring_keel_to_CG')
        self.connect('mooring.mooring_vertical_load',
                     'spar.mooring_vertical_load')
        self.connect('mooring.mooring_horizontal_stiffness',
                     'spar.mooring_horizontal_stiffness')
        self.connect('mooring.mooring_vertical_stiffness',
                     'spar.mooring_vertical_stiffness')
        self.connect('mooring.sum_forces_x', 'spar.sum_forces_x')
        self.connect('mooring.offset_x', 'spar.offset_x')
        self.connect('mooring.damaged_mooring', 'spar.damaged_mooring')
        self.connect('mooring.intact_mooring', 'spar.intact_mooring')
        self.connect('mooring.mooring_mass', 'spar.mooring_mass')
Exemplo n.º 10
0
    def configure(self):
        """Creates a new Assembly containing a chain of Tower_RNA, Spar and
        Mooring components, as well as a constained optimizer."""
        """Create optimizer instance."""
        self.add('driver', COBYLAdriver())
        self.driver.maxfun = 100000
        """Select component instances."""
        self.add('tower_RNA', Tower_RNA())
        self.add('spar', Spar())
        self.add('mooring', Mooring())
        """Define iteration hierarchy."""
        self.driver.workflow.add(['tower_RNA', 'mooring', 'spar'])
        """Create a variable in the assembly and connects it to an internal
        component variable. If the variable is used again in a different 
        component instance, then it is manually connected."""
        self.create_passthrough('tower_RNA.base_outer_diameter',
                                'tower_base_outer_diameter')
        self.create_passthrough('tower_RNA.top_outer_diameter',
                                'tower_top_outer_diameter')
        self.create_passthrough('tower_RNA.length', 'tower_length')
        self.create_passthrough('tower_RNA.example_turbine_size',
                                'example_turbine_size')
        self.create_passthrough('tower_RNA.RNA_center_of_gravity_y',
                                'RNA_center_of_gravity_y')
        self.create_passthrough('spar.wall_thickness', 'wall_thickness')
        self.create_passthrough('tower_RNA.rotor_diameter', 'rotor_diameter')
        self.create_passthrough('tower_RNA.cut_out_speed', 'cut_out_speed')
        self.create_passthrough('tower_RNA.air_density', 'air_density')
        self.connect('air_density', 'spar.air_density')
        self.create_passthrough('spar.wind_reference_speed',
                                'wind_reference_speed')
        self.connect('wind_reference_speed', 'tower_RNA.wind_reference_speed')
        self.create_passthrough('spar.wind_reference_height',
                                'wind_reference_height')
        self.connect('wind_reference_height',
                     'tower_RNA.wind_reference_height')
        self.create_passthrough('spar.gust_factor', 'gust_factor')
        self.connect('gust_factor', 'tower_RNA.gust_factor')
        self.create_passthrough('spar.alpha', 'alpha')
        self.connect('alpha', 'tower_RNA.alpha')
        self.create_passthrough('spar.RNA_center_of_gravity_x',
                                'RNA_center_of_gravity_x')
        self.connect('RNA_center_of_gravity_x',
                     'tower_RNA.RNA_center_of_gravity_x')
        self.create_passthrough('spar.tower_mass', 'tower_mass')
        self.connect('tower_mass', 'tower_RNA.tower_mass')
        self.create_passthrough('spar.RNA_mass', 'RNA_mass')
        self.connect('RNA_mass', 'tower_RNA.RNA_mass')
        self.create_passthrough('spar.stiffener_index', 'stiffener_index')
        self.create_passthrough('spar.number_of_sections',
                                'number_of_sections')
        self.create_passthrough('spar.bulk_head', 'bulk_head')
        self.create_passthrough('spar.number_of_rings', 'number_of_rings')
        self.create_passthrough('spar.neutral_axis', 'neutral_axis')
        self.create_passthrough('spar.straight_col_cost', 'straight_col_cost')
        self.create_passthrough('spar.tapered_col_cost', 'tapered_col_cost')
        self.create_passthrough('spar.outfitting_cost', 'outfitting_cost')
        self.create_passthrough('spar.ballast_cost', 'ballast_cost')
        self.create_passthrough('spar.gravity', 'gravity')
        self.create_passthrough('spar.load_condition', 'load_condition')
        self.create_passthrough('spar.significant_wave_height',
                                'significant_wave_height')
        self.create_passthrough('spar.significant_wave_period',
                                'significant_wave_period')
        self.create_passthrough('spar.material_density', 'material_density')
        self.create_passthrough('spar.E', 'E')
        self.create_passthrough('spar.nu', 'nu')
        self.create_passthrough('spar.yield_stress', 'yield_stress')
        self.create_passthrough('spar.shell_mass_factor', 'shell_mass_factor')
        self.create_passthrough('spar.bulkhead_mass_factor',
                                'bulkhead_mass_factor')
        self.create_passthrough('spar.ring_mass_factor', 'ring_mass_factor')
        self.create_passthrough('spar.outfitting_factor', 'outfitting_factor')
        self.create_passthrough('spar.spar_mass_factor', 'spar_mass_factor')
        self.create_passthrough('spar.permanent_ballast_height',
                                'permanent_ballast_height')
        self.create_passthrough('spar.fixed_ballast_height',
                                'fixed_ballast_height')
        self.create_passthrough('spar.permanent_ballast_density',
                                'permanent_ballast_density')
        self.create_passthrough('spar.fixed_ballast_density',
                                'fixed_ballast_density')
        self.create_passthrough('spar.offset_amplification_factor',
                                'offset_amplification_factor')
        self.create_passthrough('spar.water_density', 'water_density')
        self.create_passthrough('spar.elevations', 'spar_elevations')
        self.create_passthrough('spar.outer_diameter', 'spar_outer_diameter')
        self.create_passthrough('spar.water_depth', 'water_depth')
        # self.create_passthrough('spar.stiffener_curve_fit', 'stiffener_curve_fit')

        #mooring connections
        self.create_passthrough('mooring.fairlead_depth', 'fairlead_depth')
        self.connect('spar_elevations',
                     ['tower_RNA.spar_elevations', 'mooring.spar_elevations'])
        self.connect('spar_outer_diameter', 'mooring.spar_outer_diameter')
        self.create_passthrough('mooring.scope_ratio', 'scope_ratio')
        self.create_passthrough('mooring.pretension_percent',
                                'pretension_percent')
        self.create_passthrough('mooring.mooring_diameter', 'mooring_diameter')
        self.create_passthrough('mooring.number_of_mooring_lines',
                                'number_of_mooring_lines')
        self.connect('water_depth', 'mooring.water_depth')
        self.create_passthrough('mooring.mooring_type', 'mooring_type')
        self.create_passthrough('mooring.anchor_type', 'anchor_type')
        self.create_passthrough('mooring.fairlead_offset_from_shell',
                                'fairlead_offset_from_shell')
        self.create_passthrough('mooring.user_MBL', 'user_MBL')
        self.create_passthrough('mooring.user_WML', 'user_WML')
        self.create_passthrough('mooring.user_AE_storm', 'user_AE_storm')
        self.create_passthrough('mooring.user_MCPL', 'user_MCPL')
        self.create_passthrough('mooring.user_anchor_cost', 'user_anchor_cost')
        self.create_passthrough('mooring.misc_cost_factor', 'misc_cost_factor')
        self.create_passthrough('mooring.number_of_discretizations',
                                'number_of_discretizations')
        self.connect('water_density', 'mooring.water_density')
        """Connect outputs to inputs."""
        self.connect('tower_RNA.RNA_keel_to_CG', 'spar.RNA_keel_to_CG')
        self.connect('tower_RNA.tower_center_of_gravity',
                     'spar.tower_center_of_gravity')
        self.connect('tower_RNA.tower_wind_force', 'spar.tower_wind_force')
        self.connect('tower_RNA.RNA_wind_force', 'spar.RNA_wind_force')

        #mooring connections
        self.connect('mooring.mooring_total_cost', 'spar.mooring_total_cost')
        self.connect('mooring.mooring_keel_to_CG', 'spar.mooring_keel_to_CG')
        self.connect('mooring.mooring_vertical_load',
                     'spar.mooring_vertical_load')
        self.connect('mooring.mooring_horizontal_stiffness',
                     'spar.mooring_horizontal_stiffness')
        self.connect('mooring.mooring_vertical_stiffness',
                     'spar.mooring_vertical_stiffness')
        self.connect('mooring.sum_forces_x', 'spar.sum_forces_x')
        self.connect('mooring.offset_x', 'spar.offset_x')
        self.connect('mooring.damaged_mooring', 'spar.damaged_mooring')
        self.connect('mooring.intact_mooring', 'spar.intact_mooring')
        self.connect('mooring.mooring_mass', 'spar.mooring_mass')
        """Design variables by adding a range of validity for certain variables."""
        self.driver.add_parameter('neutral_axis',
                                  low=10.,
                                  high=41.9,
                                  scaler=0.01)
        #self.driver.add_parameter('number_of_rings[0]',low=1,high=5)
        self.driver.add_parameter('number_of_rings[1]', low=1, high=10)
        self.driver.add_parameter('number_of_rings[2]', low=1, high=10)
        self.driver.add_parameter('number_of_rings[3]', low=1, high=50)
        self.driver.add_parameter('wall_thickness[0]',
                                  low=1.,
                                  high=10.,
                                  scaler=0.01)
        self.driver.add_parameter('wall_thickness[1]',
                                  low=1.,
                                  high=10.,
                                  scaler=0.01)
        self.driver.add_parameter('wall_thickness[2]',
                                  low=1.,
                                  high=10.,
                                  scaler=0.01)
        self.driver.add_parameter('wall_thickness[3]',
                                  low=10.,
                                  high=100.,
                                  scaler=0.001)
        self.driver.add_parameter('scope_ratio', low=15., high=45., scaler=0.1)
        self.driver.add_parameter('pretension_percent', low=2.5, high=10.)
        self.driver.add_parameter('mooring_diameter',
                                  low=30.,
                                  high=100.,
                                  scaler=0.001)
        self.driver.add_parameter('fixed_ballast_height',
                                  low=30.,
                                  high=100.,
                                  scaler=0.1)
        self.driver.add_parameter('permanent_ballast_height',
                                  low=30.,
                                  high=100.,
                                  scaler=0.1)
        """Specify objective function (what you want to minimize)."""
        self.driver.add_objective('spar.spar_mass', name='spar mass')
        """Add constraints to the driver."""
        self.driver.add_constraint('spar.water_ballast_height < 7.5')
        self.driver.add_constraint('spar.water_ballast_height > 5.5')
        self.driver.add_constraint('spar.flange_compactness < 1.')
        self.driver.add_constraint('spar.web_compactness < 1.')
        self.driver.add_constraint('spar.VAL[0] < 0.99')
        self.driver.add_constraint('spar.VAL[1] < 0.99')
        self.driver.add_constraint('spar.VAL[2] < 0.99')
        self.driver.add_constraint('spar.VAL[3] < 0.99')
        self.driver.add_constraint('spar.VAG[0] < 0.99')
        self.driver.add_constraint('spar.VAG[1] < 0.99')
        self.driver.add_constraint('spar.VAG[2] < 0.99')
        self.driver.add_constraint('spar.VAG[3] < 0.99')
        self.driver.add_constraint('spar.VEL[0] < 0.99')
        self.driver.add_constraint('spar.VEL[1] < 0.99')
        self.driver.add_constraint('spar.VEL[2] < 0.99')
        self.driver.add_constraint('spar.VEL[3] < 0.99')
        self.driver.add_constraint('spar.VEG[0] < 0.99')
        self.driver.add_constraint('spar.VEG[1] < 0.99')
        self.driver.add_constraint('spar.VEG[2] < 0.99')
        self.driver.add_constraint('spar.VEG[3] < 0.99')
        self.driver.add_constraint('spar.platform_stability_check < 1.')
        self.driver.add_constraint('spar.heel_angle <= 6.')
        self.driver.add_constraint('spar.min_offset_unity < 1.0')
        self.driver.add_constraint('spar.max_offset_unity < 1.0')