本文整理汇总了Python中TestCase.TestCase.test_iter方法的典型用法代码示例。如果您正苦于以下问题:Python TestCase.test_iter方法的具体用法?Python TestCase.test_iter怎么用?Python TestCase.test_iter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestCase.TestCase
的用法示例。
在下文中一共展示了TestCase.test_iter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
"""This program runs SU2 and ensures that the output matches specified values.
This will be used to do checks when code is pushed to github
to make sure nothing is broken. """
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase("channel")
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-3.071007, 2.301191, 0.008562, 0.028922] # last 4 columns
channel.su2_exec = "parallel_computation.py -f"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase("naca0012")
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-6.237188, -5.641250, 0.334843, 0.022206] # last 4 columns
naca0012.su2_exec = "parallel_computation.py -f"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase("wedge")
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-1.690232, 3.924432, -0.252221, 0.044419] # last 4 columns
wedge.su2_exec = "parallel_computation.py -f"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase("oneram6")
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-13.400678, -12.932056, 0.282557, 0.012706] # last 4 columns
oneram6.su2_exec = "parallel_computation.py -f"
oneram6.timeout = 3200
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase("flatplate")
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.231727, 0.261637, -0.166869, 0.012707] # last 4 columns
flatplate.su2_exec = "parallel_computation.py -f"
flatplate.timeout = 1600
flatplate.tol = 0.00001
test_list.append(flatplate)
# Laminar cylinder (steady)
cylinder = TestCase("cylinder")
cylinder.cfg_dir = "navierstokes/cylinder"
cylinder.cfg_file = "lam_cylinder.cfg"
cylinder.test_iter = 25
cylinder.test_vals = [-6.757291, -1.289309, -0.125948, 0.625438] # last 4 columns
cylinder.su2_exec = "parallel_computation.py -f"
cylinder.timeout = 1600
cylinder.tol = 0.00001
test_list.append(cylinder)
# Laminar cylinder (low Mach correction)
cylinder_lowmach = TestCase("cylinder_lowmach")
cylinder_lowmach.cfg_dir = "navierstokes/cylinder"
cylinder_lowmach.cfg_file = "cylinder_lowmach.cfg"
cylinder_lowmach.test_iter = 25
cylinder_lowmach.test_vals = [-6.861860, -1.399846, -1.557250, 110.230719] # last 4 columns
cylinder_lowmach.su2_exec = "parallel_computation.py -f"
cylinder_lowmach.timeout = 1600
cylinder_lowmach.tol = 0.00001
test_list.append(cylinder_lowmach)
##########################
### Compressible RANS ###
##########################
# RAE2822 SA
rae2822_sa = TestCase("rae2822_sa")
rae2822_sa.cfg_dir = "rans/rae2822"
rae2822_sa.cfg_file = "turb_SA_RAE2822.cfg"
#.........这里部分代码省略.........
示例2: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU^2 and ensures that the output matches specified values.
This will be used to do nightly checks to make sure nothing is broken. '''
workdir = os.getcwd()
# environment variables for SU2
os.environ['SU2_HOME'] = '/home/ale11/.cruise/projects/parallel_regression/work/SU2'
os.environ['SU2_RUN'] = '/home/ale11/.cruise/projects/parallel_regression/work/SU2/bin'
os.environ['PATH'] = os.environ['PATH'] + ':' + os.environ['SU2_RUN']
# sync SU2 repo
os.chdir( os.environ['SU2_HOME'] )
os.system('git pull')
# Build SU2_CFD in parallel using autoconf
os.system('./configure --prefix=$SU2_HOME --with-MPI=mpicxx CXXFLAGS="-O3"')
os.system('make clean')
os.system('make install')
os.chdir(os.environ['SU2_RUN'])
if not os.path.exists("./SU2_CFD"):
print 'Could not build SU2_CFD'
sys.exit(1)
if not os.path.exists("./SU2_PRT"):
print 'Could not build SU2_PRT'
sys.exit(1)
os.chdir(workdir)
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-2.975507,2.405636,-0.027947,0.070672 ]
channel.su2_exec = "parallel_computation.py -f"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-5.868897,-5.317999,0.335382,0.022264]
naca0012.su2_exec = "parallel_computation.py -f"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-1.810772,3.816000,-0.252360,0.044433]
wedge.su2_exec = "parallel_computation.py -f"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6_JST.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-4.722014,-4.159420,0.277228,0.018788]
oneram6.su2_exec = "parallel_computation.py -f"
oneram6.timeout = 3200
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.236893,0.247033,-0.163494,0.013566]
flatplate.su2_exec = "parallel_computation.py -f"
flatplate.timeout = 1600
flatplate.tol = 0.00001
test_list.append(flatplate)
# Laminar cylinder (steady)
cylinder = TestCase('cylinder')
cylinder.cfg_dir = "navierstokes/cylinder"
cylinder.cfg_file = "lam_cylinder.cfg"
#.........这里部分代码省略.........
示例3: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU^2 and ensures that the output matches specified values.
This will be used to do nightly checks to make sure nothing is broken. '''
workdir = os.getcwd()
# environment variables for SU2
os.environ['SU2_HOME'] = '/home/ale11/.cruise/projects/serial_regression/work/SU2'
os.environ['SU2_RUN'] = '/home/ale11/.cruise/projects/serial_regression/work/SU2/bin'
os.environ['PATH'] = os.environ['PATH'] + ':' + os.environ['SU2_RUN']
# sync SU2 repo
os.chdir( os.environ['SU2_HOME'] )
os.system('git pull')
# Build SU2_CFD in serial using autoconf
os.system('./configure --prefix=$SU2_HOME CXXFLAGS="-O3"')
os.system('make clean')
os.system('make install')
os.chdir(os.environ['SU2_RUN'])
if not os.path.exists("./SU2_CFD"):
print 'Could not build SU2_CFD'
sys.exit(1)
os.chdir(workdir)
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-2.991375,2.388702,-0.042177,0.068520]
channel.su2_exec = "SU2_CFD"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-5.932646,-5.394328,0.335205,0.022232]
naca0012.su2_exec = "SU2_CFD"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-1.838548,3.781222,-0.252690,0.044489]
wedge.su2_exec = "SU2_CFD"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6_JST.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-4.744759,-4.182702,0.281122,0.018310]
oneram6.su2_exec = "SU2_CFD"
oneram6.timeout = 9600
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.230001,0.252184,-0.163706,0.013547]
flatplate.su2_exec = "SU2_CFD"
flatplate.timeout = 1600
flatplate.tol = 0.00001
test_list.append(flatplate)
# Laminar cylinder (steady)
cylinder = TestCase('cylinder')
cylinder.cfg_dir = "navierstokes/cylinder"
cylinder.cfg_file = "lam_cylinder.cfg"
cylinder.test_iter = 25
cylinder.test_vals = [-6.409812,-0.945306,0.088160,-5.192708]
#.........这里部分代码省略.........
示例4: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU2 and ensures that the output matches specified values.
This will be used to do checks when code is pushed to github
to make sure nothing is broken. '''
test_list = []
#####################################
### Disc. adj. compressible Euler ###
#####################################
# Inviscid NACA0012
discadj_naca0012 = TestCase('discadj_naca0012')
discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012"
discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg"
discadj_naca0012.test_iter = 100
discadj_naca0012.test_vals = [-3.606839, -9.035212, -0.000000, 0.005688] #last 4 columns
discadj_naca0012.su2_exec = "SU2_CFD_AD"
discadj_naca0012.timeout = 1600
discadj_naca0012.tol = 0.00001
test_list.append(discadj_naca0012)
# Inviscid Cylinder 3D (multiple markers)
discadj_cylinder3D = TestCase('discadj_cylinder3D')
discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D"
discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg"
discadj_cylinder3D.test_iter = 5
discadj_cylinder3D.test_vals = [-3.724711, -4.052467, -0.000000, 0.000000] #last 4 columns
discadj_cylinder3D.su2_exec = "SU2_CFD_AD"
discadj_cylinder3D.timeout = 1600
discadj_cylinder3D.tol = 0.00001
test_list.append(discadj_cylinder3D)
#######################################################
### Disc. adj. compressible RANS ###
#######################################################
# Adjoint turbulent NACA0012 SA
discadj_rans_naca0012_sa = TestCase('discadj_rans_naca0012_sa')
discadj_rans_naca0012_sa.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
discadj_rans_naca0012_sa.test_iter = 10
discadj_rans_naca0012_sa.test_vals = [-1.751962, 0.485775, 0.182122, -0.000018] #last 4 columns
discadj_rans_naca0012_sa.su2_exec = "SU2_CFD_AD"
discadj_rans_naca0012_sa.timeout = 1600
discadj_rans_naca0012_sa.tol = 0.00001
test_list.append(discadj_rans_naca0012_sa)
# Adjoint turbulent NACA0012 SST
discadj_rans_naca0012_sst = TestCase('discadj_rans_naca0012_sst')
discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
discadj_rans_naca0012_sst.test_iter = 10
discadj_rans_naca0012_sst.test_vals = [-1.654903, -0.491416, 0.109157, 0.000011] #last 4 columns
discadj_rans_naca0012_sst.su2_exec = "SU2_CFD_AD"
discadj_rans_naca0012_sst.timeout = 1600
discadj_rans_naca0012_sst.tol = 0.00001
test_list.append(discadj_rans_naca0012_sst)
#######################################
### Disc. adj. incompressible Euler ###
#######################################
# Adjoint Incompressible Inviscid NACA0012
discadj_incomp_NACA0012 = TestCase('discadj_incomp_NACA0012')
discadj_incomp_NACA0012.cfg_dir = "cont_adj_incomp_euler/naca0012"
discadj_incomp_NACA0012.cfg_file = "incomp_NACA0012_disc.cfg"
discadj_incomp_NACA0012.test_iter = 20
discadj_incomp_NACA0012.test_vals = [-3.391214, -2.560170, 0.000000, 0.000000] #last 4 columns
discadj_incomp_NACA0012.su2_exec = "SU2_CFD_AD"
discadj_incomp_NACA0012.timeout = 1600
discadj_incomp_NACA0012.tol = 0.00001
test_list.append(discadj_incomp_NACA0012)
#####################################
### Disc. adj. incompressible N-S ###
#####################################
# Adjoint Incompressible Viscous Cylinder
discadj_incomp_cylinder = TestCase('discadj_incomp_cylinder')
discadj_incomp_cylinder.cfg_dir = "cont_adj_incomp_navierstokes/cylinder"
discadj_incomp_cylinder.cfg_file = "lam_incomp_cylinder_disc.cfg"
discadj_incomp_cylinder.test_iter = 20
discadj_incomp_cylinder.test_vals = [-2.802148, -2.228080, 0.000000, 0.000000] #last 4 columns
discadj_incomp_cylinder.su2_exec = "SU2_CFD_AD"
discadj_incomp_cylinder.timeout = 1600
discadj_incomp_cylinder.tol = 0.00001
test_list.append(discadj_incomp_cylinder)
######################################
### Disc. adj. incompressible RANS ###
######################################
# Adjoint Incompressible Turbulent NACA 0012
discadj_incomp_turb_NACA0012 = TestCase('discadj_incomp_turb_NACA0012')
discadj_incomp_turb_NACA0012.cfg_dir = "incomp_rans/naca0012"
discadj_incomp_turb_NACA0012.cfg_file = "naca0012_disc.cfg"
discadj_incomp_turb_NACA0012.test_iter = 10
discadj_incomp_turb_NACA0012.test_vals = [-3.847506, -1.009607, 0.000000, 0.000000] #last 4 columns
discadj_incomp_turb_NACA0012.su2_exec = "SU2_CFD_AD"
#.........这里部分代码省略.........
示例5: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU^2 and ensures that the output matches specified values.
This will be used to do nightly checks to make sure nothing is broken. '''
workdir = os.getcwd()
# environment variables for SU2
os.environ['SU2_HOME'] = '/home/ale11/.cruise/projects/parallel_regression/work/SU2'
os.environ['SU2_RUN'] = '/home/ale11/.cruise/projects/parallel_regression/work/SU2/bin'
os.environ['PATH'] = os.environ['PATH'] + ':' + os.environ['SU2_RUN']
# sync SU2 repo
os.chdir( os.environ['SU2_HOME'] )
os.system('git pull')
# Build SU2_CFD in parallel using autoconf
os.system('./configure --prefix=$SU2_HOME --with-MPI=mpicxx CXXFLAGS="-O3"')
os.system('make clean')
os.system('make install')
os.chdir(os.environ['SU2_RUN'])
if not os.path.exists("./SU2_CFD"):
print 'Could not build SU2_CFD'
sys.exit(1)
if not os.path.exists("./SU2_PRT"):
print 'Could not build SU2_PRT'
sys.exit(1)
os.chdir(workdir)
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-2.413846,2.965840,0.007590,0.051651]
channel.su2_exec = "parallel_computation.py -f"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-6.145865,-5.547701,0.334821,0.022211]
naca0012.su2_exec = "parallel_computation.py -f"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-2.694577,3.148295,-0.252137,0.044398]
wedge.su2_exec = "parallel_computation.py -f"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6_JST.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-4.825465,-4.290835,0.287910,0.015977]
oneram6.su2_exec = "parallel_computation.py -f"
oneram6.timeout = 3200
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.232884,0.263297,0.020756,0.012889]
flatplate.su2_exec = "parallel_computation.py -f"
flatplate.timeout = 1600
flatplate.tol = 0.00001
test_list.append(flatplate)
# Laminar cylinder (steady)
cylinder = TestCase('cylinder')
cylinder.cfg_dir = "navierstokes/cylinder"
cylinder.cfg_file = "lam_cylinder.cfg"
#.........这里部分代码省略.........
示例6: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU2 and ensures that the output matches specified values.
This will be used to do nightly checks to make sure nothing is broken. '''
workdir = os.getcwd()
# environment variables for SU2
os.environ['TEST_HOME'] = '/home/ale11/.cruise/projects/serial_regression/work'
os.environ['SU2_HOME'] = '/home/ale11/.cruise/projects/serial_regression/work/SU2'
os.environ['SU2_RUN'] = '/home/ale11/.cruise/projects/serial_regression/work/SU2/bin'
os.environ['PATH'] = os.environ['PATH'] + ':' + os.environ['SU2_RUN']
# sync Test Cases repo
os.chdir( os.environ['TEST_HOME'] )
os.system('git fetch')
os.system('git checkout develop')
os.system('git pull origin develop')
# sync SU2 repo
os.chdir( os.environ['SU2_HOME'] )
os.system('git fetch')
os.system('git checkout develop')
os.system('git pull origin develop')
# Build SU2_CFD in serial using autoconf
os.system('./configure --prefix=$SU2_HOME CXXFLAGS="-O3"')
os.system('make clean')
os.system('make install')
os.chdir(os.environ['SU2_RUN'])
if not os.path.exists("./SU2_CFD"):
print 'Could not build SU2_CFD'
sys.exit(1)
os.chdir(workdir)
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-3.110240, 2.263506, 0.008686, 0.029098] #last 4 columns
channel.su2_exec = "SU2_CFD"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-6.191618, -5.592802, 0.334809, 0.022197] #last 4 columns
naca0012.su2_exec = "SU2_CFD"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-1.711318, 3.913749, -0.252131, 0.044402] #last 4 columns
wedge.su2_exec = "SU2_CFD"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6_JST.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-4.704347, -4.159916, 0.271678, 0.018869] #last 4 columns
oneram6.su2_exec = "SU2_CFD"
oneram6.timeout = 9600
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.231916, 0.261866, -0.166832, 0.012717] #last 4 columns
flatplate.su2_exec = "SU2_CFD"
flatplate.timeout = 1600
flatplate.tol = 0.00001
#.........这里部分代码省略.........
示例7: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU2 and ensures that the output matches specified values.
This will be used to do checks when code is pushed to github
to make sure nothing is broken. '''
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-3.071007, 2.301191, 0.008562, 0.028922] #last 4 columns
channel.su2_exec = "parallel_computation.py -f"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-6.237188, -5.641250, 0.334843, 0.022206] #last 4 columns
naca0012.su2_exec = "parallel_computation.py -f"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-1.690232, 3.924432, -0.252221, 0.044419] #last 4 columns
wedge.su2_exec = "parallel_computation.py -f"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-13.400678, -12.932056, 0.282557, 0.012706] #last 4 columns
oneram6.su2_exec = "parallel_computation.py -f"
oneram6.timeout = 3200
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.231743, 0.261628, -0.166871, 0.012706] #last 4 columns
flatplate.su2_exec = "parallel_computation.py -f"
flatplate.timeout = 1600
flatplate.tol = 0.00001
test_list.append(flatplate)
# Laminar cylinder (steady)
cylinder = TestCase('cylinder')
cylinder.cfg_dir = "navierstokes/cylinder"
cylinder.cfg_file = "lam_cylinder.cfg"
cylinder.test_iter = 25
cylinder.test_vals = [-6.757291, -1.289309, -0.125948, 0.625438] #last 4 columns
cylinder.su2_exec = "parallel_computation.py -f"
cylinder.timeout = 1600
cylinder.tol = 0.00001
test_list.append(cylinder)
# Laminar cylinder (low Mach correction)
cylinder_lowmach = TestCase('cylinder_lowmach')
cylinder_lowmach.cfg_dir = "navierstokes/cylinder"
cylinder_lowmach.cfg_file = "cylinder_lowmach.cfg"
cylinder_lowmach.test_iter = 25
cylinder_lowmach.test_vals = [-6.861860, -1.399846, -1.557250, 110.230719] #last 4 columns
cylinder_lowmach.su2_exec = "parallel_computation.py -f"
cylinder_lowmach.timeout = 1600
cylinder_lowmach.tol = 0.00001
test_list.append(cylinder_lowmach)
##########################
### Compressible RANS ###
##########################
# RAE2822 SA
rae2822_sa = TestCase('rae2822_sa')
rae2822_sa.cfg_dir = "rans/rae2822"
#.........这里部分代码省略.........
示例8: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU2 and ensures that the output matches specified values.
This will be used to do checks when code is pushed to github
to make sure nothing is broken. '''
test_list = []
#####################################
### Disc. adj. compressible Euler ###
#####################################
# Inviscid NACA0012
discadj_naca0012 = TestCase('discadj_naca0012')
discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012"
discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg"
discadj_naca0012.test_iter = 100
discadj_naca0012.test_vals = [-3.606839,-9.035212,-3.3386e-07,1.8777e-01] #last 4 columns
discadj_naca0012.su2_exec = "SU2_CFD_AD"
discadj_naca0012.timeout = 1600
discadj_naca0012.tol = 0.00001
test_list.append(discadj_naca0012)
#######################################################
### Disc. adj. compressible RANS ###
#######################################################
# Adjoint turbulent NACA0012 SA
discadj_rans_naca0012_sa = TestCase('discadj_rans_naca0012_sa')
discadj_rans_naca0012_sa.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
discadj_rans_naca0012_sa.test_iter = 10
discadj_rans_naca0012_sa.test_vals = [-1.751947, 0.485758, 0.181440, -0.385110] #last 4 columns
discadj_rans_naca0012_sa.su2_exec = "SU2_CFD_AD"
discadj_rans_naca0012_sa.timeout = 1600
discadj_rans_naca0012_sa.tol = 0.00001
test_list.append(discadj_rans_naca0012_sa)
# Adjoint turbulent NACA0012 SST
discadj_rans_naca0012_sst = TestCase('discadj_rans_naca0012_sst')
discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
discadj_rans_naca0012_sst.test_iter = 10
discadj_rans_naca0012_sst.test_vals = [-1.658566, -0.487694, 0.087556, -0.537010] #last 4 columns
discadj_rans_naca0012_sst.su2_exec = "SU2_CFD_AD"
discadj_rans_naca0012_sst.timeout = 1600
discadj_rans_naca0012_sst.tol = 0.00001
test_list.append(discadj_rans_naca0012_sst)
#######################################################
### Unsteady Disc. adj. compressible RANS ###
#######################################################
# Turbulent Cylinder
discadj_cylinder = TestCase('unsteady_cylinder')
discadj_cylinder.cfg_dir = "disc_adj_rans/cylinder"
discadj_cylinder.cfg_file = "cylinder.cfg"
discadj_cylinder.test_iter = 10
discadj_cylinder.test_vals = [3.522068,-1.787841,-1.2030e-02,1.1156e-03] #last 4 columns
discadj_cylinder.su2_exec = "SU2_CFD_AD"
discadj_cylinder.timeout = 1600
discadj_cylinder.tol = 0.00001
discadj_cylinder.unsteady = True
test_list.append(discadj_cylinder)
######################################
### RUN TESTS ###
######################################
pass_list = [ test.run_test() for test in test_list ]
######################################
### RUN PYTHON TESTS ###
######################################
# test discrete_adjoint.py
discadj_euler_py = TestCase('discadj_euler_py')
discadj_euler_py.cfg_dir = "cont_adj_euler/naca0012"
discadj_euler_py.cfg_file = "inv_NACA0012.cfg"
discadj_euler_py.test_iter = 10
discadj_euler_py.su2_exec = "discrete_adjoint.py"
discadj_euler_py.timeout = 1600
discadj_euler_py.reference_file = "of_grad_cd_disc.dat.ref"
discadj_euler_py.test_file = "of_grad_cd.dat"
pass_list.append(discadj_euler_py.run_filediff())
test_list.append(discadj_euler_py)
# test direct_differentiation.py
directdiff_euler_py = TestCase('directdiff_euler_py')
directdiff_euler_py.cfg_dir = "cont_adj_euler/naca0012"
directdiff_euler_py.cfg_file = "inv_NACA0012_FD.cfg"
directdiff_euler_py.test_iter = 10
directdiff_euler_py.su2_exec = "direct_differentiation.py"
directdiff_euler_py.timeout = 1600
directdiff_euler_py.reference_file = "of_grad_directdiff.dat.ref"
directdiff_euler_py.test_file = "DIRECTDIFF/of_grad_directdiff.dat"
pass_list.append(directdiff_euler_py.run_filediff())
test_list.append(directdiff_euler_py)
# Tests summary
print '=================================================================='
#.........这里部分代码省略.........
示例9: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU^2 and ensures that the output matches specified values.
This will be used to do nightly checks to make sure nothing is broken. '''
workdir = os.getcwd()
# environment variables for SU2
os.environ['SU2_HOME'] = '/home/ale11/.cruise/projects/serial_regression/work/SU2'
os.environ['SU2_RUN'] = '/home/ale11/.cruise/projects/serial_regression/work/SU2/bin'
os.environ['PATH'] = os.environ['PATH'] + ':' + os.environ['SU2_RUN']
# sync SU2 repo
os.chdir( os.environ['SU2_HOME'] )
os.system('git pull')
# Build SU2_CFD in serial using autoconf
os.system('./configure --prefix=$SU2_HOME CXXFLAGS="-O3"')
os.system('make clean')
os.system('make install')
os.chdir(os.environ['SU2_RUN'])
if not os.path.exists("./SU2_CFD"):
print 'Could not build SU2_CFD'
sys.exit(1)
os.chdir(workdir)
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-2.489214,2.821231,0.008730,0.053947]
channel.su2_exec = "SU2_CFD"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-6.203359,-5.582393,0.334818,0.022197]
naca0012.su2_exec = "SU2_CFD"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-2.703316,3.192215,-0.252410,0.044446]
wedge.su2_exec = "SU2_CFD"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6_JST.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-4.830417,-4.273125,0.290066,0.015809]
oneram6.su2_exec = "SU2_CFD"
oneram6.timeout = 9600
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.227537,0.267007,-0.167233,0.012854]
flatplate.su2_exec = "SU2_CFD"
flatplate.timeout = 1600
flatplate.tol = 0.00001
test_list.append(flatplate)
# Laminar cylinder (steady)
cylinder = TestCase('cylinder')
cylinder.cfg_dir = "navierstokes/cylinder"
cylinder.cfg_file = "lam_cylinder.cfg"
cylinder.test_iter = 25
cylinder.test_vals = [-6.764866,-1.296840,-0.024986,0.974669]
#.........这里部分代码省略.........
示例10: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU2 and ensures that the output matches specified values.
This will be used to do nightly checks to make sure nothing is broken. '''
workdir = os.getcwd()
# environment variables for SU2
os.environ['TEST_HOME'] = '/home/ale11/.cruise/projects/parallel_regression/work'
os.environ['SU2_HOME'] = '/home/ale11/.cruise/projects/parallel_regression/work/SU2'
os.environ['SU2_RUN'] = '/home/ale11/.cruise/projects/parallel_regression/work/SU2/bin'
os.environ['PATH'] = os.environ['PATH'] + ':' + os.environ['SU2_RUN']
# sync Test Cases repo
os.chdir( os.environ['TEST_HOME'] )
os.system('git fetch')
os.system('git checkout develop')
os.system('git pull origin develop')
# sync SU2 repo
os.chdir( os.environ['SU2_HOME'] )
os.system('git fetch')
os.system('git checkout develop')
os.system('git pull origin develop')
# Build SU2_CFD in parallel using autoconf
os.system('./configure --prefix=$SU2_HOME --enable-mpi --with-cc=`which mpicc` --with-cxx=`which mpicxx` CXXFLAGS="-O3"')
os.system('make clean')
os.system('make install')
os.chdir(os.environ['SU2_RUN'])
if not os.path.exists("./SU2_CFD"):
print 'Could not build SU2_CFD'
sys.exit(1)
if not os.path.exists("./SU2_PRT"):
print 'Could not build SU2_PRT'
sys.exit(1)
os.chdir(workdir)
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-2.984481, 2.389875, 0.008865, 0.027854] #last 4 columns
channel.su2_exec = "parallel_computation.py -f"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-6.237188, -5.641250, 0.334843, 0.022206] #last 4 columns
naca0012.su2_exec = "parallel_computation.py -f"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-1.702502, 3.923373, -0.252116, 0.044396] #last 4 columns
wedge.su2_exec = "parallel_computation.py -f"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6_JST.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-4.701280, -4.154921, 0.270257, 0.019095] #last 4 columns
oneram6.su2_exec = "parallel_computation.py -f"
oneram6.timeout = 3200
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.233923, 0.259801, -0.166790, 0.012722] #last 4 columns
flatplate.su2_exec = "parallel_computation.py -f"
#.........这里部分代码省略.........
示例11: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU2 and ensures that the output matches specified values.
This will be used to do checks when code is pushed to github
to make sure nothing is broken. '''
test_list = []
#####################################
### Disc. adj. compressible Euler ###
#####################################
# Inviscid NACA0012
discadj_naca0012 = TestCase('discadj_naca0012')
discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012"
discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg"
discadj_naca0012.test_iter = 100
discadj_naca0012.test_vals = [-3.606841, -9.035214, -0.000000, 0.005688] #last 4 columns
discadj_naca0012.su2_exec = "parallel_computation.py -f"
discadj_naca0012.timeout = 1600
discadj_naca0012.tol = 0.00001
test_list.append(discadj_naca0012)
# Inviscid Cylinder 3D (multiple markers)
discadj_cylinder3D = TestCase('discadj_cylinder3D')
discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D"
discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg"
discadj_cylinder3D.test_iter = 5
discadj_cylinder3D.test_vals = [-3.720476, -4.039256, 0.000000, 0.000000] #last 4 columns
discadj_cylinder3D.su2_exec = "parallel_computation.py -f"
discadj_cylinder3D.timeout = 1600
discadj_cylinder3D.tol = 0.00001
test_list.append(discadj_cylinder3D)
####################################
### Disc. adj. compressible RANS ###
####################################
# Adjoint turbulent NACA0012 SA
discadj_rans_naca0012_sa = TestCase('discadj_rans_naca0012_sa')
discadj_rans_naca0012_sa.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
discadj_rans_naca0012_sa.test_iter = 10
discadj_rans_naca0012_sa.test_vals = [-1.751965, 0.485796, 0.182895, -0.000018] #last 4 columns
discadj_rans_naca0012_sa.su2_exec = "parallel_computation.py -f"
discadj_rans_naca0012_sa.timeout = 1600
discadj_rans_naca0012_sa.tol = 0.00001
test_list.append(discadj_rans_naca0012_sa)
# Adjoint turbulent NACA0012 SST
discadj_rans_naca0012_sst = TestCase('discadj_rans_naca0012_sst')
discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
discadj_rans_naca0012_sst.test_iter = 10
discadj_rans_naca0012_sst.test_vals = [-1.654193, -0.499281, 0.145545, -0.000018] #last 4 columns
discadj_rans_naca0012_sst.su2_exec = "parallel_computation.py -f"
discadj_rans_naca0012_sst.timeout = 1600
discadj_rans_naca0012_sst.tol = 0.00001
test_list.append(discadj_rans_naca0012_sst)
#######################################
### Disc. adj. incompressible Euler ###
#######################################
# Adjoint Incompressible Inviscid NACA0012
discadj_incomp_NACA0012 = TestCase('discadj_incomp_NACA0012')
discadj_incomp_NACA0012.cfg_dir = "cont_adj_incomp_euler/naca0012"
discadj_incomp_NACA0012.cfg_file = "incomp_NACA0012_disc.cfg"
discadj_incomp_NACA0012.test_iter = 20
discadj_incomp_NACA0012.test_vals = [-2.917789, -2.714752, 0.000000, 0.000000] #last 4 columns
discadj_incomp_NACA0012.su2_exec = "parallel_computation.py -f"
discadj_incomp_NACA0012.timeout = 1600
discadj_incomp_NACA0012.tol = 0.00001
test_list.append(discadj_incomp_NACA0012)
#####################################
### Disc. adj. incompressible N-S ###
#####################################
# Adjoint Incompressible Viscous Cylinder
discadj_incomp_cylinder = TestCase('discadj_incomp_cylinder')
discadj_incomp_cylinder.cfg_dir = "cont_adj_incomp_navierstokes/cylinder"
discadj_incomp_cylinder.cfg_file = "lam_incomp_cylinder_disc.cfg"
discadj_incomp_cylinder.test_iter = 20
discadj_incomp_cylinder.test_vals = [-2.727423, -2.272530, 0.000000, 0.000000] #last 4 columns
discadj_incomp_cylinder.su2_exec = "parallel_computation.py -f"
discadj_incomp_cylinder.timeout = 1600
discadj_incomp_cylinder.tol = 0.00001
test_list.append(discadj_incomp_cylinder)
######################################
### Disc. adj. incompressible RANS ###
######################################
# Adjoint Incompressible Turbulent NACA 0012
discadj_incomp_turb_NACA0012 = TestCase('discadj_incomp_turb_NACA0012')
discadj_incomp_turb_NACA0012.cfg_dir = "incomp_rans/naca0012"
discadj_incomp_turb_NACA0012.cfg_file = "naca0012_disc.cfg"
discadj_incomp_turb_NACA0012.test_iter = 100
discadj_incomp_turb_NACA0012.test_vals = [-3.645810, -1.625922, 0.000000, 0.000000] #last 4 columns
discadj_incomp_turb_NACA0012.su2_exec = "parallel_computation.py -f"
#.........这里部分代码省略.........
示例12: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU2 and ensures that the output matches specified values.
This will be used to do checks when code is pushed to github
to make sure nothing is broken. '''
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-3.071007, 2.301191, 0.008562, 0.028922] #last 4 columns
channel.su2_exec = "parallel_computation.py -f"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-6.237188, -5.641250, 0.334843, 0.022206] #last 4 columns
naca0012.su2_exec = "parallel_computation.py -f"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-1.690232, 3.924432, -0.252221, 0.044419] #last 4 columns
wedge.su2_exec = "parallel_computation.py -f"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-13.400678, -12.932056, 0.282557, 0.012706] #last 4 columns
oneram6.su2_exec = "parallel_computation.py -f"
oneram6.timeout = 3200
oneram6.tol = 0.00001
test_list.append(oneram6)
# Fixed CL NACA0012
fixedCL_naca0012 = TestCase('fixedcl_naca0012')
fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012"
fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg"
fixedCL_naca0012.test_iter = 500
fixedCL_naca0012.test_vals = [-5.930145,-0.546310,0.300089,0.019393] #last 4 columns
fixedCL_naca0012.su2_exec = "parallel_computation.py -f"
fixedCL_naca0012.timeout = 1600
fixedCL_naca0012.tol = 0.00001
test_list.append(fixedCL_naca0012)
# Polar sweep of the inviscid NACA0012
polar_naca0012 = TestCase('polar_naca0012')
polar_naca0012.cfg_dir = "polar/naca0012"
polar_naca0012.cfg_file = "inv_NACA0012.cfg"
polar_naca0012.polar = True
polar_naca0012.test_iter = 10
polar_naca0012.test_vals = [-1.298373, 4.139860, 0.010703, 0.008932] #last 4 columns
polar_naca0012.su2_exec = "compute_polar.py -i 11"
polar_naca0012.timeout = 1600
polar_naca0012.tol = 0.00001
test_list.append(polar_naca0012)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.231727, 0.261637, -0.166869, 0.012707] #last 4 columns
flatplate.su2_exec = "parallel_computation.py -f"
flatplate.timeout = 1600
flatplate.tol = 0.00001
test_list.append(flatplate)
# Laminar cylinder (steady)
cylinder = TestCase('cylinder')
cylinder.cfg_dir = "navierstokes/cylinder"
cylinder.cfg_file = "lam_cylinder.cfg"
cylinder.test_iter = 25
cylinder.test_vals = [-6.757291, -1.289309, -0.125948, 0.625438] #last 4 columns
#.........这里部分代码省略.........
示例13: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU2 and ensures that the output matches specified values.
This will be used to do checks when code is pushed to github
to make sure nothing is broken. '''
test_list = []
#####################################
### Disc. adj. compressible Euler ###
#####################################
# Inviscid NACA0012
discadj_naca0012 = TestCase('discadj_naca0012')
discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012"
discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg"
discadj_naca0012.test_iter = 100
discadj_naca0012.test_vals = [-3.606839, -9.035212, -0.000000, 0.005688] #last 4 columns
discadj_naca0012.su2_exec = "SU2_CFD_AD"
discadj_naca0012.timeout = 1600
discadj_naca0012.tol = 0.00001
test_list.append(discadj_naca0012)
# Inviscid Cylinder 3D (multiple markers)
discadj_cylinder3D = TestCase('discadj_cylinder3D')
discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D"
discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg"
discadj_cylinder3D.test_iter = 5
discadj_cylinder3D.test_vals = [-3.724711, -4.052467, -0.000000, 0.000000] #last 4 columns
discadj_cylinder3D.su2_exec = "SU2_CFD_AD"
discadj_cylinder3D.timeout = 1600
discadj_cylinder3D.tol = 0.00001
test_list.append(discadj_cylinder3D)
# Arina nozzle 2D
discadj_arina2k = TestCase('discadj_arina2k')
discadj_arina2k.cfg_dir = "disc_adj_euler/arina2k"
discadj_arina2k.cfg_file = "Arina2KRS.cfg"
discadj_arina2k.test_iter = 20
discadj_arina2k.test_vals = [-0.774805, -0.801209, 3.1979e+02, 0.0000e+00] #last 4 columns
discadj_arina2k.su2_exec = "SU2_CFD_AD"
discadj_arina2k.timeout = 8400
discadj_arina2k.tol = 0.00001
test_list.append(discadj_arina2k)
#######################################################
### Disc. adj. compressible RANS ###
#######################################################
# Adjoint turbulent NACA0012 SA
discadj_rans_naca0012_sa = TestCase('discadj_rans_naca0012_sa')
discadj_rans_naca0012_sa.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
discadj_rans_naca0012_sa.test_iter = 10
discadj_rans_naca0012_sa.test_vals = [-1.751962, 0.485751, 0.182121, -0.000018] #last 4 columns
discadj_rans_naca0012_sa.su2_exec = "SU2_CFD_AD"
discadj_rans_naca0012_sa.timeout = 1600
discadj_rans_naca0012_sa.tol = 0.00001
test_list.append(discadj_rans_naca0012_sa)
# Adjoint turbulent NACA0012 SST
discadj_rans_naca0012_sst = TestCase('discadj_rans_naca0012_sst')
discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
discadj_rans_naca0012_sst.test_iter = 10
discadj_rans_naca0012_sst.test_vals = [-1.654903, -0.491485, 0.109157, 0.000011] #last 4 columns
discadj_rans_naca0012_sst.su2_exec = "SU2_CFD_AD"
discadj_rans_naca0012_sst.timeout = 1600
discadj_rans_naca0012_sst.tol = 0.00001
test_list.append(discadj_rans_naca0012_sst)
#######################################
### Disc. adj. incompressible Euler ###
#######################################
# Adjoint Incompressible Inviscid NACA0012
discadj_incomp_NACA0012 = TestCase('discadj_incomp_NACA0012')
discadj_incomp_NACA0012.cfg_dir = "disc_adj_incomp_euler/naca0012"
discadj_incomp_NACA0012.cfg_file = "incomp_NACA0012_disc.cfg"
discadj_incomp_NACA0012.test_iter = 20
discadj_incomp_NACA0012.test_vals = [-3.633197, -2.544956, 0.000000, 0.000000] #last 4 columns
discadj_incomp_NACA0012.su2_exec = "SU2_CFD_AD"
discadj_incomp_NACA0012.timeout = 1600
discadj_incomp_NACA0012.tol = 0.00001
test_list.append(discadj_incomp_NACA0012)
#####################################
### Disc. adj. incompressible N-S ###
#####################################
# Adjoint Incompressible Viscous Cylinder (Heated)
discadj_incomp_cylinder = TestCase('discadj_incomp_cylinder')
discadj_incomp_cylinder.cfg_dir = "disc_adj_incomp_navierstokes/cylinder"
discadj_incomp_cylinder.cfg_file = "heated_cylinder.cfg"
discadj_incomp_cylinder.test_iter = 20
discadj_incomp_cylinder.test_vals = [-2.374306, -2.371564, 0.000000, 0.000000] #last 4 columns
discadj_incomp_cylinder.su2_exec = "SU2_CFD_AD"
discadj_incomp_cylinder.timeout = 1600
discadj_incomp_cylinder.tol = 0.00001
test_list.append(discadj_incomp_cylinder)
#.........这里部分代码省略.........
示例14: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU2 and ensures that the output matches specified values.
This will be used to do checks when code is pushed to github
to make sure nothing is broken. '''
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-3.110240, 2.263506, 0.008686, 0.029098] #last 4 columns
channel.su2_exec = "SU2_CFD"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-6.191618, -5.592802, 0.334809, 0.022197] #last 4 columns
naca0012.su2_exec = "SU2_CFD"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-1.711318, 3.913749, -0.252131, 0.044402] #last 4 columns
wedge.su2_exec = "SU2_CFD"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-13.393130, -12.928941, 0.282557, 0.012706] #last 4 columns
oneram6.su2_exec = "SU2_CFD"
oneram6.timeout = 9600
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.231916, 0.261866, -0.166832, 0.012717] #last 4 columns
flatplate.su2_exec = "SU2_CFD"
flatplate.timeout = 1600
flatplate.tol = 0.00001
test_list.append(flatplate)
# Laminar cylinder (steady)
cylinder = TestCase('cylinder')
cylinder.cfg_dir = "navierstokes/cylinder"
cylinder.cfg_file = "lam_cylinder.cfg"
cylinder.test_iter = 25
cylinder.test_vals = [-6.765426, -1.297422, 0.019496, 0.310082] #last 4 columns
cylinder.su2_exec = "SU2_CFD"
cylinder.timeout = 1600
cylinder.tol = 0.00001
test_list.append(cylinder)
##########################
### Compressible RANS ###
##########################
# RAE2822 SA
rae2822_sa = TestCase('rae2822_sa')
rae2822_sa.cfg_dir = "rans/rae2822"
rae2822_sa.cfg_file = "turb_SA_RAE2822.cfg"
rae2822_sa.test_iter = 100
rae2822_sa.test_vals = [-3.442524, -5.441383, 0.884279, 0.024730] #last 4 columns
rae2822_sa.su2_exec = "SU2_CFD"
rae2822_sa.timeout = 1600
rae2822_sa.tol = 0.00001
test_list.append(rae2822_sa)
# RAE2822 SST
rae2822_sst = TestCase('rae2822_sst')
rae2822_sst.cfg_dir = "rans/rae2822"
rae2822_sst.cfg_file = "turb_SST_RAE2822.cfg"
#.........这里部分代码省略.........
示例15: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import test_iter [as 别名]
def main():
'''This program runs SU^2 and ensures that the output matches specified values.
This will be used to do nightly checks to make sure nothing is broken. '''
workdir = os.getcwd()
# environment variables for SU2
os.environ['SU2_HOME'] = '/home/ale11/.cruise/projects/parallel_regression/work/SU2'
os.environ['SU2_RUN'] = '/home/ale11/.cruise/projects/parallel_regression/work/SU2/bin'
os.environ['PATH'] = os.environ['PATH'] + ':' + os.environ['SU2_RUN']
# sync SU2 repo
os.chdir( os.environ['SU2_HOME'] )
os.system('git pull')
# Build SU2_CFD in parallel using autoconf
os.system('./configure --prefix=$SU2_HOME --with-MPI=mpicxx CXXFLAGS="-O3"')
os.system('make clean')
os.system('make install')
os.chdir(os.environ['SU2_RUN'])
if not os.path.exists("./SU2_CFD"):
print 'Could not build SU2_CFD'
sys.exit(1)
if not os.path.exists("./SU2_PRT"):
print 'Could not build SU2_PRT'
sys.exit(1)
os.chdir(workdir)
test_list = []
##########################
### Compressible Euler ###
##########################
# Channel
channel = TestCase('channel')
channel.cfg_dir = "euler/channel"
channel.cfg_file = "inv_channel_RK.cfg"
channel.test_iter = 100
channel.test_vals = [-2.413846,2.965840,0.007590,0.051651]
channel.su2_exec = "parallel_computation.py -f"
channel.timeout = 1600
channel.tol = 0.00001
test_list.append(channel)
# NACA0012
naca0012 = TestCase('naca0012')
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 100
naca0012.test_vals = [-3.751809,-3.271265,0.136604,0.066791]
naca0012.su2_exec = "parallel_computation.py -f"
naca0012.timeout = 1600
naca0012.tol = 0.00001
test_list.append(naca0012)
# Supersonic wedge
wedge = TestCase('wedge')
wedge.cfg_dir = "euler/wedge"
wedge.cfg_file = "inv_wedge_HLLC.cfg"
wedge.test_iter = 100
wedge.test_vals = [-2.694577,3.148295,-0.252137,0.044398]
wedge.su2_exec = "parallel_computation.py -f"
wedge.timeout = 1600
wedge.tol = 0.00001
test_list.append(wedge)
# ONERA M6 Wing
oneram6 = TestCase('oneram6')
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6_JST.cfg"
oneram6.test_iter = 10
oneram6.test_vals = [-4.819412,-4.286432,0.288842,0.016334]
oneram6.su2_exec = "parallel_computation.py -f"
oneram6.timeout = 3200
oneram6.tol = 0.00001
test_list.append(oneram6)
##########################
### Compressible N-S ###
##########################
# Laminar flat plate
flatplate = TestCase('flatplate')
flatplate.cfg_dir = "navierstokes/flatplate"
flatplate.cfg_file = "lam_flatplate.cfg"
flatplate.test_iter = 100
flatplate.test_vals = [-5.142353,0.347570,0.029870,0.015971]
flatplate.su2_exec = "parallel_computation.py -f"
flatplate.timeout = 1600
flatplate.tol = 0.00001
test_list.append(flatplate)
# Laminar cylinder (steady)
cylinder = TestCase('cylinder')
cylinder.cfg_dir = "navierstokes/cylinder"
cylinder.cfg_file = "lam_cylinder.cfg"
#.........这里部分代码省略.........