Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
blaster
Commits
0851ad2d
Verified
Commit
0851ad2d
authored
2 months ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(tests) Modidy SU2 test
Return 0 for pipeline
parent
4ab89b5f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#52850
passed
2 months ago
Stage: build
Stage: test
Stage: validation
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
blast/tests/su2/t_n0012_su2_2D.py
+68
-0
68 additions, 0 deletions
blast/tests/su2/t_n0012_su2_2D.py
with
68 additions
and
0 deletions
blast/tests/su2/t_n0012_su2_2D.py
0 → 100644
+
68
−
0
View file @
0851ad2d
#!/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
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment