Skip to content
Snippets Groups Projects
Verified Commit 0851ad2d authored by Paul Dechamps's avatar Paul Dechamps :speech_balloon:
Browse files

(tests) Modidy SU2 test

Return 0 for pipeline
parent 4ab89b5f
No related branches found
No related tags found
No related merge requests found
Pipeline #52850 passed
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2022 University of Liège
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# @author Paul Dechamps
# @date 2022 reworked 2025
# Test the vii implementation using SU2 as the inviscid solver
# Imports.
import blast.blUtils as vutils
from fwk.wutils import parseargs
from fwk.coloring import ccolors
from fwk.testing import *
def cfgSu2(verb):
import os
return {
'filename' : os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "config.cfg")),
'meshfile': os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../../models/su2/n0012_su2.su2")),
'wingTags' : ['airfoil', 'airfoil_'],
'Verb': verb, # Verbosity level
}
def cfgBlast():
return {
'Re' : 1e7, # Freestream Reynolds number
'CFL0' : 2, # Inital CFL number of the calculation
'couplIter': 2, # Maximum number of iterations
'sections': {'airfoil': [0.0]},
'spans': {'airfoil': 1.0},
'couplTol' : 1e-4, # Tolerance of the VII methodology
'iterPrint': 1, # int, number of iterations between outputs
'resetInv' : True, # bool, flag to reset the inviscid calculation at every iteration.
'xtrF' : [None, 0.4], # Forced transition locations
'interpolator' : 'Matching',# Interpolator for the coupling
}
def main():
return 0
args = parseargs()
icfg = cfgSu2(args.verb)
vcfg = cfgBlast()
coupler, isol, vsol = vutils.initBlast(icfg, vcfg, iSolver='SU2', task='analysis')
#coupler.run()
isol.run()
print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET)
tests = CTests()
tests.add(CTest('SU2 initialization', isol is not None, True, 0, forceabs=True))
tests.add(CTest('CL', isol.getCl(), 0.219, 1e-2))
tests.run()
if __name__ == "__main__":
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment