예제 #1
0
 def __init_Newton_Raphson(self):
     N=self.get_N()
     iAoA0= zeros(N)
     self.__NRPb = NewtonRaphsonProblem(iAoA0, self.comp_R, self.comp_dpR_dpiAoA)
     self.__NRPb.set_relax_factor(0.99)
     self.__NRPb.set_stop_residual(1.e-9)
     self.__NRPb.set_max_iterations(100)
예제 #2
0
 def __init_Newton_Raphson(self):
     W0 = numpy.zeros(self.__N + 1)
     self.__NRPb = NewtonRaphsonProblem(W0, self.comp_R_TCl,
                                        self.comp_dpR_TCl_dpW)
     self.__NRPb.set_relax_factor(0.99)
     self.__NRPb.set_stop_residual(1.e-9)
     self.__NRPb.set_max_iterations(100)
예제 #3
0
wing_param.convert_to_design_variable('tip_chord', (1., 2.))
wing_param.convert_to_design_variable('root_height', (1., 1.5))
wing_param.convert_to_design_variable('break_height', (0.8, 1.2))
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()