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
50185a0b
Commit
50185a0b
authored
2 weeks ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(tests) Updated (some) test cases
parent
9116fa17
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
blast/tests/dart/t_naca0012_2D_rbf.py
+3
-3
3 additions, 3 deletions
blast/tests/dart/t_naca0012_2D_rbf.py
blast/tests/t_restart_2D.py
+7
-9
7 additions, 9 deletions
blast/tests/t_restart_2D.py
blast/validation/v_oneraM6_3D.py
+3
-3
3 additions, 3 deletions
blast/validation/v_oneraM6_3D.py
with
13 additions
and
15 deletions
blast/tests/dart/t_naca0012_2D_rbf.py
+
3
−
3
View file @
50185a0b
...
...
@@ -128,7 +128,7 @@ def main():
aeroCoeffs
=
coupler
.
run
()
tms
[
'
solver_match
'
].
stop
()
cl_match
=
isol
.
getCl
()
cd_match
=
isol
.
getCd
()
+
vsol
.
Cdf
cd_match
=
isol
.
getCd
()
+
vsol
.
get
Cdf
()
vsolution_match
=
viscUtils
.
getSolution
(
vsol
.
bodies
[
0
].
sections
,
write
=
False
)[
0
]
del
coupler
...
...
@@ -143,13 +143,13 @@ def main():
aeroCoeffs
=
coupler
.
run
()
tms
[
'
solver_rbf
'
].
stop
()
cl_rbf
=
isol
.
getCl
()
cd_rbf
=
isol
.
getCd
()
+
vsol
.
Cdf
cd_rbf
=
isol
.
getCd
()
+
vsol
.
get
Cdf
()
vsolution_rbf
=
viscUtils
.
getSolution
(
vsol
.
bodies
[
0
].
sections
,
write
=
False
)[
0
]
# 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
,
isol
.
getMinf
(),
isol
.
getAoA
()
*
180
/
math
.
pi
,
isol
.
getCl
(),
vsol
.
Cdt
,
vsol
.
Cdp
,
vsol
.
Cdf
,
isol
.
getCm
()))
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
.
get
Cdt
()
,
vsol
.
get
Cdp
()
,
vsol
.
get
Cdf
()
,
isol
.
getCm
()))
# Write results to file.
vSolution
=
viscUtils
.
getSolution
(
vsol
.
bodies
[
0
].
sections
,
write
=
True
,
toW
=
'
all
'
)
...
...
This diff is collapsed.
Click to expand it.
blast/tests/t_restart_2D.py
+
7
−
9
View file @
50185a0b
...
...
@@ -112,20 +112,20 @@ def main():
print
(
ccolors
.
ANSI_BLUE
+
'
PySolving...
'
+
ccolors
.
ANSI_RESET
)
tms
[
'
solver
'
].
start
()
aeroCoeffs_ref
=
coupler
.
run
()
aeroCoeffs_ref
=
coupler
.
run
(
write
=
False
)
tms
[
'
solver
'
].
stop
()
del
isol
,
vsol
,
coupler
vcfg
[
"
restart_solution
"
]
=
True
vcfg
[
"
restart_inputName
"
]
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))))
\
+
'
/workspace/blast_tests_t_restart/
'
\
+
'
/workspace/blast_tests_t_restart
_2D
/
'
\
+
vcfg
[
"
restart_outputName
"
]
+
f
"
_
{
iterRestart
}
"
vcfg
[
"
iterSaveRestart
"
]
=
float
(
'
inf
'
)
vcfg
[
"
iterSaveRestart
"
]
=
float
(
'
inf
'
)
# Never save restart
coupler
,
isol
,
vsol
=
vutils
.
initBlast
(
icfg
,
vcfg
)
aeroCoeff_restart
=
coupler
.
run
()
aeroCoeff_restart
=
coupler
.
run
(
write
=
False
)
# Save in vtk format
vutils
.
save
(
vsol
.
bodies
[
0
].
sections
)
...
...
@@ -133,7 +133,7 @@ def main():
# 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
,
isol
.
getMinf
(),
isol
.
getAoA
()
*
180
/
math
.
pi
,
isol
.
getCl
(),
vsol
.
Cdt
,
vsol
.
Cdp
,
vsol
.
Cdf
,
isol
.
getCm
()))
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
.
get
Cdt
()
,
vsol
.
get
Cdp
()
,
vsol
.
get
Cdf
()
,
isol
.
getCm
()))
print
(
''
)
total_iters_ref
=
len
(
aeroCoeffs_ref
[
'
Cl
'
])
total_iters_restart
=
len
(
aeroCoeff_restart
[
'
Cl
'
])
...
...
@@ -148,10 +148,8 @@ def main():
print
(
'
SOLVERS statistics
'
)
print
(
coupler
.
tms
)
bl_solution
=
vutils
.
getSolution
(
vsol
.
bodies
[
0
].
sections
,
write
=
False
)[
0
]
final_res_ref
=
np
.
log10
((
aeroCoeffs_ref
[
'
Cd
'
][
-
1
]
-
aeroCoeffs_ref
[
'
Cd
'
][
-
2
])
/
aeroCoeffs_ref
[
'
Cd
'
][
-
1
])
final_res_restart
=
np
.
log10
((
aeroCoeff_restart
[
'
Cd
'
][
-
1
]
-
aeroCoeff_restart
[
'
Cd
'
][
-
2
])
/
aeroCoeff_restart
[
'
Cd
'
][
-
1
])
final_res_ref
=
np
.
log10
(
abs
((
aeroCoeffs_ref
[
'
Cd
'
][
-
1
]
-
aeroCoeffs_ref
[
'
Cd
'
][
-
2
])
/
aeroCoeffs_ref
[
'
Cd
'
][
-
1
]))
final_res_restart
=
np
.
log10
(
abs
((
aeroCoeff_restart
[
'
Cd
'
][
-
1
]
-
aeroCoeff_restart
[
'
Cd
'
][
-
2
])
/
aeroCoeff_restart
[
'
Cd
'
][
-
1
]))
# Test solution
print
(
ccolors
.
ANSI_BLUE
+
'
PyTesting...
'
+
ccolors
.
ANSI_RESET
)
...
...
This diff is collapsed.
Click to expand it.
blast/validation/v_oneraM6_3D.py
+
3
−
3
View file @
50185a0b
...
...
@@ -134,7 +134,7 @@ def main():
# 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
,
isol
.
getMinf
(),
isol
.
getAoA
()
*
180
/
math
.
pi
,
isol
.
getCl
(),
vsol
.
Cdt
,
vsol
.
Cdp
,
vsol
.
Cdf
,
isol
.
getCm
()))
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
.
get
Cdt
()
,
vsol
.
get
Cdp
()
,
vsol
.
get
Cdf
()
,
isol
.
getCm
()))
# Write results to file.
vSolution
=
vutils
.
getSolution
(
vsol
.
bodies
[
0
].
sections
,
write
=
True
,
toW
=
'
all
'
)[
0
]
...
...
@@ -153,8 +153,8 @@ 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.0116
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Cd int
'
,
isol
.
getCd
()
+
vsol
.
Cdf
,
0.01965
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Cd wake
'
,
vsol
.
get
Cdt
()
,
0.0116
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Cd int
'
,
isol
.
getCd
()
+
vsol
.
get
Cdf
()
,
0.01965
,
1e-3
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Iterations
'
,
len
(
aeroCoeffs
[
'
Cl
'
]),
13
,
0
,
forceabs
=
True
))
tests
.
run
()
...
...
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