Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
f6e09ecf
Commit
f6e09ecf
authored
Sep 07, 2020
by
Kilian Weishaupt
Committed by
Timo Koch
Sep 07, 2020
Browse files
[navierstokes][localresidual] Add source term for axisymmetric problems
parent
adbb0f6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/freeflow/navierstokes/staggered/localresidual.hh
View file @
f6e09ecf
...
...
@@ -169,6 +169,24 @@ public:
source
+=
problem
.
gravity
()[
scvf
.
directionIndex
()]
*
insideVolVars
.
density
();
source
+=
problem
.
source
(
element
,
fvGeometry
,
elemVolVars
,
elemFaceVars
,
scvf
)[
Indices
::
velocity
(
scvf
.
directionIndex
())];
// Axisymmetric problems in 2D feature an extra source terms arising from the transformation to cylindrical coordinates.
// See Ferziger/Peric: Computational methods for fluid dynamics chapter 8.
// https://doi.org/10.1007/978-3-540-68228-8 (page 301)
if
constexpr
(
ModelTraits
::
dim
()
==
2
&&
std
::
is_same_v
<
Extrusion
,
RotationalExtrusion
<
Extrusion
::
radialAxis
>>
)
{
if
(
scvf
.
directionIndex
()
==
Extrusion
::
radialAxis
)
{
// Velocity term
const
auto
r
=
scvf
.
center
()[
scvf
.
directionIndex
()];
source
-=
-
2.0
*
insideVolVars
.
effectiveViscosity
()
*
elemFaceVars
[
scvf
].
velocitySelf
()
/
(
r
*
r
);
// Pressure term (needed because we incorporate pressure in terms of a surface integral).
// grad(p) becomes div(pI) + (p/r)*n_r in cylindrical coordinates. The second term
// is new with respect to Cartesian coordinates and handled below as a source term.
source
+=
insideVolVars
.
pressure
()
/
r
;
}
}
return
source
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment