Ejemplo n.º 1
0
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.769374, 3.848733, -0.252191,
                       0.044410]  #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)

    # 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.850123, -1.388088, -0.056090,
                                  108.140177]  #last 4 columns
    cylinder_lowmach.su2_exec = "SU2_CFD"
    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"
    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"
    rae2822_sst.test_iter = 100
    rae2822_sst.test_vals = [-1.185243, 4.018464, 0.886786,
                             0.024927]  #last 4 columns
    rae2822_sst.su2_exec = "SU2_CFD"
    rae2822_sst.timeout = 1600
    rae2822_sst.tol = 0.00001
    test_list.append(rae2822_sst)

    # Flat plate
    turb_flatplate = TestCase('turb_flatplate')
    turb_flatplate.cfg_dir = "rans/flatplate"
    turb_flatplate.cfg_file = "turb_SA_flatplate.cfg"
    turb_flatplate.test_iter = 100
    turb_flatplate.test_vals = [-5.069447, -7.354601, -0.187187,
                                0.010831]  #last 4 columns
    turb_flatplate.su2_exec = "SU2_CFD"
    turb_flatplate.timeout = 1600
    turb_flatplate.tol = 0.00001
    test_list.append(turb_flatplate)

    # ONERA M6 Wing
    turb_oneram6 = TestCase('turb_oneram6')
    turb_oneram6.cfg_dir = "rans/oneram6"
    turb_oneram6.cfg_file = "turb_ONERAM6.cfg"
    turb_oneram6.test_iter = 10
    turb_oneram6.test_vals = [-2.327509, -6.563372, 0.230438,
                              0.155815]  #last 4 columns
    turb_oneram6.su2_exec = "SU2_CFD"
    turb_oneram6.timeout = 3200
    turb_oneram6.tol = 0.00001
    test_list.append(turb_oneram6)

    # NACA0012 (SA, FUN3D results for finest grid: CL=1.0983, CD=0.01242)
    turb_naca0012_sa = TestCase('turb_naca0012_sa')
    turb_naca0012_sa.cfg_dir = "rans/naca0012"
    turb_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
    turb_naca0012_sa.test_iter = 10
    turb_naca0012_sa.test_vals = [-12.000763, -9.145363, 1.070528,
                                  0.019417]  #last 4 columns
    turb_naca0012_sa.su2_exec = "SU2_CFD"
    turb_naca0012_sa.timeout = 3200
    turb_naca0012_sa.tol = 0.00001
    test_list.append(turb_naca0012_sa)

    # NACA0012 (SST, FUN3D results for finest grid: CL=1.0840, CD=0.01253)
    turb_naca0012_sst = TestCase('turb_naca0012_sst')
    turb_naca0012_sst.cfg_dir = "rans/naca0012"
    turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
    turb_naca0012_sst.test_iter = 10
    turb_naca0012_sst.test_vals = [-15.039675, -7.219913, 1.059622,
                                   0.019138]  #last 4 columns
    turb_naca0012_sst.su2_exec = "SU2_CFD"
    turb_naca0012_sst.timeout = 3200
    turb_naca0012_sst.tol = 0.00001
    test_list.append(turb_naca0012_sst)

    ############################
    ### Incompressible RANS  ###
    ############################

    # NACA0012
    inc_turb_naca0012 = TestCase('inc_turb_naca0012')
    inc_turb_naca0012.cfg_dir = "incomp_rans/naca0012"
    inc_turb_naca0012.cfg_file = "naca0012.cfg"
    inc_turb_naca0012.test_iter = 20
    inc_turb_naca0012.test_vals = [-4.710052, -11.007500, -0.000001,
                                   0.210445]  #last 4 columns
    inc_turb_naca0012.su2_exec = "SU2_CFD"
    inc_turb_naca0012.timeout = 1600
    inc_turb_naca0012.tol = 0.00001
    test_list.append(inc_turb_naca0012)

    #####################################
    ### Cont. adj. compressible Euler ###
    #####################################

    # Inviscid NACA0012
    contadj_naca0012 = TestCase('contadj_naca0012')
    contadj_naca0012.cfg_dir = "cont_adj_euler/naca0012"
    contadj_naca0012.cfg_file = "inv_NACA0012.cfg"
    contadj_naca0012.test_iter = 5
    contadj_naca0012.test_vals = [-9.787554, -15.192510, 0.300920,
                                  0.536870]  #last 4 columns
    contadj_naca0012.su2_exec = "SU2_CFD"
    contadj_naca0012.timeout = 1600
    contadj_naca0012.tol = 0.00001
    test_list.append(contadj_naca0012)

    # Inviscid ONERA M6
    contadj_oneram6 = TestCase('contadj_oneram6')
    contadj_oneram6.cfg_dir = "cont_adj_euler/oneram6"
    contadj_oneram6.cfg_file = "inv_ONERAM6.cfg"
    contadj_oneram6.test_iter = 10
    contadj_oneram6.test_vals = [
        -12.133352, -12.707213, 6.8590e-01, 1.4092e-01
    ]  #last 4 columns
    contadj_oneram6.su2_exec = "SU2_CFD"
    contadj_oneram6.timeout = 1600
    contadj_oneram6.tol = 0.00001
    test_list.append(contadj_oneram6)

    # Inviscid WEDGE: tests generalized adjoint
    contadj_wedge = TestCase('contadj_wedge')
    contadj_wedge.cfg_dir = "cont_adj_euler/wedge"
    contadj_wedge.cfg_file = "inv_wedge_ROE.cfg"
    contadj_wedge.test_iter = 10
    contadj_wedge.test_vals = [
        2.780403, -3.223266, -1448300.000000, -0.000004
    ]  #last 4 columns
    contadj_wedge.su2_exec = "SU2_CFD"
    contadj_wedge.timeout = 1600
    contadj_wedge.tol = 0.00001
    test_list.append(contadj_wedge)

    ###################################
    ### Cont. adj. compressible N-S ###
    ###################################

    # Adjoint laminar cylinder
    contadj_ns_cylinder = TestCase('contadj_ns_cylinder')
    contadj_ns_cylinder.cfg_dir = "cont_adj_navierstokes/cylinder"
    contadj_ns_cylinder.cfg_file = "lam_cylinder.cfg"
    contadj_ns_cylinder.test_iter = 100
    contadj_ns_cylinder.test_vals = [-3.677184, -9.141850, 2.056700,
                                     4.497000]  #last 4 columns
    contadj_ns_cylinder.su2_exec = "SU2_CFD"
    contadj_ns_cylinder.timeout = 1600
    contadj_ns_cylinder.tol = 0.00001
    test_list.append(contadj_ns_cylinder)

    # Adjoint laminar naca0012 subsonic
    contadj_ns_naca0012_sub = TestCase('contadj_ns_naca0012_sub')
    contadj_ns_naca0012_sub.cfg_dir = "cont_adj_navierstokes/naca0012_sub"
    contadj_ns_naca0012_sub.cfg_file = "lam_NACA0012.cfg"
    contadj_ns_naca0012_sub.test_iter = 100
    contadj_ns_naca0012_sub.test_vals = [
        -2.744551, -8.216469, 0.518810, 0.229160
    ]  #last 4 columns
    contadj_ns_naca0012_sub.su2_exec = "SU2_CFD"
    contadj_ns_naca0012_sub.timeout = 1600
    contadj_ns_naca0012_sub.tol = 0.00001
    test_list.append(contadj_ns_naca0012_sub)

    # Adjoint laminar naca0012 transonic
    contadj_ns_naca0012_trans = TestCase('contadj_ns_naca0012_trans')
    contadj_ns_naca0012_trans.cfg_dir = "cont_adj_navierstokes/naca0012_trans"
    contadj_ns_naca0012_trans.cfg_file = "lam_NACA0012.cfg"
    contadj_ns_naca0012_trans.test_iter = 100
    contadj_ns_naca0012_trans.test_vals = [
        -1.041539, -6.578524, 1.772300, 0.620880
    ]  #last 4 columns
    contadj_ns_naca0012_trans.su2_exec = "SU2_CFD"
    contadj_ns_naca0012_trans.timeout = 1600
    contadj_ns_naca0012_trans.tol = 0.00001
    test_list.append(contadj_ns_naca0012_trans)

    #######################################################
    ### Cont. adj. compressible RANS (frozen viscosity) ###
    #######################################################

    # Adjoint turbulent NACA0012
    contadj_rans_naca0012 = TestCase('contadj_rans_naca0012')
    contadj_rans_naca0012.cfg_dir = "cont_adj_rans/naca0012"
    contadj_rans_naca0012.cfg_file = "turb_nasa.cfg"
    contadj_rans_naca0012.test_iter = 100
    contadj_rans_naca0012.test_vals = [
        -0.814757, -5.726517, 19.169000, -2.994100
    ]  #last 4 columns
    contadj_rans_naca0012.su2_exec = "SU2_CFD"
    contadj_rans_naca0012.timeout = 1600
    contadj_rans_naca0012.tol = 0.00001
    test_list.append(contadj_rans_naca0012)

    # Adjoint turbulent RAE2822
    contadj_rans_rae2822 = TestCase('contadj_rans_rae2822')
    contadj_rans_rae2822.cfg_dir = "cont_adj_rans/rae2822"
    contadj_rans_rae2822.cfg_file = "turb_SA_RAE2822.cfg"
    contadj_rans_rae2822.test_iter = 100
    contadj_rans_rae2822.test_vals = [
        -5.377843, -10.882446, -0.212470, 0.269390
    ]  #last 4 columns
    contadj_rans_rae2822.su2_exec = "SU2_CFD"
    contadj_rans_rae2822.timeout = 1600
    contadj_rans_rae2822.tol = 0.00001
    test_list.append(contadj_rans_rae2822)

    #######################################
    ### Cont. adj. incompressible Euler ###
    #######################################

    # Adjoint Incompressible Inviscid NACA0012
    contadj_incomp_NACA0012 = TestCase('contadj_incomp_NACA0012')
    contadj_incomp_NACA0012.cfg_dir = "cont_adj_incomp_euler/naca0012"
    contadj_incomp_NACA0012.cfg_file = "incomp_NACA0012.cfg"
    contadj_incomp_NACA0012.test_iter = 5
    contadj_incomp_NACA0012.test_vals = [
        -11.980272, -12.146779, 1.9399, 0.000000
    ]  #last 4 columns
    contadj_incomp_NACA0012.su2_exec = "SU2_CFD"
    contadj_incomp_NACA0012.timeout = 1600
    contadj_incomp_NACA0012.tol = 0.00001
    test_list.append(contadj_incomp_NACA0012)

    #####################################
    ### Cont. adj. incompressible N-S ###
    #####################################

    # Adjoint Incompressible Viscous Cylinder
    contadj_incomp_cylinder = TestCase('contadj_incomp_cylinder')
    contadj_incomp_cylinder.cfg_dir = "cont_adj_incomp_navierstokes/cylinder"
    contadj_incomp_cylinder.cfg_file = "lam_incomp_cylinder.cfg"
    contadj_incomp_cylinder.test_iter = 25
    contadj_incomp_cylinder.test_vals = [
        -5.718622, -7.027366, 2.932100, 0.000000
    ]  #last 4 columns
    contadj_incomp_cylinder.su2_exec = "SU2_CFD"
    contadj_incomp_cylinder.timeout = 1600
    contadj_incomp_cylinder.tol = 0.00001
    test_list.append(contadj_incomp_cylinder)

    #    ######################################
    #    ### Spectral Method                ###
    #    ######################################
    #    spectral           = TestCase('spectral')
    #    spectral.cfg_dir   = "spectral_method"
    #    spectral.cfg_file  = "spectral.cfg"
    #    spectral.test_iter = 25
    #    spectral.test_vals = [-1.621870,3.852164,0.007465,0.084358]
    #    spectral.su2_exec  = "SU2_CFD"
    #    spectral.timeout   = 1600
    #    spectral.tol       = 0.00001
    #    test_list.append(spectral)

    ######################################
    ### Moving Wall                    ###
    ######################################

    # Lid-driven cavity
    cavity = TestCase('cavity')
    cavity.cfg_dir = "moving_wall/cavity"
    cavity.cfg_file = "lam_cavity.cfg"
    cavity.test_iter = 25
    cavity.test_vals = [-5.627934, -0.164470, 0.051972,
                        2.547034]  #last 4 columns
    cavity.su2_exec = "SU2_CFD"
    cavity.timeout = 1600
    cavity.tol = 0.00001
    test_list.append(cavity)

    # Spinning cylinder
    spinning_cylinder = TestCase('spinning_cylinder')
    spinning_cylinder.cfg_dir = "moving_wall/spinning_cylinder"
    spinning_cylinder.cfg_file = "spinning_cylinder.cfg"
    spinning_cylinder.test_iter = 25
    spinning_cylinder.test_vals = [-7.709662, -2.274900, 1.418422,
                                   1.734206]  #last 4 columns
    spinning_cylinder.su2_exec = "SU2_CFD"
    spinning_cylinder.timeout = 1600
    spinning_cylinder.tol = 0.00001
    test_list.append(spinning_cylinder)

    ######################################
    ### Unsteady                       ###
    ######################################

    # Square cylinder
    square_cylinder = TestCase('square_cylinder')
    square_cylinder.cfg_dir = "unsteady/square_cylinder"
    square_cylinder.cfg_file = "turb_square.cfg"
    square_cylinder.test_iter = 3
    square_cylinder.test_vals = [-1.166406, 0.076804, 1.398548,
                                 2.197047]  #last 4 columns
    square_cylinder.su2_exec = "SU2_CFD"
    square_cylinder.timeout = 1600
    square_cylinder.tol = 0.00001
    square_cylinder.unsteady = True
    test_list.append(square_cylinder)

    # Gust
    sine_gust = TestCase('sine_gust')
    sine_gust.cfg_dir = "gust"
    sine_gust.cfg_file = "inv_gust_NACA0012.cfg"
    sine_gust.test_iter = 5
    sine_gust.test_vals = [-1.977531, 3.481790, -0.006222,
                           -0.001342]  #last 4 columns
    sine_gust.su2_exec = "SU2_CFD"
    sine_gust.timeout = 1600
    sine_gust.tol = 0.00001
    sine_gust.unsteady = True
    test_list.append(sine_gust)

    # Aeroelastic
    aeroelastic = TestCase('aeroelastic')
    aeroelastic.cfg_dir = "aeroelastic"
    aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
    aeroelastic.test_iter = 2
    aeroelastic.test_vals = [0.077106, 0.036449, -1.684916e-03,
                             -1.131735e-04]  #last 4 columns
    aeroelastic.su2_exec = "SU2_CFD"
    aeroelastic.timeout = 1600
    aeroelastic.tol = 0.000001
    aeroelastic.unsteady = True
    test_list.append(aeroelastic)

    ######################################
    ### NICFD                          ###
    ######################################

    # ls89_sa
    ls89_sa = TestCase('ls89_sa')
    ls89_sa.cfg_dir = "nicf/LS89"
    ls89_sa.cfg_file = "turb_SA_PR.cfg"
    ls89_sa.test_iter = 100
    ls89_sa.test_vals = [-5.062991, -13.374292, 0.128005,
                         0.323965]  #last 4 columns
    ls89_sa.su2_exec = "SU2_CFD"
    ls89_sa.timeout = 1600
    ls89_sa.tol = 0.00001
    test_list.append(ls89_sa)

    #    # ls89_sst
    #    ls89_sst           = TestCase('ls89_sst')
    #    ls89_sst.cfg_dir   = "nicf/LS89"
    #    ls89_sst.cfg_file  = "turb_SST_PR.cfg"
    #    ls89_sst.test_iter = 100
    #    ls89_sst.test_vals =  [-8.548266, -1.449437, 0.067986, 0.151168] #last 4 columns
    #    ls89_sst.su2_exec  = "SU2_CFD"
    #    ls89_sst.timeout   = 1600
    #    ls89_sst.tol       = 0.00001
    #    test_list.append(ls89_sst)

    # Rarefaction shock wave edge_VW
    edge_VW = TestCase('edge_VW')
    edge_VW.cfg_dir = "nicf/edge"
    edge_VW.cfg_file = "edge_VW.cfg"
    edge_VW.test_iter = 100
    edge_VW.test_vals = [-5.055874, 1.117978, -0.000009,
                         0.000000]  #last 4 columns
    edge_VW.su2_exec = "SU2_CFD"
    edge_VW.timeout = 1600
    edge_VW.tol = 0.00001
    test_list.append(edge_VW)

    # Rarefaction shock wave edge_PPR
    edge_PPR = TestCase('edge_PPR')
    edge_PPR.cfg_dir = "nicf/edge"
    edge_PPR.cfg_file = "edge_PPR.cfg"
    edge_PPR.test_iter = 100
    edge_PPR.test_vals = [-5.484387, 0.656352, -0.000037,
                          0.000000]  #last 4 columns
    edge_PPR.su2_exec = "SU2_CFD"
    edge_PPR.timeout = 1600
    edge_PPR.tol = 0.00001
    test_list.append(edge_PPR)

    ######################################
    ### turboSU2                       ###
    ######################################

    # Mini centrifugal turbine blade
    centrifugal_blade = TestCase('centrifugal_blade')
    centrifugal_blade.cfg_dir = "turbomachinery/centrifugal_blade"
    centrifugal_blade.cfg_file = "centrifugal_blade.cfg"
    centrifugal_blade.test_iter = 100
    centrifugal_blade.test_vals = [
        -9.106943, -0.460429, 1.069070e+01, 3.396010e-01
    ]  #last 4 columns
    centrifugal_blade.su2_exec = "SU2_CFD"
    centrifugal_blade.timeout = 1600
    centrifugal_blade.tol = 0.000001
    test_list.append(centrifugal_blade)

    # Mini centrifugal turbine stage
    centrifugal_stage = TestCase('centrifugal_stage')
    centrifugal_stage.cfg_dir = "turbomachinery/centrifugal_stage"
    centrifugal_stage.cfg_file = "centrifugal_stage.cfg"
    centrifugal_stage.test_iter = 100
    centrifugal_stage.test_vals = [
        -10.166364, 1.621172, 2.206476e+01, 5.271075e-01
    ]  #last 4 columns
    centrifugal_stage.su2_exec = "SU2_CFD"
    centrifugal_stage.timeout = 1600
    centrifugal_stage.tol = 0.000001
    test_list.append(centrifugal_stage)

    ##########################
    ### FEA - FSI          ###
    ##########################

    # Static beam, 3d
    statbeam3d = TestCase('statbeam3d')
    statbeam3d.cfg_dir = "fea_fsi/StatBeam_3d"
    statbeam3d.cfg_file = "configBeam_3d.cfg"
    statbeam3d.test_iter = 0
    statbeam3d.test_vals = [-8.498274, -8.230638, -8.123824,
                            6.4095e+04]  #last 4 columns
    statbeam3d.su2_exec = "SU2_CFD"
    statbeam3d.timeout = 1600
    statbeam3d.tol = 0.00001
    test_list.append(statbeam3d)

    # Dynamic beam, 2d
    dynbeam2d = TestCase('dynbeam2d')
    dynbeam2d.cfg_dir = "fea_fsi/DynBeam_2d"
    dynbeam2d.cfg_file = "configBeam_2d.cfg"
    dynbeam2d.test_iter = 6
    dynbeam2d.test_vals = [-9.420640, -5.365872, -12.430382,
                           6.5210e+04]  #last 4 columns
    dynbeam2d.su2_exec = "SU2_CFD"
    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.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)

    # Turb NACA4412 (quads, wall distance)
    naca4412_def = TestCase('naca4412_def')
    naca4412_def.cfg_dir = "deformation/naca4412"
    naca4412_def.cfg_file = "def_NACA4412.cfg"
    naca4412_def.test_iter = 300
    naca4412_def.test_vals = [3.26428e-15]  #residual
    naca4412_def.su2_exec = "SU2_DEF"
    naca4412_def.timeout = 1600
    naca4412_def.tol = 1e-15

    pass_list.append(naca4412_def.run_def())
    test_list.append(naca4412_def)

    # Brick of tets (inverse volume)
    brick_tets_def = TestCase('brick_tets_def')
    brick_tets_def.cfg_dir = "deformation/brick_tets"
    brick_tets_def.cfg_file = "def_brick_tets.cfg"
    brick_tets_def.test_iter = 50
    brick_tets_def.test_vals = [7.34025e-15]  #residual
    brick_tets_def.su2_exec = "SU2_DEF"
    brick_tets_def.timeout = 1600
    brick_tets_def.tol = 1e-15

    pass_list.append(brick_tets_def.run_def())
    test_list.append(brick_tets_def)

    # Brick of isotropic hexas (inverse volume)
    brick_hex_def = TestCase('brick_hex_def')
    brick_hex_def.cfg_dir = "deformation/brick_hex"
    brick_hex_def.cfg_file = "def_brick_hex.cfg"
    brick_hex_def.test_iter = 50
    brick_hex_def.test_vals = [1.55154e-15]  #residual
    brick_hex_def.su2_exec = "SU2_DEF"
    brick_hex_def.timeout = 1600
    brick_hex_def.tol = 1e-15

    pass_list.append(brick_hex_def.run_def())
    test_list.append(brick_hex_def)

    # Brick with a pyramid layer (inverse volume)
    brick_pyra_def = TestCase('brick_pyra_def')
    brick_pyra_def.cfg_dir = "deformation/brick_pyra"
    brick_pyra_def.cfg_file = "def_brick_pyra.cfg"
    brick_pyra_def.test_iter = 400
    brick_pyra_def.test_vals = [3.79432e-15]  #residual
    brick_pyra_def.su2_exec = "SU2_DEF"
    brick_pyra_def.timeout = 1600
    brick_pyra_def.tol = 1e-15

    pass_list.append(brick_pyra_def.run_def())
    test_list.append(brick_pyra_def)

    # Brick of isotropic prisms (inverse volume)
    brick_prism_def = TestCase('brick_prism_def')
    brick_prism_def.cfg_dir = "deformation/brick_prism"
    brick_prism_def.cfg_file = "def_brick_prism.cfg"
    brick_prism_def.test_iter = 150
    brick_prism_def.test_vals = [9.14366e-15]  #residual
    brick_prism_def.su2_exec = "SU2_DEF"
    brick_prism_def.timeout = 1600
    brick_prism_def.tol = 1e-15

    pass_list.append(brick_prism_def.run_def())
    test_list.append(brick_prism_def)

    # Brick of prisms with high aspect ratio cells near the wall (wall distance)
    brick_prism_rans_def = TestCase('brick_prism_rans_def')
    brick_prism_rans_def.cfg_dir = "deformation/brick_prism_rans"
    brick_prism_rans_def.cfg_file = "def_brick_prism_rans.cfg"
    brick_prism_rans_def.test_iter = 100
    brick_prism_rans_def.test_vals = [1.64462e-15]  #residual
    brick_prism_rans_def.su2_exec = "SU2_DEF"
    brick_prism_rans_def.timeout = 1600
    brick_prism_rans_def.tol = 1e-15

    pass_list.append(brick_prism_rans_def.run_def())
    test_list.append(brick_prism_rans_def)

    # Brick of hexas with high aspect ratio cells near the wall (inverse volume)
    brick_hex_rans_def = TestCase('brick_hex_rans_def')
    brick_hex_rans_def.cfg_dir = "deformation/brick_hex_rans"
    brick_hex_rans_def.cfg_file = "def_brick_hex_rans.cfg"
    brick_hex_rans_def.test_iter = 50
    brick_hex_rans_def.test_vals = [9.26657e-16]  #residual
    brick_hex_rans_def.su2_exec = "SU2_DEF"
    brick_hex_rans_def.timeout = 1600
    brick_hex_rans_def.tol = 1e-16

    pass_list.append(brick_hex_rans_def.run_def())
    test_list.append(brick_hex_rans_def)

    ######################################
    ### RUN PYTHON TESTS               ###
    ######################################

    # test continuous_adjoint.py
    contadj_euler_py = TestCase('contadj_euler_py')
    contadj_euler_py.cfg_dir = "cont_adj_euler/naca0012"
    contadj_euler_py.cfg_file = "inv_NACA0012.cfg"
    contadj_euler_py.test_iter = 10
    contadj_euler_py.su2_exec = "continuous_adjoint.py"
    contadj_euler_py.timeout = 1600
    contadj_euler_py.reference_file = "of_grad_cd.dat.ref"
    contadj_euler_py.test_file = "of_grad_cd.dat"
    pass_list.append(contadj_euler_py.run_filediff())
    test_list.append(contadj_euler_py)

    # test finite_difference.py
    findiff_euler_py = TestCase('findiff_euler_py')
    findiff_euler_py.cfg_dir = "cont_adj_euler/naca0012"
    findiff_euler_py.cfg_file = "inv_NACA0012_FD.cfg"
    findiff_euler_py.test_iter = 10
    findiff_euler_py.su2_exec = "finite_differences.py"
    findiff_euler_py.timeout = 1600
    findiff_euler_py.reference_file = "of_grad_findiff.dat.ref"
    findiff_euler_py.test_file = "FINDIFF/of_grad_findiff.dat"
    pass_list.append(findiff_euler_py.run_filediff())
    test_list.append(findiff_euler_py)

    # test shape_optimization.py
    shape_opt_euler_py = TestCase('shape_opt_euler_py')
    shape_opt_euler_py.cfg_dir = "optimization_euler/steady_naca0012"
    shape_opt_euler_py.cfg_file = "inv_NACA0012_adv.cfg"
    shape_opt_euler_py.test_iter = 1
    shape_opt_euler_py.test_vals = [1, 1, 2.134974E-05,
                                    3.829535E-03]  #last 4 columns
    shape_opt_euler_py.su2_exec = "shape_optimization.py -f"
    shape_opt_euler_py.timeout = 1600
    shape_opt_euler_py.tol = 0.00001
    pass_list.append(shape_opt_euler_py.run_opt())
    test_list.append(shape_opt_euler_py)

    # test continuous_adjoint.py, with multiple objectives
    contadj_multi_py = TestCase('contadj_multi_py')
    contadj_multi_py.cfg_dir = "cont_adj_euler/wedge"
    contadj_multi_py.cfg_file = "inv_wedge_ROE_multiobj.cfg"
    contadj_multi_py.test_iter = 10
    contadj_multi_py.su2_exec = "continuous_adjoint.py"
    contadj_multi_py.timeout = 1600
    contadj_multi_py.reference_file = "of_grad_combo.dat.ref"
    contadj_multi_py.test_file = "of_grad_combo.dat"
    pass_list.append(contadj_multi_py.run_filediff())
    test_list.append(contadj_multi_py)

    ##########################
    ###   Python wrapper   ###
    ##########################

    # NACA0012
    pywrapper_naca0012 = TestCase('pywrapper_naca0012')
    pywrapper_naca0012.cfg_dir = "euler/naca0012"
    pywrapper_naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
    pywrapper_naca0012.test_iter = 100
    pywrapper_naca0012.test_vals = [-6.191618, -5.592802, 0.334809,
                                    0.022197]  #last 4 columns
    pywrapper_naca0012.su2_exec = "pyWrap_SU2_CFD.py -f"
    pywrapper_naca0012.timeout = 1600
    pywrapper_naca0012.tol = 0.00001
    test_list.append(pywrapper_naca0012)
    pass_list.append(pywrapper_naca0012.run_test())

    # NACA0012 (SST, FUN3D results for finest grid: CL=1.0840, CD=0.01253)
    pywrapper_turb_naca0012_sst = TestCase('pywrapper_turb_naca0012_sst')
    pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012"
    pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
    pywrapper_turb_naca0012_sst.test_iter = 10
    pywrapper_turb_naca0012_sst.test_vals = [
        -15.039675, -7.219913, 1.059622, 0.019138
    ]  #last 4 columns
    pywrapper_turb_naca0012_sst.su2_exec = "pyWrap_SU2_CFD.py -f"
    pywrapper_turb_naca0012_sst.timeout = 3200
    pywrapper_turb_naca0012_sst.tol = 0.00001
    test_list.append(pywrapper_turb_naca0012_sst)
    pass_list.append(pywrapper_turb_naca0012_sst.run_test())

    # Square cylinder
    pywrapper_square_cylinder = TestCase('pywrapper_square_cylinder')
    pywrapper_square_cylinder.cfg_dir = "unsteady/square_cylinder"
    pywrapper_square_cylinder.cfg_file = "turb_square.cfg"
    pywrapper_square_cylinder.test_iter = 3
    pywrapper_square_cylinder.test_vals = [
        -1.166406, 0.076804, 1.398548, 2.197047
    ]  #last 4 columns
    pywrapper_square_cylinder.su2_exec = "pyWrap_SU2_CFD.py -f"
    pywrapper_square_cylinder.timeout = 1600
    pywrapper_square_cylinder.tol = 0.00001
    pywrapper_square_cylinder.unsteady = True
    test_list.append(pywrapper_square_cylinder)
    pass_list.append(pywrapper_square_cylinder.run_test())

    # Aeroelastic
    pywrapper_aeroelastic = TestCase('pywrapper_aeroelastic')
    pywrapper_aeroelastic.cfg_dir = "aeroelastic"
    pywrapper_aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
    pywrapper_aeroelastic.test_iter = 2
    pywrapper_aeroelastic.test_vals = [
        0.077106, 0.036449, -1.684916e-03, -1.131735e-04
    ]  #last 4 columns
    pywrapper_aeroelastic.su2_exec = "pyWrap_SU2_CFD.py -f"
    pywrapper_aeroelastic.timeout = 1600
    pywrapper_aeroelastic.tol = 0.000001
    pywrapper_aeroelastic.unsteady = True
    test_list.append(pywrapper_aeroelastic)
    pass_list.append(pywrapper_aeroelastic.run_test())

    # FSI, 2d
    pywrapper_fsi2d = TestCase('pywrapper_fsi2d')
    pywrapper_fsi2d.cfg_dir = "fea_fsi/WallChannel_2d"
    pywrapper_fsi2d.cfg_file = "configFSI_2D.cfg"
    pywrapper_fsi2d.test_iter = 4
    pywrapper_fsi2d.test_vals = [2.000000, 0.500000, -7.777916,
                                 -1.139835]  #last 4 columns
    pywrapper_fsi2d.su2_exec = "pyWrap_SU2_CFD.py --nZone 2 --fsi True -f"
    pywrapper_fsi2d.timeout = 1600
    pywrapper_fsi2d.tol = 0.00001
    test_list.append(pywrapper_fsi2d)
    pass_list.append(pywrapper_fsi2d.run_test())

    ######################################
    ### RUN EXTERNAL FSI COUPLING TEST ###
    ######################################

    # Pitch-plunge NACA 0012 (external FSI coupling)
    coupled_FSI = TestCase('coupled_FSI')
    coupled_FSI.cfg_dir = "coupled_fsi/2d_aeroelasticity"
    coupled_FSI.cfg_file = "FSICoupler_config.cfg"
    coupled_FSI.test_iter = 1
    coupled_FSI.su2_exec = "fsi_computation.py"
    coupled_FSI.timeout = 1600
    coupled_FSI.reference_file = "StructHistory.dat.ref_serial"
    coupled_FSI.test_file = "StructHistory.dat"
    pass_list.append(coupled_FSI.run_filediff())
    test_list.append(coupled_FSI)

    # Tests summary
    print '=================================================================='
    print 'Summary of the serial tests'
    for i, test in enumerate(test_list):
        if (pass_list[i]):
            print '  passed - %s' % test.tag
        else:
            print '* FAILED - %s' % test.tag

    if all(pass_list):
        sys.exit(0)
    else:
        sys.exit(1)
