Ejemplo n.º 1
0
wing_param.convert_to_design_variable('tip_height', (0.2, 0.5))
wing_param.build_linear_airfoil(OC, AoA0=-2., Cm0=-0.1, set_as_ref=True)
wing_param.build_airfoils_from_ref()
wing_param.update()

print wing_param

N = wing_param.get_n_sect()
iAoA0 = numpy.zeros(N)

DLLM = DLLMSolver('test', wing_param, OC)

NRPb = NewtonRaphsonProblem(iAoA0, DLLM.comp_R, DLLM.comp_dpR_dpiAoA)
NRPb.set_relax_factor(0.99)
NRPb.set_stop_residual(1.e-9)
NRPb.set_max_iterations(100)

iAoA = NRPb.solve()

DLLM.set_direct_computed()
print iAoA

DLLM.comp_dpR_dpchi()
dpRdpthetaY = DLLM.comp_dpR_dpthetaY()
print 'dpRdpthetaY=', dpRdpthetaY

print DLLM.get_iAoA()

DLLM.run_post()
DLLM.run_adjoint()
Ejemplo n.º 2
0
wing_param.import_BC_from_file('input_parameters.par')
wing_param.build_linear_airfoil(OC, AoA0=0.0, set_as_ref=True)
wing_param.build_airfoils_from_ref()
wing_param.update()
wing_param.plot()


N = wing_param.get_n_sect()
iAoA0=numpy.zeros(N)

DLLM = DLLMSolver('test',wing_param,OC)

NRPb = NewtonRaphsonProblem(iAoA0, DLLM.comp_R, DLLM.comp_dpR_dpiAoA)
NRPb.set_relax_factor(0.99)
NRPb.set_stop_residual(1.e-9)
NRPb.set_max_iterations(100)

iAoA=NRPb.solve()

DLLM.set_direct_computed()
print iAoA

DLLM.comp_dpR_dpchi()
dpRdpthetaY=DLLM.comp_dpR_dpthetaY()
print 'dpRdpthetaY=',dpRdpthetaY

print DLLM.get_iAoA()

DLLM.run_post()
DLLM.run_adjoint()