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
6feeee0b
Verified
Commit
6feeee0b
authored
5 months ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(fix) Fix format + API test
parent
eac86b00
No related branches found
No related tags found
1 merge request
!1
BLASTER v1.0
Pipeline
#49400
passed
5 months ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
blast/src/DClosures.cpp
+4
-2
4 additions, 2 deletions
blast/src/DClosures.cpp
blast/tests/apiTest.py
+3
-5
3 additions, 5 deletions
blast/tests/apiTest.py
with
7 additions
and
7 deletions
blast/src/DClosures.cpp
+
4
−
2
View file @
6feeee0b
...
...
@@ -190,7 +190,8 @@ void Closures::turbulentClosures(std::vector<double> &closureVars, double theta,
// ctEq = std::sqrt(Hstar * 0.015/(1-us) * (Hk-1)*(Hk-1)*(Hk-1)/(Hk*Hk*H));
// // Drela 1987
}
if
(
n
*
Hstar
*
Ctcon
*
((
Hk
-
1.
)
*
Hkc
*
Hkc
)
/
((
1.
-
us
)
*
(
Hk
*
Hk
)
*
H
)
<
if
(
n
*
Hstar
*
Ctcon
*
((
Hk
-
1.
)
*
Hkc
*
Hkc
)
/
((
1.
-
us
)
*
(
Hk
*
Hk
)
*
H
)
<
0.
)
std
::
cout
<<
"Negative sqrt encountered "
<<
std
::
endl
;
...
...
@@ -268,7 +269,8 @@ void Closures::turbulentClosures(double &closureVars, double theta, double H,
ctEq
=
std
::
sqrt
(
Hstar
*
Ctcon
*
((
Hk
-
1.
)
*
Hkc
*
Hkc
)
/
((
1.
-
us
)
*
(
Hk
*
Hk
)
*
H
));
// Here it is ctEq^0.5
}
if
(
Hstar
*
Ctcon
*
((
Hk
-
1.
)
*
Hkc
*
Hkc
)
/
((
1.
-
us
)
*
(
Hk
*
Hk
)
*
H
)
<
0.
)
if
(
Hstar
*
Ctcon
*
((
Hk
-
1.
)
*
Hkc
*
Hkc
)
/
((
1.
-
us
)
*
(
Hk
*
Hk
)
*
H
)
<
0.
)
std
::
cout
<<
"Negative sqrt encountered "
<<
std
::
endl
;
closureVars
=
ctEq
;
...
...
This diff is collapsed.
Click to expand it.
blast/tests/apiTest.py
+
3
−
5
View file @
6feeee0b
...
...
@@ -82,7 +82,7 @@ def cfgInviscid(nthrds, verb):
def
cfgBlast
(
verb
):
return
{
'
Re
'
:
1e
6
,
# Freestream Reynolds number
'
Re
'
:
1e
7
,
# Freestream Reynolds number
'
Minf
'
:
0.2
,
# Freestream Mach number (used for the computation of the time step only)
'
CFL0
'
:
1
,
# Inital CFL number of the calculation
'
Verb
'
:
verb
,
# Verbosity level of the solver
...
...
@@ -150,10 +150,8 @@ def main():
print
(
tms
)
print
(
ccolors
.
ANSI_BLUE
+
'
PyTesting
'
+
ccolors
.
ANSI_RESET
)
tests
=
CTests
()
tests
.
add
(
CTest
(
'
Cl
'
,
isol
.
getCl
(),
0.226
,
1e-2
))
tests
.
add
(
CTest
(
'
Cd
'
,
isol
.
getCd
()
+
vsol
.
Cdf
,
0.00587
,
1e-2
))
tests
.
add
(
CTest
(
'
dCl_dAoA
'
,
adj
.
tdCl_AoA
,
5.47
,
1e-3
))
tests
.
add
(
CTest
(
'
dCd_dAoA
'
,
adj
.
tdCd_AoA
,
0.09531
,
1e-3
))
tests
.
add
(
CTest
(
'
Cl
'
,
isol
.
getCl
(),
0.234
,
1e-2
,
forceabs
=
True
))
tests
.
add
(
CTest
(
'
Cd
'
,
isol
.
getCd
()
+
vsol
.
Cdf
,
0.005
,
1e-2
,
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