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
727915b8
Verified
Commit
727915b8
authored
3 months ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(refactor) Refactor RAE 3D case
parent
c6e5a3d1
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
BLASTER v1.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
blast/tests/dart/rae2822_3D.py
+17
-32
17 additions, 32 deletions
blast/tests/dart/rae2822_3D.py
with
17 additions
and
32 deletions
blast/tests/dart/rae2822_3D.py
+
17
−
32
View file @
727915b8
...
...
@@ -18,23 +18,13 @@
# @author Paul Dechamps
# @date 2022
# Test the blast implementation.
The test case is a compressible attached transitional flow.
# Test the blast
er 3D
implementation.
# 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.
# - Fully turbulent 3D compressible flow.
# Imports.
import
blast.utils
as
v
iscU
tils
import
blast.utils
as
v
u
tils
import
numpy
as
np
import
os.path
...
...
@@ -66,7 +56,6 @@ def cfgInviscid(nthrds, verb):
'
WakeTips
'
:
[
'
wakeTip
'
],
# LIST of names of physical group containing the edge of the wake
'
Tes
'
:
[
'
te
'
],
# LIST of names of physical group containing the trailing edge
'
Symmetry
'
:
'
symmetry
'
,
# name of physical group containing the symmetry BC
'
dbc
'
:
True
,
'
Upstream
'
:
'
upstream
'
,
# Freestream
'
M_inf
'
:
0.8
,
# freestream Mach number
...
...
@@ -93,24 +82,23 @@ def cfgBlast(verb):
'
Minf
'
:
0.8
,
# Freestream Mach number (used for the computation of the time step only)
'
CFL0
'
:
1
,
# Inital CFL number of the calculation
'
sections
'
:
np
.
linspace
(
0.01
,
0.95
,
3
),
'
writeSections
'
:
[
0.2
,
0.4
,
0.6
,
0.8
,
1.0
],
'
Sym
'
:[
0.
],
'
span
'
:
1.
,
'
interpolator
'
:
'
Rbf
'
,
'
rbftype
'
:
'
linear
'
,
'
smoothing
'
:
1e-8
,
'
degree
'
:
0
,
'
neighbors
'
:
10
,
'
saveTag
'
:
4
,
'
sections
'
:
np
.
linspace
(
0.01
,
0.95
,
3
),
# Sections on the wing
'
writeSections
'
:
[
0.2
,
0.4
,
0.6
,
0.8
,
1.0
],
# Spanwise locations to write the solution
'
Sym
'
:[
0.
],
# Symmetry plane
'
span
'
:
1.
,
# Span of the wing
'
interpolator
'
:
'
Rbf
'
,
# Interpolator type
'
rbftype
'
:
'
linear
'
,
# Radial basis function (rbf) type
'
smoothing
'
:
1e-8
,
# rbf smoothing factor
'
degree
'
:
0
,
# Degree of the interpolator
'
neighbors
'
:
10
,
# Number of neighbors for the interpolator
'
saveTag
'
:
4
,
# Tag to save the solution with VTK
'
Verb
'
:
verb
,
# Verbosity level of the solver
'
couplIter
'
:
5
,
# Maximum number of iterations
'
couplIter
'
:
5
,
# Maximum number of iterations
'
couplTol
'
:
5e-2
,
# Tolerance of the VII methodology
'
iterPrint
'
:
1
,
# int, number of iterations between outputs
'
resetInv
'
:
False
,
# bool, flag to reset the inviscid calculation at every iteration.
'
xtrF
'
:
[
0.
,
0.
],
# Forced transition location
'
nDim
'
:
3
'
xtrF
'
:
[
0.
,
0.
],
# Forced transition locations
}
def
main
():
...
...
@@ -127,11 +115,11 @@ def main():
'
progLe
'
:
1.1
,
'
progMid
'
:
1.0
,
'
progTe
'
:
1.0
,
'
progSpan
'
:
1.0
,
'
progWake
'
:
1.15
}
vMeshFile
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
abspath
(
__file__
),
'
../../../models/dart/rae_3_visc.geo
'
))
vMsh
=
v
iscU
tils
.
mesh
(
vMeshFile
,
parsViscous
)
vMsh
=
v
u
tils
.
mesh
(
vMeshFile
,
parsViscous
)
vcfg
[
'
vMsh
'
]
=
vMsh
tms
[
'
pre
'
].
start
()
coupler
,
isol
,
vsol
=
v
iscU
tils
.
initBlast
(
icfg
,
vcfg
)
coupler
,
isol
,
vsol
=
v
u
tils
.
initBlast
(
icfg
,
vcfg
)
tms
[
'
pre
'
].
stop
()
print
(
ccolors
.
ANSI_BLUE
+
'
PySolving...
'
+
ccolors
.
ANSI_RESET
)
...
...
@@ -144,9 +132,6 @@ def main():
print
(
'
Re M alpha Cl Cd Cd_wake 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} {8:8.4f}
'
.
format
(
vcfg
[
'
Re
'
]
/
1e6
,
isol
.
getMinf
(),
isol
.
getAoA
()
*
180
/
math
.
pi
,
isol
.
getCl
(),
vsol
.
Cdf
+
isol
.
getCd
(),
vsol
.
Cdt
,
vsol
.
Cdp
,
vsol
.
Cdf
,
isol
.
getCm
()))
# Write results to file.
vSolution
=
viscUtils
.
getSolution
(
isol
.
sec
,
write
=
True
,
toW
=
'
all
'
)
# Save results
isol
.
save
(
sfx
=
'
_viscous
'
)
tms
[
'
total
'
].
stop
()
...
...
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