root.add('drag_coefficient', ExecComp('CD = CD0 + CDi + CDw'), promotes=['*'])

    #Drag force
    root.add('drag_force', ExecComp('D = 0.5*rho_a*V**2*Sw*CD'), promotes=['*'])

    #Fuel burn (Breguet equation)
    root.add('fuel_burn', ExecComp('FB = (W_airframe+2.*1.25*mass)*(exp(R*9.81*SFC/(V*(CL/CD))) - 1)'), promotes=['*'])

    # Aeroelastic MDA components
    mda_l = Group()
    
    #Add disciplines to the low fidelity group 
    mda_l.add('mult_filter_l', Filter(ns, fidelity)) #This component allows to recover result from HiFi 
    mda_l.add('displacement_transfer', DisplacementTransfer(na, ns)) 
    mda_l.add('aerodynamics', Panair(na, network_info, case_name, aero_template_l, sym_plane_index=sym_plane_index), promotes=['V','Sw','alpha','rho_a']) 
    mda_l.add('load_transfer', LoadTransfer(na, ns))
    mda_l.add('structures', NastranStatic(node_id, node_id_all, n_stress, tn, mn, sn, case_name, an=an), promotes=['n','m','t','s','Ix','Iy','a'])
    
    #Inner interpolation methods 
    mda_l.add('inter', Interpolation(na, ns, function = function_type, bias = bias_inter), promotes=['node_coord'])
    
    #Hi-Fi Group
    mda_h = Group()
    
    #Add disciplines to the high-fidelity group 
    mda_h.add('mult_filter_h', Filter(ns, fidelity))
    mda_h.add('displacement_transfer_h', DisplacementTransfer(na_h, ns))
    mda_h.add('aerodynamics_h', Panair(na_h, network_info_h, case_name_h, aero_template_h, sym_plane_index=sym_plane_index), promotes=['V','Sw','alpha','rho_a','CL','CDi','apoints_coord'])    
    mda_h.add('load_transfer_h', LoadTransfer(na_h, ns))
    mda_h.add('structures_h', NastranStatic(node_id, node_id_all, n_stress, tn, mn, sn, case_name_h, an=an), promotes=['mass','VMStress','n','m','t','s','Ix','Iy','node_coord_all','a'])
    
Ejemplo n.º 2
0
             IndepVarComp('apoints_coord', apoints_coord),
             promotes=['*'])

    root.add('inter',
             Interpolation(na, ns, function=function_type, bias=bias),
             promotes=['*'])
    #    root.add('agrr', Aggregation(n_stress,p,function), promotes=['*'])

    mda = Group()

    #Add disciplines to the group
    mda.add('displacement_transfer',
            DisplacementTransfer(na, ns),
            promotes=['*'])
    mda.add('aerodynamics', Panair(na, network_info), promotes=['*'])
    mda.add('load_transfer', LoadTransfer(na, ns), promotes=['*'])
    mda.add('structures',
            NastranStatic(node_id, node_id_all, n_stress, tn, mn),
            promotes=['*'])

    #Define solver type and tolerance for MDA
    mda.nl_solver = NLGaussSeidel()
    #    mda.nl_solver.options['rtol'] = 1.e-1
    mda.nl_solver.options['maxiter'] = 15
    mda.nl_solver.options['rutol'] = 1.e-2
    mda.nl_solver.options['use_aitken'] = True
    mda.nl_solver.options['aitken_alpha_min'] = 0.1
    mda.nl_solver.options['aitken_alpha_max'] = 1.5

    mda.ln_solver = ScipyGMRES()