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
e6e9e3bc
Verified
Commit
e6e9e3bc
authored
1 year ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(docs) Remove comments in validation cases.
parent
4ee56800
Branches
agardTest
Branches containing commit
No related tags found
1 merge request
!1
BLASTER v1.0
Pipeline
#20494
passed
1 year ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
blast/validation/agardValidation.py
+62
-54
62 additions, 54 deletions
blast/validation/agardValidation.py
blast/validation/lannValidation.py
+1
-13
1 addition, 13 deletions
blast/validation/lannValidation.py
blast/validation/oneraValidation.py
+1
-13
1 addition, 13 deletions
blast/validation/oneraValidation.py
with
64 additions
and
80 deletions
blast/validation/agardValidation.py
+
62
−
54
View file @
e6e9e3bc
...
...
@@ -18,19 +18,7 @@
# @author Paul Dechamps
# @date 2022
# Test the blast implementation. The test case is a compressible attached transitional flow.
# Tested functionalities;
# - Time integration.
# - Two time-marching techniques (agressive and safe).
# - Transition routines.
# - Forced transition.
# - Compressible flow routines.
# - Laminar and turbulent flow.
#
# Untested functionalities.
# - Separation routines.
# - Multiple failure case at one iteration.
# - Response to unconverged inviscid solver.
# Test the blast implementation on the 3D AGARD wing
# Imports.
...
...
@@ -68,7 +56,7 @@ def cfgInviscid(nthrds, verb):
'
dbc
'
:
True
,
'
Upstream
'
:
'
upstream
'
,
# Freestream
'
M_inf
'
:
0.9
54
,
# freestream Mach number
'
M_inf
'
:
0.9
6
,
# freestream Mach number
'
AoA
'
:
1
,
# freestream angle of attack
# Geometry
'
S_ref
'
:
0.35
,
# reference surface length
...
...
@@ -89,7 +77,7 @@ def cfgInviscid(nthrds, verb):
def
cfgBlast
(
verb
):
return
{
'
Re
'
:
6.7e6
,
# Freestream Reynolds number
'
Minf
'
:
0.9
54
,
# Freestream Mach number (used for the computation of the time step only)
'
Minf
'
:
0.9
6
,
# Freestream Mach number (used for the computation of the time step only)
'
CFL0
'
:
1
,
# Inital CFL number of the calculation
'
sections
'
:
np
.
linspace
(
0.026
,
0.7
,
15
),
...
...
@@ -121,49 +109,69 @@ def main():
icfg
=
cfgInviscid
(
args
.
k
,
args
.
verb
)
vcfg
=
cfgBlast
(
args
.
verb
)
parsViscous
=
{
'
nLe
'
:
15
,
'
nMid
'
:
30
,
'
nTe
'
:
7
,
'
nSpan
'
:
60
,
'
nWake
'
:
30
,
'
progLe
'
:
1.07
,
'
progMid
'
:
1.0
,
'
progTe
'
:
1.0
,
'
progSpan
'
:
1.0
,
'
progWake
'
:
1.15
}
vMsh
=
viscUtils
.
mesh
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
+
'
/models/dart/agard445_visc.geo
'
,
parsViscous
)
vcfg
[
'
vMsh
'
]
=
vMsh
tms
[
'
pre
'
].
start
()
coupler
,
iSolverAPI
,
vSolver
=
viscUtils
.
initBlast
(
icfg
,
vcfg
)
tms
[
'
pre
'
].
stop
()
print
(
ccolors
.
ANSI_BLUE
+
'
PySolving...
'
+
ccolors
.
ANSI_RESET
)
tms
[
'
solver
'
].
start
()
aeroCoeffs
=
coupler
.
run
()
tms
[
'
solver
'
].
stop
()
# Display results.
print
(
ccolors
.
ANSI_BLUE
+
'
PyRes...
'
+
ccolors
.
ANSI_RESET
)
print
(
'
Re M alpha Cl Cd Cdp Cdf Cm
'
)
print
(
'
{0:6.1f}e6 {1:8.2f} {2:8.1f} {3:8.4f} {4:8.4f} {5:8.4f} {6:8.4f} {7:8.4f}
'
.
format
(
vcfg
[
'
Re
'
]
/
1e6
,
iSolverAPI
.
getMinf
(),
iSolverAPI
.
getAoA
()
*
180
/
math
.
pi
,
iSolverAPI
.
getCl
(),
vSolver
.
Cdt
,
vSolver
.
Cdp
,
vSolver
.
Cdf
,
iSolverAPI
.
getCm
()))
# Write results to file.
vSolution
=
viscUtils
.
getSolution
(
vSolver
)
# Write results to file.
for
iSec
in
range
(
len
(
iSolverAPI
.
cfg
[
'
EffSections
'
])):
vSolution
=
viscUtils
.
getSolution
(
vSolver
,
iSec
)
viscUtils
.
write
(
vSolution
,
vSolver
.
getRe
(),
sfx
=
'
slice
'
+
str
(
iSec
))
vSolution
[
'
Cdt_int
'
]
=
vSolver
.
Cdf
+
iSolverAPI
.
getCd
()
# Save pressure coefficient
iSolverAPI
.
save
(
sfx
=
'
_viscous
'
)
tms
[
'
total
'
].
stop
()
print
(
ccolors
.
ANSI_BLUE
+
'
PyTiming...
'
+
ccolors
.
ANSI_RESET
)
print
(
'
CPU statistics
'
)
print
(
tms
)
print
(
'
SOLVERS statistics
'
)
print
(
coupler
.
tms
)
AoAVec
=
[
-
1
,
0.
,
1
]
sfxVec
=
[
'
_AoAminus1deg
'
,
'
_AoA0deg
'
,
'
_AoA1deg
'
]
for
i
in
range
(
3
):
vcfg
[
'
sfx
'
]
=
sfxVec
[
i
]
icfg
[
'
AoA
'
]
=
AoAVec
[
i
]
parsViscous
=
{
'
nLe
'
:
15
,
'
nMid
'
:
30
,
'
nTe
'
:
7
,
'
nSpan
'
:
60
,
'
nWake
'
:
30
,
'
progLe
'
:
1.07
,
'
progMid
'
:
1.0
,
'
progTe
'
:
1.0
,
'
progSpan
'
:
1.0
,
'
progWake
'
:
1.15
}
vMsh
=
viscUtils
.
mesh
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
+
'
/models/dart/agard445_visc.geo
'
,
parsViscous
)
vcfg
[
'
vMsh
'
]
=
vMsh
tms
[
'
pre
'
].
start
()
coupler
,
iSolverAPI
,
vSolver
=
viscUtils
.
initBlast
(
icfg
,
vcfg
)
tms
[
'
pre
'
].
stop
()
print
(
ccolors
.
ANSI_BLUE
+
'
PySolving...
'
+
ccolors
.
ANSI_RESET
)
tms
[
'
solver
'
].
start
()
aeroCoeffs
=
coupler
.
run
()
tms
[
'
solver
'
].
stop
()
# Display results.
print
(
ccolors
.
ANSI_BLUE
+
'
PyRes...
'
+
ccolors
.
ANSI_RESET
)
print
(
'
Re M alpha Cl Cd Cdp Cdf Cm
'
)
print
(
'
{0:6.1f}e6 {1:8.2f} {2:8.1f} {3:8.4f} {4:8.4f} {5:8.4f} {6:8.4f} {7:8.4f}
'
.
format
(
vcfg
[
'
Re
'
]
/
1e6
,
iSolverAPI
.
getMinf
(),
iSolverAPI
.
getAoA
()
*
180
/
math
.
pi
,
iSolverAPI
.
getCl
(),
vSolver
.
Cdt
,
vSolver
.
Cdp
,
vSolver
.
Cdf
,
iSolverAPI
.
getCm
()))
# Write results to file.
vSolution
=
viscUtils
.
getSolution
(
vSolver
)
# Write results to file.
for
iSec
in
range
(
len
(
iSolverAPI
.
cfg
[
'
EffSections
'
])):
vSolution
=
viscUtils
.
getSolution
(
vSolver
,
iSec
)
viscUtils
.
write
(
vSolution
,
vSolver
.
getRe
(),
sfx
=
sfxVec
[
i
]
+
'
slice
'
+
str
(
iSec
))
vSolution
[
'
Cdt_int
'
]
=
vSolver
.
Cdf
+
iSolverAPI
.
getCd
()
tms
[
'
total
'
].
stop
()
print
(
ccolors
.
ANSI_BLUE
+
'
PyTiming...
'
+
ccolors
.
ANSI_RESET
)
print
(
'
CPU statistics
'
)
print
(
tms
)
print
(
'
SOLVERS statistics
'
)
print
(
coupler
.
tms
)
cps
=
[]
for
s
in
sfxVec
:
cps_s
=
[]
for
i
in
range
(
len
(
vcfg
[
'
writeSections
'
])):
cps_s
.
append
(
np
.
loadtxt
(
'
/Users/pauldechamps/lab/softwares/blaster/workspace/blast_validation_agardValidation/agard445_viscous
'
+
s
+
'
_slice_
'
+
str
(
i
)
+
'
.dat
'
,
delimiter
=
'
,
'
,
skiprows
=
1
))
cps
.
append
(
cps_s
)
# Plotting
from
matplotlib
import
pyplot
as
plt
for
i
in
range
(
len
(
vcfg
[
'
writeSections
'
])):
plt
.
figure
(
i
)
for
j
in
range
(
len
(
sfxVec
)):
plt
.
plot
(
cps
[
j
][
i
][:,
3
],
cps
[
j
][
i
][:,
4
],
label
=
sfxVec
[
j
].
replace
(
'
_
'
,
'
'
))
plt
.
legend
()
plt
.
title
(
'
Section
'
+
str
(
i
))
plt
.
xlabel
(
'
x
'
)
plt
.
ylabel
(
'
cp
'
)
plt
.
show
()
# Test solution
print
(
ccolors
.
ANSI_BLUE
+
'
PyTesting...
'
+
ccolors
.
ANSI_RESET
)
tests
=
CTests
()
tests
.
add
(
CTest
(
'
Cl
'
,
iSolverAPI
.
getCl
(),
0.069
,
5e-2
))
tests
.
add
(
CTest
(
'
Cd
wake
'
,
vSolution
[
'
Cdt_int
'
],
0.00498
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Cd
'
,
vSolution
[
'
Cdt_int
'
],
0.00498
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Iterations
'
,
len
(
aeroCoeffs
),
8
,
0
,
forceabs
=
True
))
tests
.
run
()
...
...
This diff is collapsed.
Click to expand it.
blast/validation/lannValidation.py
+
1
−
13
View file @
e6e9e3bc
...
...
@@ -18,19 +18,7 @@
# @author Paul Dechamps
# @date 2022
# Test the blast implementation. The test case is a compressible attached transitional flow.
# Tested functionalities;
# - Time integration.
# - Two time-marching techniques (agressive and safe).
# - Transition routines.
# - Forced transition.
# - Compressible flow routines.
# - Laminar and turbulent flow.
#
# Untested functionalities.
# - Separation routines.
# - Multiple failure case at one iteration.
# - Response to unconverged inviscid solver.
# Test the blast implementation on the 3D LANN wing.
# Imports.
...
...
This diff is collapsed.
Click to expand it.
blast/validation/oneraValidation.py
+
1
−
13
View file @
e6e9e3bc
...
...
@@ -18,19 +18,7 @@
# @author Paul Dechamps
# @date 2022
# Test the blast implementation. The test case is a compressible attached transitional flow.
# Tested functionalities;
# - Time integration.
# - Two time-marching techniques (agressive and safe).
# - Transition routines.
# - Forced transition.
# - Compressible flow routines.
# - Laminar and turbulent flow.
#
# Untested functionalities.
# - Separation routines.
# - Multiple failure case at one iteration.
# - Response to unconverged inviscid solver.
# Test the blast implementation on the 3D ONERA M6 wing.
# Imports.
...
...
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