Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
dumux-repositories
dumux
Commits
f6e09ecf
Commit
f6e09ecf
authored
4 years ago
by
Kilian Weishaupt
Committed by
Timo Koch
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[navierstokes][localresidual] Add source term for axisymmetric problems
parent
adbb0f6c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2236
Fix/navier stokes rot sym
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/freeflow/navierstokes/staggered/localresidual.hh
+18
-0
18 additions, 0 deletions
dumux/freeflow/navierstokes/staggered/localresidual.hh
with
18 additions
and
0 deletions
dumux/freeflow/navierstokes/staggered/localresidual.hh
+
18
−
0
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
;
}
...
...
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