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
6619a689
Commit
6619a689
authored
Jun 27, 2019
by
Melanie Lipp
Committed by
Kilian Weishaupt
Jul 25, 2019
Browse files
[Navier-Stokes] Revise definition of transporting velocity on boundary for momentum upwinding.
parent
c16da32e
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/freeflow/navierstokes/staggered/fluxvariables.hh
View file @
6619a689
...
...
@@ -486,7 +486,31 @@ private:
// Get the transporting velocity, located at the scvf perpendicular to the current scvf where the dof
// of interest is located.
const
Scalar
transportingVelocity
=
faceVars
.
velocityLateralInside
(
localSubFaceIdx
);
const
Scalar
transportingVelocity
=
[
&
]()
{
if
(
!
scvf
.
boundary
())
return
faceVars
.
velocityLateralInside
(
localSubFaceIdx
);
else
{
// Create a boundaryTypes object. Get the boundary conditions. We sample the type of BC at the center of the current scvf.
const
BoundaryTypes
bcTypes
=
problem
.
boundaryTypes
(
element
,
scvf
);
if
(
bcTypes
.
isDirichlet
(
Indices
::
velocity
(
lateralFace
.
directionIndex
())))
{
// Construct a temporary scvf which corresponds to the staggered sub face, featuring the location
// the staggered faces's center.
const
auto
&
lateralBoundaryFacePos
=
lateralStaggeredFaceCenter_
(
scvf
,
localSubFaceIdx
);
return
problem
.
dirichlet
(
element
,
scvf
.
makeBoundaryFace
(
lateralBoundaryFacePos
))[
Indices
::
velocity
(
lateralFace
.
directionIndex
())];
}
else
if
(
bcTypes
.
isBJS
(
Indices
::
velocity
(
lateralFace
.
directionIndex
())))
{
return
VelocityGradients
::
beaversJosephVelocityAtCurrentScvf
(
problem
,
element
,
fvGeometry
,
scvf
,
faceVars
,
currentScvfBoundaryTypes
,
lateralFaceBoundaryTypes
,
localSubFaceIdx
);
}
else
return
faceVars
.
velocityLateralInside
(
localSubFaceIdx
);
}
}();
return
StaggeredUpwindFluxVariables
<
TypeTag
,
upwindSchemeOrder
>::
computeUpwindedLateralMomentum
(
problem
,
fvGeometry
,
element
,
scvf
,
elemVolVars
,
faceVars
,
gridFluxVarsCache
,
localSubFaceIdx
,
currentScvfBoundaryTypes
,
lateralFaceBoundaryTypes
)
...
...
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