config_dict['Case.param.desc.AoA1.value']=0.
config_dict['Case.param.desc.AoA1.bounds']=(-20.,+20.)
config_dict['Case.param.desc.AoA2.type']='DesignVariable'
config_dict['Case.param.desc.AoA2.value']=0.
config_dict['Case.param.desc.AoA2.bounds']=(-20.,+20.)
config_dict['Case.param.desc.AoA3.type']='DesignVariable'
config_dict['Case.param.desc.AoA3.value']=0.
config_dict['Case.param.desc.AoA3.bounds']=(-20.,+20.)

list_log=glob('*.log')
for log in list_log:
    os.remove(log)

MP=DLLMMP('Case')
MP.configure(config_dict)
F_list,F_list_grad=MP.analysis_and_grad()
for i,grad in enumerate(F_list_grad):
    print 'cond'+str(i+1)+' Lift grad = ',grad


# # Parameterisation configuration

# 
# # DLLM configuration
# config_dict['cond1.DLLM.type']='Solver'
# config_dict['cond1.DLLM.method']='inhouse'
# config_dict['cond1.DLLM.relax_factor']=0.99
# config_dict['cond1.DLLM.stop_residual']=1e-9
# config_dict['cond1.DLLM.max_iterations']=100
# config_dict['cond1.DLLM.gamma_file_name']='gamma.dat'
# #config_dict['cond1.DLLM.F_list_names']=['Lift','Drag','Drag_Pressure','Drag_Friction','Cl', 'Cd', 'Cdp', 'Cdf', 'LoD']
Example #2
0
config_dict['Case.param.desc.AoA1.value'] = 0.
config_dict['Case.param.desc.AoA1.bounds'] = (-20., +20.)
config_dict['Case.param.desc.AoA2.type'] = 'DesignVariable'
config_dict['Case.param.desc.AoA2.value'] = 0.
config_dict['Case.param.desc.AoA2.bounds'] = (-20., +20.)
config_dict['Case.param.desc.AoA3.type'] = 'DesignVariable'
config_dict['Case.param.desc.AoA3.value'] = 0.
config_dict['Case.param.desc.AoA3.bounds'] = (-20., +20.)

list_log = glob('*.log')
for log in list_log:
    os.remove(log)

MP = DLLMMP('Case')
MP.configure(config_dict)
F_list, F_list_grad = MP.analysis_and_grad()
for i, grad in enumerate(F_list_grad):
    print 'cond' + str(i + 1) + ' Lift grad = ', grad

# # Parameterisation configuration

#
# # DLLM configuration
# config_dict['cond1.DLLM.type']='Solver'
# config_dict['cond1.DLLM.method']='inhouse'
# config_dict['cond1.DLLM.relax_factor']=0.99
# config_dict['cond1.DLLM.stop_residual']=1e-9
# config_dict['cond1.DLLM.max_iterations']=100
# config_dict['cond1.DLLM.gamma_file_name']='gamma.dat'
# #config_dict['cond1.DLLM.F_list_names']=['Lift','Drag','Drag_Pressure','Drag_Friction','Cl', 'Cd', 'Cdp', 'Cdf', 'LoD']
# config_dict['cond1.DLLM.F_list_names']=['Lift','Drag','Drag_Pressure','Drag_Friction','LoD']
config_dict['Case.cond2.OC.Mach']=0.6
config_dict['Case.cond2.OC.AoA']=4.5
config_dict['Case.cond2.OC.altitude']=5000.
# cond3 Operating condition information
config_dict['Case.cond3.OC.Mach']=0.4
config_dict['Case.cond3.OC.AoA']=6.
config_dict['Case.cond3.OC.altitude']=1000.

# Parameterisation configuration
config_dict['Case.param.geom_type']='Broken'
config_dict['Case.param.n_sect']=20
config_dict['Case.param.BCfilename']='input_parameters.par'
config_dict['Case.param.airfoil.type']='simple'
config_dict['Case.param.airfoil.AoA0']=-2.
config_dict['Case.param.airfoil.Cm0']=-0.1

# DLLM configuration
config_dict['Case.DLLM.type']='Solver'
config_dict['Case.DLLM.method']='inhouse'
config_dict['Case.DLLM.relax_factor']=0.99
config_dict['Case.DLLM.stop_residual']=1e-9
config_dict['Case.DLLM.max_iterations']=100

list_log=glob('*.log')
for log in list_log:
    os.remove(log)

MP=DLLMMP('Case')
MP.configure(config_dict)
MP.analysis_and_grad()
Example #4
0
config_dict['Case.param.desc.tip_height.bounds']=(0.2,0.5)

config_dict['Case.DLLM.type']='Solver'
config_dict['Case.DLLM.method']='inhouse'
config_dict['Case.DLLM.relax_factor']=0.99
config_dict['Case.DLLM.stop_residual']=1e-9
config_dict['Case.DLLM.max_iterations']=100
config_dict['Case.DLLM.F_list_names']=['Lift','Drag','Drag_Pressure','Drag_Friction','LoD']

list_log=glob('*.log')
for log in list_log:
    os.remove(log)

MP=DLLMMP('Case')
MP.configure(config_dict)
MP.analysis_and_grad()


# # Parameterisation configuration

# 
# # DLLM configuration
# config_dict['cond1.DLLM.type']='Solver'
# config_dict['cond1.DLLM.method']='inhouse'
# config_dict['cond1.DLLM.relax_factor']=0.99
# config_dict['cond1.DLLM.stop_residual']=1e-9
# config_dict['cond1.DLLM.max_iterations']=100
# config_dict['cond1.DLLM.gamma_file_name']='gamma.dat'
# #config_dict['cond1.DLLM.F_list_names']=['Lift','Drag','Drag_Pressure','Drag_Friction','Cl', 'Cd', 'Cdp', 'Cdf', 'LoD']
# config_dict['cond1.DLLM.F_list_names']=['Lift','Drag','Drag_Pressure','Drag_Friction','LoD']
# #config_dict['cond1.DLLM.target_Cl']=0.5