Ejemplo n.º 2
0
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.559002, -8.926022, -0.000000,
                                  0.005588]  #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.759637, -3.864023, -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 = [2.108283, 1.574295, 47250.0,
                                 0.0]  #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 = [
        -2.230556, 0.696586, 0.180740, -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 = [
        -2.221232, -0.492215, 0.557480, 0.000027
    ]  #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 = [20.0, -4.092007, -2.652750,
                                         0.0]  #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 = [
        20.000000, -2.374306, -2.371564, 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 SA
    discadj_incomp_turb_NACA0012_sa = TestCase(
        'discadj_incomp_turb_NACA0012_sa')
    discadj_incomp_turb_NACA0012_sa.cfg_dir = "disc_adj_incomp_rans/naca0012"
    discadj_incomp_turb_NACA0012_sa.cfg_file = "turb_naca0012_sa.cfg"
    discadj_incomp_turb_NACA0012_sa.test_iter = 10
    discadj_incomp_turb_NACA0012_sa.test_vals = [
        10.000000, -3.845979, -1.031095, 0.000000
    ]  #last 4 columns
    discadj_incomp_turb_NACA0012_sa.su2_exec = "SU2_CFD_AD"
    discadj_incomp_turb_NACA0012_sa.timeout = 1600
    discadj_incomp_turb_NACA0012_sa.tol = 0.00001
    test_list.append(discadj_incomp_turb_NACA0012_sa)

    # Adjoint Incompressible Turbulent NACA 0012 SST
    discadj_incomp_turb_NACA0012_sst = TestCase(
        'discadj_incomp_turb_NACA0012_sst')
    discadj_incomp_turb_NACA0012_sst.cfg_dir = "disc_adj_incomp_rans/naca0012"
    discadj_incomp_turb_NACA0012_sst.cfg_file = "turb_naca0012_sst.cfg"
    discadj_incomp_turb_NACA0012_sst.test_iter = 10
    discadj_incomp_turb_NACA0012_sst.test_vals = [
        -3.845577, -2.414021, -8.420183, 0.000000
    ]  #last 4 columns
    discadj_incomp_turb_NACA0012_sst.su2_exec = "SU2_CFD_AD"
    discadj_incomp_turb_NACA0012_sst.timeout = 1600
    discadj_incomp_turb_NACA0012_sst.tol = 0.00001
    test_list.append(discadj_incomp_turb_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 = 9
    discadj_cylinder.test_vals = [3.746909, -1.544883, -0.008321,
                                  0.000014]  #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)

    ##########################################################################
    ### Unsteady Disc. adj. compressible RANS DualTimeStepping 1st order   ###
    ##########################################################################

    # Turbulent Cylinder
    discadj_DT_1ST_cylinder = TestCase('unsteady_cylinder_DT_1ST')
    discadj_DT_1ST_cylinder.cfg_dir = "disc_adj_rans/cylinder_DT_1ST"
    discadj_DT_1ST_cylinder.cfg_file = "cylinder.cfg"
    discadj_DT_1ST_cylinder.test_iter = 9
    discadj_DT_1ST_cylinder.test_vals = [
        3.698168, -1.607050, -0.002159, 0.000028
    ]  #last 4 columns
    discadj_DT_1ST_cylinder.su2_exec = "SU2_CFD_AD"
    discadj_DT_1ST_cylinder.timeout = 1600
    discadj_DT_1ST_cylinder.tol = 0.00001
    discadj_DT_1ST_cylinder.unsteady = True
    test_list.append(discadj_DT_1ST_cylinder)

    ######################################################
    ### Unsteady Disc. adj. compressible pitching NACA ###
    ######################################################

    # compressible pitching NACA0012
    discadj_pitchingNACA0012 = TestCase('pitchingNACA0012')
    discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching"
    discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg"
    discadj_pitchingNACA0012.test_iter = 4
    discadj_pitchingNACA0012.test_vals = [
        -1.223509, -1.646090, -0.007671, 0.000013
    ]  #last 4 columns
    discadj_pitchingNACA0012.su2_exec = "SU2_CFD_AD"
    discadj_pitchingNACA0012.timeout = 1600
    discadj_pitchingNACA0012.tol = 0.00001
    discadj_pitchingNACA0012.unsteady = True
    test_list.append(discadj_pitchingNACA0012)

    # deforming pitching NACA0012
    unst_deforming_naca0012 = TestCase('unst_deforming_naca0012')
    unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def"
    unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform_ad.cfg"
    unst_deforming_naca0012.test_iter = 4
    unst_deforming_naca0012.test_vals = [
        -1.867980, -1.741743, 1090.200000, 0.000006
    ]  #last 4 columns
    unst_deforming_naca0012.su2_exec = "SU2_CFD_AD"
    unst_deforming_naca0012.timeout = 1600
    unst_deforming_naca0012.tol = 0.00001
    unst_deforming_naca0012.unsteady = True
    test_list.append(unst_deforming_naca0012)

    ###################################
    ### Structural Adjoint          ###
    ###################################

    # Structural model
    discadj_fea = TestCase('discadj_fea')
    discadj_fea.cfg_dir = "disc_adj_fea"
    discadj_fea.cfg_file = "configAD_fem.cfg"
    discadj_fea.test_iter = 4
    discadj_fea.test_vals = [-2.849531, -3.238474, -3.6413e-04,
                             -8.7087]  #last 4 columns
    discadj_fea.su2_exec = "SU2_CFD_AD"
    discadj_fea.timeout = 1600
    discadj_fea.tol = 0.00001
    test_list.append(discadj_fea)

    ###################################
    ### Disc. adj. heat             ###
    ###################################

    # Discrete adjoint for heated cylinder
    discadj_heat = TestCase('discadj_heat')
    discadj_heat.cfg_dir = "disc_adj_heat"
    discadj_heat.cfg_file = "disc_adj_heat.cfg"
    discadj_heat.test_iter = 10
    discadj_heat.test_vals = [-2.271573, 0.671242, -3.172000,
                              -8.231600]  #last 4 columns
    discadj_heat.su2_exec = "SU2_CFD_AD"
    discadj_heat.timeout = 1600
    discadj_heat.tol = 0.00001
    test_list.append(discadj_heat)

    ###################################
    ### Coupled RHT-CFD Adjoint     ###
    ###################################

    # Coupled discrete adjoint for radiative heat transfer in heated cylinder
    discadj_rht = TestCase('discadj_rht')
    discadj_rht.cfg_dir = "radiation/p1adjoint"
    discadj_rht.cfg_file = "configp1adjoint.cfg"
    discadj_rht.test_iter = 10
    discadj_rht.su2_exec = "discrete_adjoint.py -f"
    discadj_rht.timeout = 1600
    discadj_rht.reference_file = "of_grad_cd.csv.ref"
    discadj_rht.test_file = "of_grad_cd.csv"
    test_list.append(discadj_rht)

    ###################################
    ### Coupled FSI Adjoint         ###
    ###################################

    # Structural model
    discadj_fsi = TestCase('discadj_fsi')
    discadj_fsi.cfg_dir = "disc_adj_fsi"
    discadj_fsi.cfg_file = "config.cfg"
    discadj_fsi.test_iter = 6
    discadj_fsi.test_vals = [6, -1.572702, -3.084381, 4.3990e-04,
                             -1.0631]  #last 5 columns
    discadj_fsi.su2_exec = "SU2_CFD_AD"
    discadj_fsi.timeout = 1600
    discadj_fsi.tol = 0.00001
    test_list.append(discadj_fsi)

    ###################################
    ### Coupled CHT Adjoint         ###
    ###################################

    # Coupled discrete adjoint for heatflux in heated cylinder array
    discadj_cht = TestCase('discadj_cht')
    discadj_cht.cfg_dir = "coupled_cht/disc_adj_incomp_2d"
    discadj_cht.cfg_file = "cht_2d_3cylinders.cfg"
    discadj_cht.test_iter = 10
    discadj_cht.test_vals = [-2.364405, -3.085551, -3.085518,
                             -3.085513]  #last 4 columns
    discadj_cht.su2_exec = "SU2_CFD_AD"
    discadj_cht.timeout = 1600
    discadj_cht.tol = 0.00001
    test_list.append(discadj_cht)

    ######################################
    ### 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 -f"
    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 discrete_adjoint with multiple ffd boxes
    discadj_multiple_ffd_py = TestCase('discadj_multiple_ffd_py')
    discadj_multiple_ffd_py.cfg_dir = "multiple_ffd/naca0012"
    discadj_multiple_ffd_py.cfg_file = "inv_NACA0012_ffd.cfg"
    discadj_multiple_ffd_py.test_iter = 9
    discadj_multiple_ffd_py.su2_exec = "discrete_adjoint.py -f"
    discadj_multiple_ffd_py.timeout = 1600
    discadj_multiple_ffd_py.reference_file = "of_grad_cd.dat.ref"
    discadj_multiple_ffd_py.test_file = "of_grad_cd.dat"
    pass_list.append(discadj_multiple_ffd_py.run_filediff())
    test_list.append(discadj_multiple_ffd_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 -f"
    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)

    # test direct_differentiation.py with multiple ffd boxes
    directdiff_multiple_ffd_py = TestCase('directdiff_multiple_ffd_py')
    directdiff_multiple_ffd_py.cfg_dir = "multiple_ffd/naca0012"
    directdiff_multiple_ffd_py.cfg_file = "inv_NACA0012_ffd.cfg"
    directdiff_multiple_ffd_py.test_iter = 9
    directdiff_multiple_ffd_py.su2_exec = "direct_differentiation.py -f"
    directdiff_multiple_ffd_py.timeout = 1600
    directdiff_multiple_ffd_py.reference_file = "of_grad_directdiff.dat.ref"
    directdiff_multiple_ffd_py.test_file = "DIRECTDIFF/of_grad_directdiff.dat"
    pass_list.append(directdiff_multiple_ffd_py.run_filediff())
    test_list.append(directdiff_multiple_ffd_py)

    # test continuous_adjoint.py, with multiple objectives
    #    discadj_multi_py            = TestCase('discadj_multi_py')
    #    discadj_multi_py.cfg_dir    = "cont_adj_euler/wedge"
    #    discadj_multi_py.cfg_file   = "inv_wedge_ROE_multiobj.cfg"
    #    discadj_multi_py.test_iter  = 10
    #    discadj_multi_py.su2_exec   = "discrete_adjoint.py"
    #    discadj_multi_py.timeout    = 1600
    #    discadj_multi_py.reference_file = "of_grad_combo.dat.refdiscrete"
    #    discadj_multi_py.test_file  = "of_grad_combo.dat"
    #    pass_list.append(discadj_multi_py.run_filediff())
    #    test_list.append(discadj_multi_py)

    # FEA AD Flow Load Sensitivity
    pywrapper_FEA_AD_FlowLoad = TestCase('pywrapper_FEA_AD_FlowLoad')
    pywrapper_FEA_AD_FlowLoad.cfg_dir = "py_wrapper/disc_adj_fea/flow_load_sens"
    pywrapper_FEA_AD_FlowLoad.cfg_file = "configAD_fem.cfg"
    pywrapper_FEA_AD_FlowLoad.test_iter = 100
    pywrapper_FEA_AD_FlowLoad.test_vals = [
        -0.13945587401579657, -0.585985886606256, -0.00036377840086080753,
        -0.0031005670174756375
    ]  #last 4 columns
    pywrapper_FEA_AD_FlowLoad.su2_exec = "python run_adjoint.py -f"
    pywrapper_FEA_AD_FlowLoad.timeout = 1600
    pywrapper_FEA_AD_FlowLoad.tol = 0.000001
    pywrapper_FEA_AD_FlowLoad.new_output = False
    test_list.append(pywrapper_FEA_AD_FlowLoad)
    pass_list.append(pywrapper_FEA_AD_FlowLoad.run_test())

    # Flow AD Mesh Displacement Sensitivity
    pywrapper_FEA_AD_FlowLoad = TestCase('pywrapper_CFD_AD_MeshDisp')
    pywrapper_FEA_AD_FlowLoad.cfg_dir = "py_wrapper/disc_adj_flow/mesh_disp_sens"
    pywrapper_FEA_AD_FlowLoad.cfg_file = "configAD_flow.cfg"
    pywrapper_FEA_AD_FlowLoad.test_iter = 1000
    pywrapper_FEA_AD_FlowLoad.test_vals = [
        30.000000, -2.518695, 1.390150, 0.000000
    ]  #last 4 columns
    pywrapper_FEA_AD_FlowLoad.su2_exec = "python run_adjoint.py -f"
    pywrapper_FEA_AD_FlowLoad.timeout = 1600
    pywrapper_FEA_AD_FlowLoad.tol = 0.000001
    pywrapper_FEA_AD_FlowLoad.new_output = False
    test_list.append(pywrapper_FEA_AD_FlowLoad)
    pass_list.append(pywrapper_FEA_AD_FlowLoad.run_test())

    # Tests summary
    print('==================================================================')
    print('Summary of the serial tests')
    print('python version:', sys.version)
    for i, test in enumerate(test_list):
        if (pass_list[i]):
            print('  passed - %s' % test.tag)
        else:
            print('* FAILED - %s' % test.tag)

    if all(pass_list):
        sys.exit(0)
    else:
        sys.exit(1)
Ejemplo n.º 3
0
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.769374, 3.848733, -0.252191, 0.044410] #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)
    
    # 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 = [-6.707530,-1.319851,0.300017,0.019390] #last 4 columns
    fixedCL_naca0012.su2_exec  = "SU2_CFD"
    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.319488, 4.112397, 0.011954, 0.009584] #last 4 columns
    polar_naca0012.su2_exec  = "compute_polar.py -n 1 -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.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)

    # 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.850123, -1.388088, -0.056090, 108.140177] #last 4 columns
    cylinder_lowmach.su2_exec  = "SU2_CFD"
    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"
    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"
    rae2822_sst.test_iter = 100
    rae2822_sst.test_vals = [-1.185243, 4.018464, 0.886786, 0.024927] #last 4 columns
    rae2822_sst.su2_exec  = "SU2_CFD"
    rae2822_sst.timeout   = 1600
    rae2822_sst.tol       = 0.00001
    test_list.append(rae2822_sst)

    # Flat plate
    turb_flatplate           = TestCase('turb_flatplate')
    turb_flatplate.cfg_dir   = "rans/flatplate"
    turb_flatplate.cfg_file  = "turb_SA_flatplate.cfg"
    turb_flatplate.test_iter = 100
    turb_flatplate.test_vals = [-5.069447, -7.354601, -0.187187, 0.010831] #last 4 columns
    turb_flatplate.su2_exec  = "SU2_CFD"
    turb_flatplate.timeout   = 1600
    turb_flatplate.tol       = 0.00001
    test_list.append(turb_flatplate)

    # ONERA M6 Wing
    turb_oneram6           = TestCase('turb_oneram6')
    turb_oneram6.cfg_dir   = "rans/oneram6"
    turb_oneram6.cfg_file  = "turb_ONERAM6.cfg"
    turb_oneram6.test_iter = 10
    turb_oneram6.test_vals = [-2.327509, -6.563372, 0.230438, 0.155815]#last 4 columns
    turb_oneram6.su2_exec  = "SU2_CFD"
    turb_oneram6.timeout   = 3200
    turb_oneram6.tol       = 0.00001
    test_list.append(turb_oneram6)

    # NACA0012 (SA, FUN3D results for finest grid: CL=1.0983, CD=0.01242)
    turb_naca0012_sa           = TestCase('turb_naca0012_sa')
    turb_naca0012_sa.cfg_dir   = "rans/naca0012"
    turb_naca0012_sa.cfg_file  = "turb_NACA0012_sa.cfg"
    turb_naca0012_sa.test_iter = 10
    turb_naca0012_sa.test_vals = [-12.000763, -9.145363, 1.070528, 0.019417] #last 4 columns
    turb_naca0012_sa.su2_exec  = "SU2_CFD"
    turb_naca0012_sa.timeout   = 3200
    turb_naca0012_sa.tol       = 0.00001
    test_list.append(turb_naca0012_sa)
    
    # NACA0012 (SST, FUN3D results for finest grid: CL=1.0840, CD=0.01253)
    turb_naca0012_sst           = TestCase('turb_naca0012_sst')
    turb_naca0012_sst.cfg_dir   = "rans/naca0012"
    turb_naca0012_sst.cfg_file  = "turb_NACA0012_sst.cfg"
    turb_naca0012_sst.test_iter = 10
    turb_naca0012_sst.test_vals = [-15.039675, -7.219913, 1.059622, 0.019138] #last 4 columns
    turb_naca0012_sst.su2_exec  = "SU2_CFD"
    turb_naca0012_sst.timeout   = 3200
    turb_naca0012_sst.tol       = 0.00001
    test_list.append(turb_naca0012_sst)

    # PROPELLER 
    propeller           = TestCase('propeller')
    propeller.cfg_dir   = "rans/propeller"
    propeller.cfg_file  = "propeller.cfg"
    propeller.test_iter = 10
    propeller.test_vals = [-3.380312, -8.129519, 0.000043, 0.056159] #last 4 columns
    propeller.su2_exec  = "SU2_CFD"
    propeller.timeout   = 3200
    propeller.tol       = 0.00001
    test_list.append(propeller)

    #############################
    ### Incompressible Euler  ###
    #############################

    # NACA0012 Hydrofoil
    inc_euler_naca0012           = TestCase('inc_euler_naca0012')
    inc_euler_naca0012.cfg_dir   = "incomp_euler/naca0012"
    inc_euler_naca0012.cfg_file  = "incomp_NACA0012.cfg"
    inc_euler_naca0012.test_iter = 20
    inc_euler_naca0012.test_vals = [-3.590333,-3.151515,0.960192,0.013260] #last 4 columns
    inc_euler_naca0012.su2_exec  = "SU2_CFD"
    inc_euler_naca0012.timeout   = 1600
    inc_euler_naca0012.tol       = 0.00001
    test_list.append(inc_euler_naca0012)

    ############################
    ### Incompressible RANS  ###
    ############################

    # NACA0012
    inc_turb_naca0012           = TestCase('inc_turb_naca0012')
    inc_turb_naca0012.cfg_dir   = "incomp_rans/naca0012"
    inc_turb_naca0012.cfg_file  = "naca0012.cfg"
    inc_turb_naca0012.test_iter = 20
    inc_turb_naca0012.test_vals = [-4.710052, -11.007500, -0.000001, 0.210445] #last 4 columns
    inc_turb_naca0012.su2_exec  = "SU2_CFD"
    inc_turb_naca0012.timeout   = 1600
    inc_turb_naca0012.tol       = 0.00001
    test_list.append(inc_turb_naca0012)

    #########################
    ###    Transition     ###
    #########################

    # Schubauer-Klebanoff Natural Transition
    schubauer_klebanoff_transition              = TestCase('Schubauer_Klebanoff')
    schubauer_klebanoff_transition.cfg_dir      = "transition/Schubauer_Klebanoff"
    schubauer_klebanoff_transition.cfg_file     = "transitional_BC_model_ConfigFile.cfg"
    schubauer_klebanoff_transition.test_iter    = 250
    schubauer_klebanoff_transition.test_vals    = [-9.474452, -15.630834, 0.000520, 0.001062] #last 4 columns
    schubauer_klebanoff_transition.su2_exec     = "SU2_CFD"
    schubauer_klebanoff_transition.timeout      = 1600
    schubauer_klebanoff_transition.tol          = 0.00001
    test_list.append(schubauer_klebanoff_transition)

    #####################################
    ### Cont. adj. compressible Euler ###
    #####################################

    # Inviscid NACA0012
    contadj_naca0012           = TestCase('contadj_naca0012')
    contadj_naca0012.cfg_dir   = "cont_adj_euler/naca0012"
    contadj_naca0012.cfg_file  = "inv_NACA0012.cfg"
    contadj_naca0012.test_iter = 5
    contadj_naca0012.test_vals = [-9.787554, -15.192510, 0.300920, 0.019552] #last 4 columns
    contadj_naca0012.su2_exec  = "SU2_CFD"
    contadj_naca0012.timeout   = 1600
    contadj_naca0012.tol       = 0.00001
    test_list.append(contadj_naca0012)

    # Inviscid ONERA M6
    contadj_oneram6           = TestCase('contadj_oneram6')
    contadj_oneram6.cfg_dir   = "cont_adj_euler/oneram6"
    contadj_oneram6.cfg_file  = "inv_ONERAM6.cfg"
    contadj_oneram6.test_iter = 10
    contadj_oneram6.test_vals = [-12.133352, -12.707213, 6.8590e-01, 0.007594] #last 4 columns
    contadj_oneram6.su2_exec  = "SU2_CFD"
    contadj_oneram6.timeout   = 1600
    contadj_oneram6.tol       = 0.00001
    test_list.append(contadj_oneram6)

    # Inviscid WEDGE: tests generalized adjoint
    contadj_wedge             = TestCase('contadj_wedge')
    contadj_wedge.cfg_dir   = "cont_adj_euler/wedge"
    contadj_wedge.cfg_file  = "inv_wedge_ROE.cfg"
    contadj_wedge.test_iter = 10
    contadj_wedge.test_vals = [2.780403, -3.223266, -1448300.000000, -0.000000] #last 4 columns
    contadj_wedge.su2_exec  = "SU2_CFD"
    contadj_wedge.timeout   = 1600
    contadj_wedge.tol       = 0.00001
    test_list.append(contadj_wedge)
    
    # Inviscid fixed CL NACA0012
    contadj_fixedCL_naca0012           = TestCase('contadj_fixedcl_naca0012')
    contadj_fixedCL_naca0012.cfg_dir   = "fixed_cl/naca0012"
    contadj_fixedCL_naca0012.cfg_file  = "inv_NACA0012_ContAdj.cfg"
    contadj_fixedCL_naca0012.test_iter = 500
    contadj_fixedCL_naca0012.test_vals = [-2.896959, -8.484896, 0.250600, 0.000004] #last 4 columns
    contadj_fixedCL_naca0012.su2_exec  = "SU2_CFD"
    contadj_fixedCL_naca0012.timeout   = 1600
    contadj_fixedCL_naca0012.tol       = 0.00001
    test_list.append(contadj_fixedCL_naca0012)

    ###################################
    ### Cont. adj. compressible N-S ###
    ###################################

    # Adjoint laminar cylinder
    contadj_ns_cylinder           = TestCase('contadj_ns_cylinder')
    contadj_ns_cylinder.cfg_dir   = "cont_adj_navierstokes/cylinder"
    contadj_ns_cylinder.cfg_file  = "lam_cylinder.cfg"
    contadj_ns_cylinder.test_iter = 100
    contadj_ns_cylinder.test_vals = [-3.677184, -9.141850, 2.056700, -0.000000] #last 4 columns
    contadj_ns_cylinder.su2_exec  = "SU2_CFD"
    contadj_ns_cylinder.timeout   = 1600
    contadj_ns_cylinder.tol       = 0.00001
    test_list.append(contadj_ns_cylinder)

    # Adjoint laminar naca0012 subsonic
    contadj_ns_naca0012_sub           = TestCase('contadj_ns_naca0012_sub')
    contadj_ns_naca0012_sub.cfg_dir   = "cont_adj_navierstokes/naca0012_sub"
    contadj_ns_naca0012_sub.cfg_file  = "lam_NACA0012.cfg"
    contadj_ns_naca0012_sub.test_iter = 100
    contadj_ns_naca0012_sub.test_vals = [-2.744551, -8.216469, 0.518810, 0.001210] #last 4 columns
    contadj_ns_naca0012_sub.su2_exec  = "SU2_CFD"
    contadj_ns_naca0012_sub.timeout   = 1600
    contadj_ns_naca0012_sub.tol       = 0.00001
    test_list.append(contadj_ns_naca0012_sub)
    
    # Adjoint laminar naca0012 transonic
    contadj_ns_naca0012_trans           = TestCase('contadj_ns_naca0012_trans')
    contadj_ns_naca0012_trans.cfg_dir   = "cont_adj_navierstokes/naca0012_trans"
    contadj_ns_naca0012_trans.cfg_file  = "lam_NACA0012.cfg"
    contadj_ns_naca0012_trans.test_iter = 100
    contadj_ns_naca0012_trans.test_vals = [-1.041539, -6.578524, 1.772300, 0.012494] #last 4 columns
    contadj_ns_naca0012_trans.su2_exec  = "SU2_CFD"
    contadj_ns_naca0012_trans.timeout   = 1600
    contadj_ns_naca0012_trans.tol       = 0.00001
    test_list.append(contadj_ns_naca0012_trans)

    #######################################################
    ### Cont. adj. compressible RANS (frozen viscosity) ###
    #######################################################

    # Adjoint turbulent NACA0012
    contadj_rans_naca0012           = TestCase('contadj_rans_naca0012')
    contadj_rans_naca0012.cfg_dir   = "cont_adj_rans/naca0012"
    contadj_rans_naca0012.cfg_file  = "turb_nasa.cfg"
    contadj_rans_naca0012.test_iter = 100
    contadj_rans_naca0012.test_vals = [-0.814757, -5.726517, 19.169000, -0.000000] #last 4 columns
    contadj_rans_naca0012.su2_exec  = "SU2_CFD"
    contadj_rans_naca0012.timeout   = 1600
    contadj_rans_naca0012.tol       = 0.00001
    test_list.append(contadj_rans_naca0012)
    
    # Adjoint turbulent RAE2822
    contadj_rans_rae2822           = TestCase('contadj_rans_rae2822')
    contadj_rans_rae2822.cfg_dir   = "cont_adj_rans/rae2822"
    contadj_rans_rae2822.cfg_file  = "turb_SA_RAE2822.cfg"
    contadj_rans_rae2822.test_iter = 100
    contadj_rans_rae2822.test_vals = [-5.377843, -10.882446, -0.212470, 0.005448] #last 4 columns
    contadj_rans_rae2822.su2_exec  = "SU2_CFD"
    contadj_rans_rae2822.timeout   = 1600
    contadj_rans_rae2822.tol       = 0.00001
    test_list.append(contadj_rans_rae2822)

    #######################################
    ### Cont. adj. incompressible Euler ###
    #######################################

    # Adjoint Incompressible Inviscid NACA0012
    contadj_incomp_NACA0012           = TestCase('contadj_incomp_NACA0012')
    contadj_incomp_NACA0012.cfg_dir   = "cont_adj_incomp_euler/naca0012"
    contadj_incomp_NACA0012.cfg_file  = "incomp_NACA0012.cfg"
    contadj_incomp_NACA0012.test_iter = 5
    contadj_incomp_NACA0012.test_vals = [-11.980272, -12.146779, 1.9399, 0.000000] #last 4 columns
    contadj_incomp_NACA0012.su2_exec  = "SU2_CFD"
    contadj_incomp_NACA0012.timeout   = 1600
    contadj_incomp_NACA0012.tol       = 0.00001
    test_list.append(contadj_incomp_NACA0012)

    #####################################
    ### Cont. adj. incompressible N-S ###
    #####################################

    # Adjoint Incompressible Viscous Cylinder
    contadj_incomp_cylinder           = TestCase('contadj_incomp_cylinder')
    contadj_incomp_cylinder.cfg_dir   = "cont_adj_incomp_navierstokes/cylinder"
    contadj_incomp_cylinder.cfg_file  = "lam_incomp_cylinder.cfg"
    contadj_incomp_cylinder.test_iter = 25
    contadj_incomp_cylinder.test_vals = [-5.718622, -7.027366, 2.932100, 0.000000] #last 4 columns
    contadj_incomp_cylinder.su2_exec  = "SU2_CFD"
    contadj_incomp_cylinder.timeout   = 1600
    contadj_incomp_cylinder.tol       = 0.00001
    test_list.append(contadj_incomp_cylinder)

    ######################################
    ### Harmonic Balance               ###
    ######################################
    
    # Description of the regression test
    harmonic_balance           = TestCase('harmonic_balance')
    harmonic_balance.cfg_dir   = "harmonic_balance"
    harmonic_balance.cfg_file  = "HB.cfg"
    harmonic_balance.test_iter = 25
    harmonic_balance.test_vals = [-1.569573, 3.941896, 0.008780, 0.079775] #last 4 columns
    harmonic_balance.su2_exec  = "SU2_CFD"
    harmonic_balance.timeout   = 1600
    harmonic_balance.tol       = 0.00001
    test_list.append(harmonic_balance)

    ######################################
    ### Moving Wall                    ###
    ######################################
    
    # Lid-driven cavity
    cavity           = TestCase('cavity')
    cavity.cfg_dir   = "moving_wall/cavity"
    cavity.cfg_file  = "lam_cavity.cfg"
    cavity.test_iter = 25
    cavity.test_vals = [-5.627934, -0.164470, 0.051972, 2.547034] #last 4 columns
    cavity.su2_exec  = "SU2_CFD"
    cavity.timeout   = 1600
    cavity.tol       = 0.00001
    test_list.append(cavity)

    # Spinning cylinder
    spinning_cylinder           = TestCase('spinning_cylinder')
    spinning_cylinder.cfg_dir   = "moving_wall/spinning_cylinder"
    spinning_cylinder.cfg_file  = "spinning_cylinder.cfg"
    spinning_cylinder.test_iter = 25
    spinning_cylinder.test_vals = [-7.709662, -2.274900, 1.418422, 1.734206] #last 4 columns
    spinning_cylinder.su2_exec  = "SU2_CFD"
    spinning_cylinder.timeout   = 1600
    spinning_cylinder.tol       = 0.00001
    test_list.append(spinning_cylinder)

    ######################################
    ### Unsteady                       ###
    ######################################

    # Square cylinder
    square_cylinder           = TestCase('square_cylinder')
    square_cylinder.cfg_dir   = "unsteady/square_cylinder"
    square_cylinder.cfg_file  = "turb_square.cfg"
    square_cylinder.test_iter = 3
    square_cylinder.test_vals = [-1.166406,0.076804,1.398548,2.197047] #last 4 columns
    square_cylinder.su2_exec  = "SU2_CFD"
    square_cylinder.timeout   = 1600
    square_cylinder.tol       = 0.00001
    square_cylinder.unsteady  = True
    test_list.append(square_cylinder)

    # Gust
    sine_gust           = TestCase('sine_gust')
    sine_gust.cfg_dir   = "gust"
    sine_gust.cfg_file  = "inv_gust_NACA0012.cfg"
    sine_gust.test_iter = 5
    sine_gust.test_vals = [-1.977531, 3.481790, -0.006222, -0.001342] #last 4 columns
    sine_gust.su2_exec  = "SU2_CFD"
    sine_gust.timeout   = 1600
    sine_gust.tol       = 0.00001
    sine_gust.unsteady  = True
    test_list.append(sine_gust)

    # Aeroelastic
    aeroelastic         = TestCase('aeroelastic')
    aeroelastic.cfg_dir   = "aeroelastic"
    aeroelastic.cfg_file  = "aeroelastic_NACA64A010.cfg"
    aeroelastic.test_iter = 2
    aeroelastic.test_vals = [0.077106, 0.036449, -1.684916e-03, -1.131735e-04] #last 4 columns
    aeroelastic.su2_exec  = "SU2_CFD"
    aeroelastic.timeout   = 1600
    aeroelastic.tol       = 0.000001
    aeroelastic.unsteady  = True
    test_list.append(aeroelastic) 

    ######################################
    ### NICFD                          ###
    ######################################

    # ls89_sa
    ls89_sa           = TestCase('ls89_sa')
    ls89_sa.cfg_dir   = "nicf/LS89"
    ls89_sa.cfg_file  = "turb_SA_PR.cfg"
    ls89_sa.test_iter = 100
    ls89_sa.test_vals = [-5.062991, -13.374292, 0.128005, 0.323965] #last 4 columns
    ls89_sa.su2_exec  = "SU2_CFD"
    ls89_sa.timeout   = 1600
    ls89_sa.tol       = 0.00001
    test_list.append(ls89_sa)

