def run_apame(): # compute flight conditions r=287.058 #J.kg-1.K-1 Patm = 101325.#Pa rho = 1.225#kg.m-3 mu=1.5e-5 T = Patm/(r*rho) Tc = T-273.15 print "T=",T Re=5.e5 airspeed = Re*mu/rho print "Airspeed=",airspeed*3.6 # list of alpha and beta to compute alpha_list = numpy.linspace(-10.,10.,21) beta_list = numpy.zeros(21) run_case('optimized_wing.vtp', wake_length=10., alpha=alpha_list, beta=beta_list, v=airspeed, rho=rho, P=Patm, Mach=0., origin=[0.,0.,0.], wingspan=10., ref_chord=1., Sref=10., method=0, farfield_dist=50., velorder=1)
def run_apame(nb_angles): # compute flight conditions r=287.058 #J.kg-1.K-1 Patm = 101325.#Pa rho = 1.225#kg.m-3 mu=1.5e-5 T = Patm/(r*rho) Tc = T-273.15 print "T=",T airspeed = Re*mu/rho print "Airspeed=",airspeed*3.6 # list of alpha and beta to compute span_angles=float((nb_angles-1)//2) alpha_list = numpy.linspace(-span_angles,span_angles,nb_angles) beta_list = numpy.zeros(nb_angles) run_case('initial'+str(nb)+'.vtp', wake_length=10., alpha=alpha_list, beta=beta_list, v=airspeed, rho=rho, P=Patm, Mach=0., origin=[0.,0.,0.], wingspan=10., ref_chord=1., Sref=Sref, method=0, farfield_dist=50., velorder=1)
def run_apame(): # compute flight conditions r = 287.058 # J.kg-1.K-1 Patm = 101325.0 # Pa rho = 1.225 # kg.m-3 mu = 1.5e-5 T = Patm / (r * rho) Tc = T - 273.15 print "T=", T airspeed = Re * mu / rho print "Airspeed=", airspeed * 3.6 # list of alpha and beta to compute alpha_list = numpy.linspace(-5.0, 5.0, 11) beta_list = numpy.zeros(11) run_case( "output.vtp", wake_length=10.0, alpha=alpha_list, beta=beta_list, v=airspeed, rho=rho, P=Patm, Mach=0.0, origin=[0.0, 0.0, 0.0], wingspan=10.0, ref_chord=1.0, Sref=Sref, method=0, farfield_dist=50.0, velorder=1, )
T = Patm / (r * rho) Tc = T - 273.15 print "T=", T Re = 5.0e5 airspeed = Re * mu / rho print "Airspeed=", airspeed * 3.6 # list of alpha and beta to compute alpha_list = numpy.linspace(-10.0, 10.0, 10) beta_list = numpy.zeros(10) run_case( "naca0012.vtp", wake_length=10.0, alpha=alpha_list, beta=beta_list, v=airspeed, rho=rho, P=Patm, Mach=0.0, origin=[0.0, 0.0, 0.0], wingspan=10.0, ref_chord=1.0, Sref=10.0, method=0, farfield_dist=50.0, velorder=1, )
rho = 1.225#kg.m-3 mu=1.5e-5 T = Patm/(r*rho) Tc = T-273.15 print "T=",T Re=5.e5 airspeed = Re*mu/rho print "Airspeed=",airspeed*3.6 # list of alpha and beta to compute alpha_list = numpy.zeros(1) beta_list = numpy.zeros(1) run_case('output.vtp', wake_length=10., alpha=alpha_list, beta=beta_list, v=airspeed, rho=rho, P=Patm, Mach=0., origin=[0.,0.,0.], wingspan=10., ref_chord=1., Sref=10., method=0, farfield_dist=50., velorder=1)
nv=21) Patm = 101325.#Pa rho = 1.225#kg.m-3 c = numpy.sqrt(1.4*Patm/rho) Mach = 0.17 airspeed = c*Mach run_case(filename, wake_length=20., alpha=[x[7]], beta=[0.], v=25., rho=rho, P=Patm, Mach=Mach, origin=[0.,0.,0.], wingspan=2.*x[0], ref_chord=1., Sref=10., method=0, farfield_dist=50., velorder=1) fid = open('wing_polar.dat') lines = fid.readlines() fid.close() [_,Cl,Cd] = [eval(word) for word in lines[0].split()] print Cl,10000.*Cd
print "Re=",Re print "airspeed=",airspeed*3.6 Sref=15. Sw = (root_chord+tip_chord)*semi_span print "Sw=",Sw run_case(filename, wake_length=20., alpha=[2.], beta=[0.], v=airspeed, rho=rho, P=Patm, Mach=Mach, origin=[0.,0.,0.], wingspan=2.*semi_span, ref_chord=root_chord, Sref=Sref, method=0, farfield_dist=50., velorder=1) fid = open('wing_polar.dat') lines = fid.readlines() fid.close() [_,Cl,Cd] = [eval(word) for word in lines[0].split()] print Cl,10000.*Cd