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
c5481495
Verified
Commit
c5481495
authored
3 months ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(fix) Fixed onera validation case
parent
3941c1bb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
blast/validation/v_oneraM6_3D.py
+40
-28
40 additions, 28 deletions
blast/validation/v_oneraM6_3D.py
with
40 additions
and
28 deletions
blast/validation/v_oneraM6_3D.py
+
40
−
28
View file @
c5481495
...
...
@@ -18,7 +18,7 @@
# @author Paul Dechamps
# @date 2023
# Test the blast implementation on the 3D ONERA M6 wing.
# Test the blast
er
implementation on the 3D ONERA M6 wing.
# Imports.
...
...
@@ -70,32 +70,43 @@ def cfgInviscid(nthrds, verb):
'
G_restart
'
:
50
,
# restart for GMRES
'
Rel_tol
'
:
1e-6
,
# relative tolerance on solver residual
'
Abs_tol
'
:
1e-8
,
# absolute tolerance on solver residual
'
Max_it
'
:
5
0
# solver maximum number of iterations
'
Max_it
'
:
2
0
# solver maximum number of iterations
}
def
cfgBlast
(
verb
):
return
{
'
Re
'
:
11.72e6
,
# Freestream Reynolds number
'
Minf
'
:
0.839
,
# 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
,
1.15
,
20
),
'
writeSections
'
:
[
0.20
,
0.44
,
0.80
],
'
Sym
'
:[
0.
],
'
span
'
:
1.196
,
'
interpolator
'
:
'
Rbf
'
,
'
rbftype
'
:
'
linear
'
,
'
smoothing
'
:
1e-8
,
'
degree
'
:
0
,
'
neighbors
'
:
10
,
'
saveTag
'
:
5
,
'
Verb
'
:
verb
,
# Verbosity level of the solver
'
couplIter
'
:
50
,
# Maximum number of iterations
'
couplTol
'
:
5e-4
,
# Tolerance of the VII methodology
'
iterPrint
'
:
5
,
# int, number of iterations between outputs
'
resetInv
'
:
True
,
# bool, flag to reset the inviscid calculation at every iteration.
'
xtrF
'
:
[
0.01
,
0.01
],
# Forced transition location
# General problem definition
'
Re
'
:
11.72e6
,
# Freestream Reynolds number
'
Minf
'
:
0.839
,
# Freestream Mach number (used for the computation of the time step only)
'
CFL0
'
:
1
,
# Inital CFL number of the calculation
'
xtrF
'
:
[
0.01
,
0.01
],
# Forced transition location
'
spans
'
:
[
1.196
],
# Span of the wing
# Post-processing options
'
writeSections
'
:
[
0.20
,
0.44
,
0.80
],
# Spanwise locations of the sections to write the solution
'
saveTag
'
:
5
,
# wing tag number to save the solution
# Sections generation
'
sections
'
:
[
np
.
linspace
(
0.026
,
1.15
,
20
)],
# Section spanwise locations
'
genSections
'
:
'
file
'
,
# Section generation type ['auto', 'file', 'vtk]
'
nPoints
'
:
300
,
# Number of points on the section
# Each section will have nPoints+1
# points because of the duplicate TE
# Solution interpolation
'
interpolator
'
:
'
Rbf
'
,
# Interpolator type
'
rbftype
'
:
'
linear
'
,
# Kernel RBF interpolator
'
smoothing
'
:
1e-8
,
# Smoothing factor of the RBF interpolator
'
degree
'
:
0
,
# Degree of the interpolator polynomial
'
neighbors
'
:
10
,
# Number of neighbors for the RBF interpolator
'
Sym
'
:
[
0.
],
# List of symmetry planes
# Coupling parameters
'
Verb
'
:
verb
,
# Verbosity level of the solver
'
couplIter
'
:
50
,
# Maximum number of iterations
'
couplTol
'
:
5e-4
,
# Tolerance of the VII methodology
'
iterPrint
'
:
5
,
# int, number of iterations between outputs
'
resetInv
'
:
True
,
# bool, flag to reset the inviscid calculation at every iteration.
}
def
main
():
...
...
@@ -107,9 +118,10 @@ def main():
icfg
=
cfgInviscid
(
args
.
k
,
args
.
verb
)
vcfg
=
cfgBlast
(
args
.
verb
)
# Create the viscous mesh.
parsViscous
=
{
'
nLe
'
:
20
,
'
nTe
'
:
8
,
'
nMid
'
:
40
,
'
nSpan
'
:
60
,
'
nWake
'
:
20
}
vMsh
=
vutils
.
mesh
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
+
'
/models/dart/onera_visc.geo
'
,
parsViscous
)
vcfg
[
'
vMsh
'
]
=
vMsh
vcfg
[
'
vMsh
'
]
=
[
vMsh
]
tms
[
'
pre
'
].
start
()
coupler
,
isol
,
vsol
=
vutils
.
initBlast
(
icfg
,
vcfg
)
...
...
@@ -126,7 +138,7 @@ def main():
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
,
isol
.
getMinf
(),
isol
.
getAoA
()
*
180
/
math
.
pi
,
isol
.
getCl
(),
vsol
.
Cdt
,
vsol
.
Cdp
,
vsol
.
Cdf
,
isol
.
getCm
()))
# Write results to file.
vSolution
=
vutils
.
getSolution
(
i
sol
.
sec
,
write
=
True
,
toW
=
'
all
'
,
sfx
=
'
onera
'
)
vSolution
=
vutils
.
getSolution
(
v
sol
.
bodies
[
0
].
sections
,
write
=
True
,
toW
=
'
all
'
)[
0
]
# Save pressure coefficient
isol
.
save
(
sfx
=
'
_viscous
'
)
...
...
@@ -142,9 +154,9 @@ def main():
print
(
ccolors
.
ANSI_BLUE
+
'
PyTesting...
'
+
ccolors
.
ANSI_RESET
)
tests
=
CTests
()
tests
.
add
(
CTest
(
'
Cl
'
,
isol
.
getCl
(),
0.283
,
5e-2
))
tests
.
add
(
CTest
(
'
Cd wake
'
,
vsol
.
Cdt
,
0.0
062
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Cd int
'
,
isol
.
getCd
()
+
vsol
.
Cdf
,
0.0
156
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Iterations
'
,
len
(
aeroCoeffs
[
'
Cl
'
]),
1
4
,
0
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Cd wake
'
,
vsol
.
Cdt
,
0.0
138
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Cd int
'
,
isol
.
getCd
()
+
vsol
.
Cdf
,
0.0
212
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Iterations
'
,
len
(
aeroCoeffs
[
'
Cl
'
]),
1
3
,
0
,
forceabs
=
True
))
tests
.
run
()
# eof
...
...
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