#    # ls89_sst
#    ls89_sst           = TestCase('ls89_sst')
#    ls89_sst.cfg_dir   = "nicf/LS89"
#    ls89_sst.cfg_file  = "turb_SST_PR.cfg"
#    ls89_sst.test_iter = 100
#    ls89_sst.test_vals =  [-8.548266, -1.449437, 0.067986, 0.151168] #last 4 columns
#    ls89_sst.su2_exec  = "SU2_CFD"
#    ls89_sst.timeout   = 1600
#    ls89_sst.tol       = 0.00001
#    test_list.append(ls89_sst)

    # Rarefaction shock wave edge_VW
    edge_VW           = TestCase('edge_VW')
    edge_VW.cfg_dir   = "nicf/edge"
    edge_VW.cfg_file  = "edge_VW.cfg"
    edge_VW.test_iter = 100
    edge_VW.test_vals = [-5.055874, 1.117978, -0.000009, 0.000000] #last 4 columns
    edge_VW.su2_exec  = "SU2_CFD"
    edge_VW.timeout   = 1600
    edge_VW.tol       = 0.00001
    test_list.append(edge_VW)

    # Rarefaction shock wave edge_PPR               
    edge_PPR           = TestCase('edge_PPR')
    edge_PPR.cfg_dir   = "nicf/edge"
    edge_PPR.cfg_file  = "edge_PPR.cfg"
    edge_PPR.test_iter = 100
    edge_PPR.test_vals = [-5.484387, 0.656352, -0.000037, 0.000000] #last 4 columns
    edge_PPR.su2_exec  = "SU2_CFD"
    edge_PPR.timeout   = 1600
    edge_PPR.tol       = 0.00001
    test_list.append(edge_PPR)
    
    
    ######################################
    ### turboSU2                       ###
    ######################################
    
    # Mini centrifugal turbine blade
    centrifugal_blade           = TestCase('centrifugal_blade')
    centrifugal_blade.cfg_dir   = "turbomachinery/centrifugal_blade"
    centrifugal_blade.cfg_file  = "centrifugal_blade.cfg"
    centrifugal_blade.test_iter = 100
    centrifugal_blade.test_vals = [-9.106943, -0.460429, 1.069070e+01, 3.396010e-01] #last 4 columns
    centrifugal_blade.su2_exec  = "SU2_CFD"
    centrifugal_blade.timeout   = 1600
    centrifugal_blade.tol       = 0.000001
    test_list.append(centrifugal_blade) 
    
    
    # Mini centrifugal turbine stage
    centrifugal_stage           = TestCase('centrifugal_stage')
    centrifugal_stage.cfg_dir   = "turbomachinery/centrifugal_stage"
    centrifugal_stage.cfg_file  = "centrifugal_stage.cfg"
    centrifugal_stage.test_iter = 100
    centrifugal_stage.test_vals = [-10.166628, 1.621134, 22.064950, 0.527107] #last 4 columns
    centrifugal_stage.su2_exec  = "SU2_CFD"
    centrifugal_stage.timeout   = 1600
    centrifugal_stage.tol       = 0.000001
    test_list.append(centrifugal_stage) 

    ######################################
    ### Sliding Mesh                   ###
    ######################################

    # Uniform flow
