本文整理汇总了Python中TestCase.TestCase.run_geo方法的典型用法代码示例。如果您正苦于以下问题:Python TestCase.run_geo方法的具体用法?Python TestCase.run_geo怎么用?Python TestCase.run_geo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestCase.TestCase
的用法示例。
在下文中一共展示了TestCase.run_geo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import run_geo [as 别名]
#.........这里部分代码省略.........
dynbeam2d.timeout = 1600
dynbeam2d.tol = 0.00001
test_list.append(dynbeam2d)
# FSI, 2d
fsi2d = TestCase("fsi2d")
fsi2d.cfg_dir = "fea_fsi/WallChannel_2d"
fsi2d.cfg_file = "configFSI_2D.cfg"
fsi2d.test_iter = 4
fsi2d.test_vals = [2, 0.500000, -7.779713, -1.141613] # last 4 columns
fsi2d.su2_exec = "SU2_CFD"
fsi2d.timeout = 1600
fsi2d.tol = 0.00001
test_list.append(fsi2d)
######################################
### RUN TESTS ###
######################################
pass_list = [test.run_test() for test in test_list]
######################################
### RUN SU2_GEO TESTS ###
######################################
# NACA0012
naca0012_geo = TestCase("naca0012_geo")
naca0012_geo.cfg_dir = "optimization_euler/steady_naca0012"
naca0012_geo.cfg_file = "inv_NACA0012_adv.cfg"
naca0012_geo.test_vals = [0.120011, 0.0816925, 0.0, 1.0] # max thickness, area, twist, chord
naca0012_geo.su2_exec = "SU2_GEO"
naca0012_geo.timeout = 1600
naca0012_geo.tol = 0.00001
pass_list.append(naca0012_geo.run_geo())
test_list.append(naca0012_geo)
######################################
### RUN SU2_DEF TESTS ###
######################################
# RAE2822
rae2822_def = TestCase("rae2822_def")
rae2822_def.cfg_dir = "optimization_rans/steady_rae2822"
rae2822_def.cfg_file = "def_SA_RAE2822.cfg"
rae2822_def.test_iter = 100
rae2822_def.test_vals = [8.06616e-14] # residual
rae2822_def.su2_exec = "SU2_DEF"
rae2822_def.timeout = 1600
rae2822_def.tol = 1e-14
pass_list.append(rae2822_def.run_def())
test_list.append(rae2822_def)
# Inviscid ONERAM6
oneram6_sa_def = TestCase("oneram6_sa_def")
oneram6_sa_def.cfg_dir = "optimization_euler/steady_oneram6"
oneram6_sa_def.cfg_file = "def_ONERAM6.cfg"
oneram6_sa_def.test_iter = 600
oneram6_sa_def.test_vals = [3.46695e-13] # residual
oneram6_sa_def.su2_exec = "SU2_DEF"
oneram6_sa_def.timeout = 1600
oneram6_sa_def.tol = 1e-13
pass_list.append(oneram6_sa_def.run_def())
test_list.append(oneram6_sa_def)
示例2: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import run_geo [as 别名]
#.........这里部分代码省略.........
test_list.append(dynbeam2d)
# FSI, 2d
fsi2d = TestCase('fsi2d')
fsi2d.cfg_dir = "fea_fsi/WallChannel_2d"
fsi2d.cfg_file = "configFSI_2D.cfg"
fsi2d.test_iter = 4
fsi2d.test_vals = [2.000000, 0.500000, -7.777916, -1.139835] #last 4 columns
fsi2d.su2_exec = "SU2_CFD"
fsi2d.timeout = 1600
fsi2d.tol = 0.00001
test_list.append(fsi2d)
######################################
### RUN TESTS ###
######################################
pass_list = [ test.run_test() for test in test_list ]
######################################
### RUN SU2_GEO TESTS ###
######################################
# NACA0012
naca0012_geo = TestCase('naca0012_geo')
naca0012_geo.cfg_dir = "optimization_euler/steady_naca0012"
naca0012_geo.cfg_file = "inv_NACA0012_adv.cfg"
naca0012_geo.test_vals = [0.120011, 0.0816925, 0.0, 1.0] #max thickness, area, twist, chord
naca0012_geo.su2_exec = "SU2_GEO"
naca0012_geo.timeout = 1600
naca0012_geo.tol = 0.00001
pass_list.append(naca0012_geo.run_geo())
test_list.append(naca0012_geo)
######################################
### RUN SU2_DEF TESTS ###
######################################
# Inviscid NACA0012 (triangles)
naca0012_def = TestCase('naca0012_def')
naca0012_def.cfg_dir = "deformation/naca0012"
naca0012_def.cfg_file = "def_NACA0012.cfg"
naca0012_def.test_iter = 400
naca0012_def.test_vals = [4.30698e-15] #residual
naca0012_def.su2_exec = "SU2_DEF"
naca0012_def.timeout = 1600
naca0012_def.tol = 1e-15
pass_list.append(naca0012_def.run_def())
test_list.append(naca0012_def)
# RAE2822 (mixed tris + quads)
rae2822_def = TestCase('rae2822_def')
rae2822_def.cfg_dir = "deformation/rae2822"
rae2822_def.cfg_file = "def_RAE2822.cfg"
rae2822_def.test_iter = 150
rae2822_def.test_vals = [5.59336e-16] #residual
rae2822_def.su2_exec = "SU2_DEF"
rae2822_def.timeout = 1600
rae2822_def.tol = 1e-16
pass_list.append(rae2822_def.run_def())
test_list.append(rae2822_def)