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
e70e41ad
Verified
Commit
e70e41ad
authored
3 months ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(refactor) Removed commented code an unecessary function
Use the function getSolution in utils to get the viscous solution
parent
b88d5283
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#51850
passed
3 months ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
blast/src/blDriver.cpp
+4
-132
4 additions, 132 deletions
blast/src/blDriver.cpp
blast/src/blDriver.h
+0
-1
0 additions, 1 deletion
blast/src/blDriver.h
with
4 additions
and
133 deletions
blast/src/blDriver.cpp
+
4
−
132
View file @
e70e41ad
...
...
@@ -278,29 +278,12 @@ void Driver::averageTransition(size_t iPoint, BoundaryLayer *bl, bool forced)
double
avTurb
=
(
bl
->
xoc
[
iPoint
]
-
bl
->
xtr
)
/
(
bl
->
xoc
[
iPoint
]
-
bl
->
xoc
[
iPoint
-
1
]);
if
(
avTurb
<
0.
-
1e-12
)
avTurb
=
0.
;
if
(
avTurb
>
1.
+
1e-12
)
avTurb
=
1.
;
if
(
avTurb
<
0.
-
1e-12
)
avTurb
=
0.
;
if
(
avTurb
>
1.
+
1e-12
)
avTurb
=
1.
;
double
avLam
=
1.
-
avTurb
;
// std::cout << "avTurb " << avTurb << " avLam " << avLam << std::endl;
//if (avTurb < 0. || avTurb > 1. || avLam < 0. || avLam > 1.)
//{
// bl->printSolution(iPoint);
// bl->printSolution(iPoint - 1);
// std::cout << "dx " << std::abs(bl->xoc[iPoint] - bl->xoc[iPoint - 1])
// << std::endl;
// std::cout << " (bl->u[iPoint * nVar + 2] - bl->u[(iPoint - 1) * nVar + 2]) "
// << (bl->u[iPoint * nVar + 2] - bl->u[(iPoint - 1) * nVar + 2])
// << std::endl;
// std::cout << " bl->getnCrit() - bl->u[(iPoint - 1) * nVar + 2] "
// << bl->getnCrit() - bl->u[(iPoint - 1) * nVar + 2] << std::endl;
// std::cout << "xtr " << bl->xtr << std::endl;
// std::cout << "avTurb " << avTurb << " avLam " << avLam << std::endl;
// throw std::runtime_error("Transition location out of bounds.");
//}
// Impose boundary condition.
double
Cteq_trans
;
bl
->
closSolver
->
turbulentClosures
(
Cteq_trans
,
bl
->
u
[(
iPoint
-
1
)
*
nVar
+
0
],
...
...
@@ -563,114 +546,3 @@ int Driver::outputStatus(double maxMach) const
std
::
cout
<<
""
<<
std
::
endl
;
return
solverExitCode
;
}
/**
* @brief Returns the integral boundary layer solution in a section (sorted from
* upper Te to lower Te than wake).
*
* @param iSec id of the considered section.
* @return std::vector<std::vector<double>>
*/
std
::
vector
<
std
::
vector
<
double
>>
Driver
::
getSolution
(
size_t
iSec
)
{
size_t
nMarkersUp
=
sections
[
iSec
][
0
]
->
nNodes
;
size_t
nMarkersLw
=
sections
[
iSec
][
1
]
->
nNodes
;
// No stagnation point doublon.
size_t
nVar
=
sections
[
iSec
][
0
]
->
getnVar
();
std
::
vector
<
std
::
vector
<
double
>>
Sln
(
20
);
for
(
size_t
iVector
=
0
;
iVector
<
Sln
.
size
();
++
iVector
)
Sln
[
iVector
].
resize
(
nMarkersUp
+
nMarkersLw
+
sections
[
iSec
][
2
]
->
nNodes
,
0.
);
// Upper side.
size_t
revPoint
=
nMarkersUp
-
1
;
for
(
size_t
iPoint
=
0
;
iPoint
<
nMarkersUp
;
++
iPoint
)
{
Sln
[
0
][
iPoint
]
=
sections
[
iSec
][
0
]
->
u
[
revPoint
*
nVar
+
0
];
Sln
[
1
][
iPoint
]
=
sections
[
iSec
][
0
]
->
u
[
revPoint
*
nVar
+
1
];
Sln
[
2
][
iPoint
]
=
sections
[
iSec
][
0
]
->
u
[
revPoint
*
nVar
+
2
];
Sln
[
3
][
iPoint
]
=
sections
[
iSec
][
0
]
->
u
[
revPoint
*
nVar
+
3
];
Sln
[
4
][
iPoint
]
=
sections
[
iSec
][
0
]
->
u
[
revPoint
*
nVar
+
4
];
Sln
[
5
][
iPoint
]
=
sections
[
iSec
][
0
]
->
deltaStar
[
revPoint
];
Sln
[
6
][
iPoint
]
=
sections
[
iSec
][
0
]
->
Ret
[
revPoint
];
Sln
[
7
][
iPoint
]
=
sections
[
iSec
][
0
]
->
cd
[
revPoint
];
Sln
[
8
][
iPoint
]
=
sections
[
iSec
][
0
]
->
cf
[
revPoint
];
Sln
[
9
][
iPoint
]
=
sections
[
iSec
][
0
]
->
Hstar
[
revPoint
];
Sln
[
10
][
iPoint
]
=
sections
[
iSec
][
0
]
->
Hstar2
[
revPoint
];
Sln
[
11
][
iPoint
]
=
sections
[
iSec
][
0
]
->
Hk
[
revPoint
];
Sln
[
12
][
iPoint
]
=
sections
[
iSec
][
0
]
->
ctEq
[
revPoint
];
Sln
[
13
][
iPoint
]
=
sections
[
iSec
][
0
]
->
us
[
revPoint
];
Sln
[
14
][
iPoint
]
=
sections
[
iSec
][
0
]
->
delta
[
revPoint
];
Sln
[
15
][
iPoint
]
=
sections
[
iSec
][
0
]
->
x
[
revPoint
];
Sln
[
16
][
iPoint
]
=
sections
[
iSec
][
0
]
->
xoc
[
revPoint
];
Sln
[
17
][
iPoint
]
=
sections
[
iSec
][
0
]
->
y
[
revPoint
];
Sln
[
18
][
iPoint
]
=
sections
[
iSec
][
0
]
->
z
[
revPoint
];
Sln
[
19
][
iPoint
]
=
sections
[
iSec
][
0
]
->
vt
[
revPoint
];
--
revPoint
;
}
// Lower side.
for
(
size_t
iPoint
=
0
;
iPoint
<
sections
[
iSec
][
1
]
->
nNodes
;
++
iPoint
)
{
Sln
[
0
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
u
[
iPoint
*
nVar
+
0
];
Sln
[
1
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
u
[
iPoint
*
nVar
+
1
];
Sln
[
2
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
u
[
iPoint
*
nVar
+
2
];
Sln
[
3
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
u
[
iPoint
*
nVar
+
3
];
Sln
[
4
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
u
[
iPoint
*
nVar
+
4
];
Sln
[
5
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
deltaStar
[
iPoint
];
Sln
[
6
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
Ret
[
iPoint
];
Sln
[
7
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
cd
[
iPoint
];
Sln
[
8
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
cf
[
iPoint
];
Sln
[
9
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
Hstar
[
iPoint
];
Sln
[
10
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
Hstar2
[
iPoint
];
Sln
[
11
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
Hk
[
iPoint
];
Sln
[
12
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
ctEq
[
iPoint
];
Sln
[
13
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
us
[
iPoint
];
Sln
[
14
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
delta
[
iPoint
];
Sln
[
15
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
x
[
iPoint
];
Sln
[
16
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
xoc
[
iPoint
];
Sln
[
17
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
y
[
iPoint
];
Sln
[
18
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
z
[
iPoint
];
Sln
[
19
][
nMarkersUp
+
iPoint
]
=
sections
[
iSec
][
1
]
->
vt
[
iPoint
];
}
// Wake.
for
(
size_t
iPoint
=
0
;
iPoint
<
sections
[
iSec
][
2
]
->
nNodes
;
++
iPoint
)
{
Sln
[
0
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
u
[
iPoint
*
nVar
+
0
];
Sln
[
1
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
u
[
iPoint
*
nVar
+
1
];
Sln
[
2
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
u
[
iPoint
*
nVar
+
2
];
Sln
[
3
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
u
[
iPoint
*
nVar
+
3
];
Sln
[
4
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
u
[
iPoint
*
nVar
+
4
];
Sln
[
5
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
deltaStar
[
iPoint
];
Sln
[
6
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
Ret
[
iPoint
];
Sln
[
7
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
cd
[
iPoint
];
Sln
[
8
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
cf
[
iPoint
];
Sln
[
9
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
Hstar
[
iPoint
];
Sln
[
10
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
Hstar2
[
iPoint
];
Sln
[
11
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
Hk
[
iPoint
];
Sln
[
12
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
ctEq
[
iPoint
];
Sln
[
13
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
us
[
iPoint
];
Sln
[
14
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
delta
[
iPoint
];
Sln
[
15
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
x
[
iPoint
];
Sln
[
16
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
xoc
[
iPoint
];
Sln
[
17
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
y
[
iPoint
];
Sln
[
18
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
z
[
iPoint
];
Sln
[
19
][
nMarkersUp
+
nMarkersLw
+
iPoint
]
=
sections
[
iSec
][
2
]
->
vt
[
iPoint
];
}
if
(
verbose
>
2
)
std
::
cout
<<
"Solution structure sent."
<<
std
::
endl
;
return
Sln
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
blast/src/blDriver.h
+
0
−
1
View file @
e70e41ad
...
...
@@ -52,7 +52,6 @@ public:
double
getAverageTransition
(
size_t
const
iRegion
)
const
;
double
getRe
()
const
{
return
Re
;
}
double
getMinf
()
const
{
return
tSolver
->
getMinf
();
}
std
::
vector
<
std
::
vector
<
double
>>
getSolution
(
size_t
iSec
);
// Setters.
void
setVerbose
(
unsigned
int
_verbose
)
{
verbose
=
_verbose
;
}
...
...
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