#    uniform_flow         = TestCase('uniform_flow')
#    uniform_flow.cfg_dir   = "sliding_interface/uniform_flow"
#    uniform_flow.cfg_file  = "uniform_NN.cfg"
#    uniform_flow.test_iter = 50
#    uniform_flow.test_vals = [-0.368836, 5.156090, 0.000000, 0.000000] #last 4 columns
#    uniform_flow.su2_exec  = "SU2_CFD"
#    uniform_flow.timeout   = 1600
#    uniform_flow.tol       = 0.000001
#    uniform_flow.unsteady  = True
#    test_list.append(uniform_flow) 

    # Channel_2D
    channel_2D           = TestCase('channel_2D')
    channel_2D.cfg_dir   = "sliding_interface/channel_2D"
    channel_2D.cfg_file  = "channel_2D_NN.cfg"
    channel_2D.test_iter = 4
    channel_2D.test_vals = [-1.498300, 4.541411, 0.000000, 0.000000] #last 4 columns
    channel_2D.su2_exec  = "SU2_CFD"
    channel_2D.timeout   = 100
    channel_2D.tol       = 0.00001
    channel_2D.unsteady  = True
    test_list.append(channel_2D)

    # Channel_3D
    channel_3D           = TestCase('channel_3D')
    channel_3D.cfg_dir   = "sliding_interface/channel_3D"
    channel_3D.cfg_file  = "channel_3D_NN.cfg"
    channel_3D.test_iter = 1
    channel_3D.test_vals = [-1.899948, 4.032874, 0.000000, 0.000000] #last 4 columns
    channel_3D.su2_exec  = "SU2_CFD"
    channel_3D.timeout   = 1600
    channel_3D.tol       = 0.00001
    channel_3D.unsteady  = True
    test_list.append(channel_3D)

    # Pipe
#    pipe           = TestCase('pipe')
#    pipe.cfg_dir   = "sliding_interface/pipe"
#    pipe.cfg_file  = "pipe_NN.cfg"
#    pipe.test_iter = 2
#    pipe.test_vals = [-3.503708, 3.194241, 0.000000, 0.000000] #last 4 columns
#    pipe.su2_exec  = "SU2_CFD"
#    pipe.timeout   = 1600
#    pipe.tol       = 0.00001
#    pipe.unsteady  = True
#    test_list.append(pipe)

    ##########################
    ### FEA - FSI          ###
    ##########################

    # Static beam, 3d
    statbeam3d           = TestCase('statbeam3d')
    statbeam3d.cfg_dir   = "fea_fsi/StatBeam_3d"
    statbeam3d.cfg_file  = "configBeam_3d.cfg"
    statbeam3d.test_iter = 0
    statbeam3d.test_vals = [-8.498274, -8.230638, -8.123824, 6.4095e+04] #last 4 columns
    statbeam3d.su2_exec  = "SU2_CFD"
    statbeam3d.timeout   = 1600
    statbeam3d.tol       = 0.00001
    test_list.append(statbeam3d)

    # Dynamic beam, 2d
    dynbeam2d           = TestCase('dynbeam2d')
    dynbeam2d.cfg_dir   = "fea_fsi/DynBeam_2d"
    dynbeam2d.cfg_file  = "configBeam_2d.cfg"
    dynbeam2d.test_iter = 6
    dynbeam2d.test_vals = [-9.420640, -5.365872, -12.430382, 6.5210e+04] #last 4 columns
    dynbeam2d.su2_exec  = "SU2_CFD"
    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.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)
    
    # Turb NACA4412 (quads, wall distance)
    naca4412_def            = TestCase('naca4412_def')
    naca4412_def.cfg_dir   = "deformation/naca4412"
    naca4412_def.cfg_file  = "def_NACA4412.cfg"
    naca4412_def.test_iter = 300
    naca4412_def.test_vals = [3.26428e-15] #residual
    naca4412_def.su2_exec  = "SU2_DEF"
    naca4412_def.timeout   = 1600
    naca4412_def.tol       = 1e-15
    
    pass_list.append(naca4412_def.run_def())
    test_list.append(naca4412_def)

    # Brick of tets (inverse volume)
    brick_tets_def            = TestCase('brick_tets_def')
    brick_tets_def.cfg_dir   = "deformation/brick_tets"
    brick_tets_def.cfg_file  = "def_brick_tets.cfg"
    brick_tets_def.test_iter = 50
    brick_tets_def.test_vals = [7.34025e-15] #residual
    brick_tets_def.su2_exec  = "SU2_DEF"
    brick_tets_def.timeout   = 1600
    brick_tets_def.tol       = 1e-15
    
    pass_list.append(brick_tets_def.run_def())
    test_list.append(brick_tets_def)

    # Brick of isotropic hexas (inverse volume)
    brick_hex_def           = TestCase('brick_hex_def')
    brick_hex_def.cfg_dir   = "deformation/brick_hex"
    brick_hex_def.cfg_file  = "def_brick_hex.cfg"
    brick_hex_def.test_iter = 50
    brick_hex_def.test_vals = [1.55154e-15] #residual
    brick_hex_def.su2_exec  = "SU2_DEF"
    brick_hex_def.timeout   = 1600
    brick_hex_def.tol       = 1e-15
    
    pass_list.append(brick_hex_def.run_def())
    test_list.append(brick_hex_def)

    # Brick with a pyramid layer (inverse volume)
    brick_pyra_def           = TestCase('brick_pyra_def')
    brick_pyra_def.cfg_dir   = "deformation/brick_pyra"
    brick_pyra_def.cfg_file  = "def_brick_pyra.cfg"
    brick_pyra_def.test_iter = 400
    brick_pyra_def.test_vals = [3.79432e-15] #residual
    brick_pyra_def.su2_exec  = "SU2_DEF"
    brick_pyra_def.timeout   = 1600
    brick_pyra_def.tol       = 1e-15
    
    pass_list.append(brick_pyra_def.run_def())
    test_list.append(brick_pyra_def)

    # Brick of isotropic prisms (inverse volume)
    brick_prism_def           = TestCase('brick_prism_def')
    brick_prism_def.cfg_dir   = "deformation/brick_prism"
    brick_prism_def.cfg_file  = "def_brick_prism.cfg"
    brick_prism_def.test_iter = 150
    brick_prism_def.test_vals = [9.14366e-15] #residual
    brick_prism_def.su2_exec  = "SU2_DEF"
    brick_prism_def.timeout   = 1600
    brick_prism_def.tol       = 1e-15
    
    pass_list.append(brick_prism_def.run_def())
    test_list.append(brick_prism_def)
    
    # Brick of prisms with high aspect ratio cells near the wall (wall distance)
    brick_prism_rans_def           = TestCase('brick_prism_rans_def')
    brick_prism_rans_def.cfg_dir   = "deformation/brick_prism_rans"
    brick_prism_rans_def.cfg_file  = "def_brick_prism_rans.cfg"
    brick_prism_rans_def.test_iter = 100
    brick_prism_rans_def.test_vals = [1.64462e-15] #residual
    brick_prism_rans_def.su2_exec  = "SU2_DEF"
    brick_prism_rans_def.timeout   = 1600
    brick_prism_rans_def.tol       = 1e-15
    
    pass_list.append(brick_prism_rans_def.run_def())
    test_list.append(brick_prism_rans_def)
    
    # Brick of hexas with high aspect ratio cells near the wall (inverse volume)
    brick_hex_rans_def           = TestCase('brick_hex_rans_def')
    brick_hex_rans_def.cfg_dir   = "deformation/brick_hex_rans"
    brick_hex_rans_def.cfg_file  = "def_brick_hex_rans.cfg"
    brick_hex_rans_def.test_iter = 50
    brick_hex_rans_def.test_vals = [9.26657e-16] #residual
    brick_hex_rans_def.su2_exec  = "SU2_DEF"
    brick_hex_rans_def.timeout   = 1600
    brick_hex_rans_def.tol       = 1e-16
    
    pass_list.append(brick_hex_rans_def.run_def())
    test_list.append(brick_hex_rans_def)

    # Cylindrical FFD test
    cylinder_ffd_def           = TestCase('cylinder_ffd_def')
    cylinder_ffd_def.cfg_dir   = "deformation/cylindrical_ffd"
    cylinder_ffd_def.cfg_file  = "def_cylindrical.cfg"
    cylinder_ffd_def.test_iter = 50
    cylinder_ffd_def.test_vals = [1.30556e-10] #residual
    cylinder_ffd_def.su2_exec  = "SU2_DEF"
    cylinder_ffd_def.timeout   = 1600
    cylinder_ffd_def.tol       = 1e-16

    pass_list.append(cylinder_ffd_def.run_def())
    test_list.append(cylinder_ffd_def)

    # Spherical FFD test
    sphere_ffd_def           = TestCase('sphere_ffd_def')
    sphere_ffd_def.cfg_dir   = "deformation/spherical_ffd"
    sphere_ffd_def.cfg_file  = "def_spherical.cfg"
    sphere_ffd_def.test_iter = 50
    sphere_ffd_def.test_vals = [1.09326e-10] #residual
    sphere_ffd_def.su2_exec  = "SU2_DEF"
    sphere_ffd_def.timeout   = 1600
    sphere_ffd_def.tol       = 1e-16

    pass_list.append(sphere_ffd_def.run_def())
    test_list.append(sphere_ffd_def)
    
    # Spherical FFD test using BSplines
    sphere_ffd_def_bspline           = TestCase('sphere_ffd_def_bspline')
    sphere_ffd_def_bspline.cfg_dir   = "deformation/spherical_ffd"
    sphere_ffd_def_bspline.cfg_file  = "def_spherical_bspline.cfg"
    sphere_ffd_def_bspline.test_iter = 50
    sphere_ffd_def_bspline.test_vals = [6.69927e-11] #residual
    sphere_ffd_def_bspline.su2_exec  = "SU2_DEF"
    sphere_ffd_def_bspline.timeout   = 1600
    sphere_ffd_def_bspline.tol       = 1e-16

    pass_list.append(sphere_ffd_def_bspline.run_def())
    test_list.append(sphere_ffd_def_bspline)
   
    ######################################
    ### RUN PYTHON TESTS               ###
    ###################################### 
    
    # test continuous_adjoint.py
    contadj_euler_py = TestCase('contadj_euler_py')
    contadj_euler_py.cfg_dir = "cont_adj_euler/naca0012"
    contadj_euler_py.cfg_file  = "inv_NACA0012.cfg"
    contadj_euler_py.test_iter = 10
    contadj_euler_py.su2_exec  = "continuous_adjoint.py"
    contadj_euler_py.timeout   = 1600
    contadj_euler_py.reference_file = "of_grad_cd.dat.ref"
    contadj_euler_py.test_file = "of_grad_cd.dat"
    pass_list.append(contadj_euler_py.run_filediff())
    test_list.append(contadj_euler_py)

    # test finite_difference.py
    findiff_euler_py = TestCase('findiff_euler_py')
    findiff_euler_py.cfg_dir = "cont_adj_euler/naca0012"
    findiff_euler_py.cfg_file  = "inv_NACA0012_FD.cfg"
    findiff_euler_py.test_iter = 10
    findiff_euler_py.su2_exec  = "finite_differences.py"
    findiff_euler_py.timeout   = 1600
    findiff_euler_py.reference_file = "of_grad_findiff.dat.ref"
    findiff_euler_py.test_file = "FINDIFF/of_grad_findiff.dat"
    pass_list.append(findiff_euler_py.run_filediff())
    test_list.append(findiff_euler_py)
    
    # test shape_optimization.py
    shape_opt_euler_py           = TestCase('shape_opt_euler_py')
    shape_opt_euler_py.cfg_dir   = "optimization_euler/steady_naca0012"
    shape_opt_euler_py.cfg_file  = "inv_NACA0012_adv.cfg"
    shape_opt_euler_py.test_iter = 1
    shape_opt_euler_py.test_vals = [1, 1, 2.134974E-05, 3.829535E-03] #last 4 columns
    shape_opt_euler_py.su2_exec  = "shape_optimization.py -f"
    shape_opt_euler_py.timeout   = 1600
    shape_opt_euler_py.tol       = 0.00001
    pass_list.append(shape_opt_euler_py.run_opt())
    test_list.append(shape_opt_euler_py)

    # test continuous_adjoint.py, with multiple objectives
    #contadj_multi_py            = TestCase('contadj_multi_py')
    #contadj_multi_py.cfg_dir    = "cont_adj_euler/wedge"
    #contadj_multi_py.cfg_file   = "inv_wedge_ROE_multiobj.cfg"
    #contadj_multi_py.test_iter  = 10
    #contadj_multi_py.su2_exec   = "continuous_adjoint.py"
    #contadj_multi_py.timeout    = 1600
    #contadj_multi_py.reference_file = "of_grad_combo.dat.ref"
    #contadj_multi_py.test_file  = "of_grad_combo.dat"
    #pass_list.append(contadj_multi_py.run_filediff())
    #test_list.append(contadj_multi_py)


    ##########################
    ###   Python wrapper   ###
    ##########################
    
    # NACA0012 
    pywrapper_naca0012           = TestCase('pywrapper_naca0012')
    pywrapper_naca0012.cfg_dir   = "euler/naca0012"
    pywrapper_naca0012.cfg_file  = "inv_NACA0012_Roe.cfg"
    pywrapper_naca0012.test_iter = 100
    pywrapper_naca0012.test_vals = [-6.191618, -5.592802, 0.334809, 0.022197] #last 4 columns
    pywrapper_naca0012.su2_exec  = "SU2_CFD.py -f"
    pywrapper_naca0012.timeout   = 1600
    pywrapper_naca0012.tol       = 0.00001
    test_list.append(pywrapper_naca0012)
    pass_list.append(pywrapper_naca0012.run_test())

    # NACA0012 (SST, FUN3D results for finest grid: CL=1.0840, CD=0.01253)
    pywrapper_turb_naca0012_sst           = TestCase('pywrapper_turb_naca0012_sst')
    pywrapper_turb_naca0012_sst.cfg_dir   = "rans/naca0012"
    pywrapper_turb_naca0012_sst.cfg_file  = "turb_NACA0012_sst.cfg"
    pywrapper_turb_naca0012_sst.test_iter = 10
    pywrapper_turb_naca0012_sst.test_vals = [-15.039675, -7.219913, 1.059622, 0.019138] #last 4 columns
    pywrapper_turb_naca0012_sst.su2_exec  = "SU2_CFD.py -f"
    pywrapper_turb_naca0012_sst.timeout   = 3200
    pywrapper_turb_naca0012_sst.tol       = 0.00001
    test_list.append(pywrapper_turb_naca0012_sst)
    pass_list.append(pywrapper_turb_naca0012_sst.run_test())

    # Square cylinder
    pywrapper_square_cylinder           = TestCase('pywrapper_square_cylinder')
    pywrapper_square_cylinder.cfg_dir   = "unsteady/square_cylinder"
    pywrapper_square_cylinder.cfg_file  = "turb_square.cfg"
    pywrapper_square_cylinder.test_iter = 3
    pywrapper_square_cylinder.test_vals = [-1.166406,0.076804,1.398548,2.197047] #last 4 columns
    pywrapper_square_cylinder.su2_exec  = "SU2_CFD.py -f"
    pywrapper_square_cylinder.timeout   = 1600
    pywrapper_square_cylinder.tol       = 0.00001
    pywrapper_square_cylinder.unsteady  = True
    test_list.append(pywrapper_square_cylinder)
    pass_list.append(pywrapper_square_cylinder.run_test())

    # Aeroelastic
    pywrapper_aeroelastic         = TestCase('pywrapper_aeroelastic')
    pywrapper_aeroelastic.cfg_dir   = "aeroelastic"
    pywrapper_aeroelastic.cfg_file  = "aeroelastic_NACA64A010.cfg"
    pywrapper_aeroelastic.test_iter = 2
    pywrapper_aeroelastic.test_vals = [0.077106, 0.036449, -1.684916e-03, -1.131735e-04] #last 4 columns
    pywrapper_aeroelastic.su2_exec  = "SU2_CFD.py -f"
    pywrapper_aeroelastic.timeout   = 1600
    pywrapper_aeroelastic.tol       = 0.000001
    pywrapper_aeroelastic.unsteady  = True
    test_list.append(pywrapper_aeroelastic)
    pass_list.append(pywrapper_aeroelastic.run_test())

    # FSI, 2d
    pywrapper_fsi2d           = TestCase('pywrapper_fsi2d')
    pywrapper_fsi2d.cfg_dir   = "fea_fsi/WallChannel_2d"
    pywrapper_fsi2d.cfg_file  = "configFSI_2D.cfg"
    pywrapper_fsi2d.test_iter = 4
    pywrapper_fsi2d.test_vals = [2.000000, 0.500000, -7.777916, -1.139835] #last 4 columns
    pywrapper_fsi2d.su2_exec  = "SU2_CFD.py --nZone 2 --fsi True -f"
    pywrapper_fsi2d.timeout   = 1600
    pywrapper_fsi2d.tol       = 0.00001
    test_list.append(pywrapper_fsi2d)
    pass_list.append(pywrapper_fsi2d.run_test())
    
    # Tests summary
    print '=================================================================='
    print 'Summary of the serial tests'
    for i, test in enumerate(test_list):
        if (pass_list[i]):
            print '  passed - %s'%test.tag
        else:
            print '* FAILED - %s'%test.tag
    
    if all(pass_list):
        sys.exit(0)
    else:
        sys.exit(1)