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
56fd08d6
Commit
56fd08d6
authored
6 years ago
by
Kilian Weishaupt
Committed by
Ned Coltman
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[staggered][fluxvars] Improve calculation of symm. part of v_grad
parent
134d602c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1548
[freeflow] Consider full stress tensor at Dirichlet/Neumann BCs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/freeflow/navierstokes/staggered/fluxvariables.hh
+42
-4
42 additions, 4 deletions
dumux/freeflow/navierstokes/staggered/fluxvariables.hh
with
42 additions
and
4 deletions
dumux/freeflow/navierstokes/staggered/fluxvariables.hh
+
42
−
4
View file @
56fd08d6
...
@@ -452,18 +452,56 @@ private:
...
@@ -452,18 +452,56 @@ private:
?
insideVolVars
.
effectiveViscosity
()
?
insideVolVars
.
effectiveViscosity
()
:
(
insideVolVars
.
effectiveViscosity
()
+
outsideVolVars
.
effectiveViscosity
())
*
0.5
;
:
(
insideVolVars
.
effectiveViscosity
()
+
outsideVolVars
.
effectiveViscosity
())
*
0.5
;
// Consider the shear stress caused by the gradient of the velocities normal to our face of interest.
if
(
!
enableUnsymmetrizedVelocityGradient
)
if
(
!
enableUnsymmetrizedVelocityGradient
)
{
{
// If we are at a boundary, a gradient of zero is implictly assumed for all velocities,
// Create a boundaryTypes object (will be empty if not at a boundary).
// thus no further calculations are required.
Dune
::
Std
::
optional
<
BoundaryTypes
>
bcTypes
;
if
(
!
scvf
.
boundary
())
const
auto
&
boundaryFace
=
scvf
.
makeBoundaryFace
(
scvf
.
pairData
(
localSubFaceIdx
).
virtualBoundaryFaceDofPos
);
// Get the boundary conditions if we are at a boundary.
if
(
scvf
.
boundary
())
bcTypes
.
emplace
(
problem
.
boundaryTypes
(
element
,
scvf
));
// Check if we have to do the computation
const
bool
enable
=
[
&
]()
{
// Always consider this term in the interior domain.
if
(
!
scvf
.
boundary
())
return
true
;
// If we are at a boundary and a Dirichlet BC for pressure is set, a gradient of zero is implictly assumed for all velocities,
// thus no further calculations are required.
if
(
bcTypes
&&
bcTypes
->
isDirichlet
(
Indices
::
pressureIdx
))
return
false
;
// If we are at a boundary and neither a Dirichlet BC or a Beavers-Joseph slip condition for the tangential velocity is set,
// we cannot calculate a velocity gradient and thus skip this part. TODO: is this the right approach?
return
(
bcTypes
&&
(
bcTypes
->
isDirichlet
(
Indices
::
velocity
(
lateralFace
.
directionIndex
()))
||
bcTypes
->
isBJS
(
Indices
::
velocity
(
lateralFace
.
directionIndex
()))));
}();
if
(
enable
)
{
{
// For the velocityGrad_ji gradient, get the velocities perpendicular to the velocity at the current scvf.
// For the velocityGrad_ji gradient, get the velocities perpendicular to the velocity at the current scvf.
// The inner one is located at staggered face within the own element,
// The inner one is located at staggered face within the own element,
// the outer one at the respective staggered face of the element on the other side of the
// the outer one at the respective staggered face of the element on the other side of the
// current scvf.
// current scvf.
const
Scalar
innerLateralVelocity
=
faceVars
.
velocityLateralInside
(
localSubFaceIdx
);
const
Scalar
innerLateralVelocity
=
faceVars
.
velocityLateralInside
(
localSubFaceIdx
);
const
Scalar
outerLateralVelocity
=
faceVars
.
velocityLateralOutside
(
localSubFaceIdx
);
const
Scalar
outerLateralVelocity
=
[
&
]()
{
if
(
!
scvf
.
boundary
())
return
faceVars
.
velocityLateralOutside
(
localSubFaceIdx
);
else
if
(
bcTypes
->
isDirichlet
(
Indices
::
velocity
(
lateralFace
.
directionIndex
())))
return
problem
.
dirichlet
(
element
,
boundaryFace
)[
Indices
::
velocity
(
lateralFace
.
directionIndex
())];
else
{
// Compute the BJS slip velocity at the boundary. Note that the relevant velocity gradient is now
// perpendicular to the own scvf.
const
auto
&
scv
=
fvGeometry
.
scv
(
scvf
.
insideScvIdx
());
return
problem
.
bjsVelocity
(
element
,
scv
,
scvf
,
innerLateralVelocity
);
}
}();
// Calculate the velocity gradient in positive coordinate direction.
// Calculate the velocity gradient in positive coordinate direction.
const
Scalar
lateralDeltaV
=
scvf
.
normalInPosCoordDir
()
const
Scalar
lateralDeltaV
=
scvf
.
normalInPosCoordDir
()
...
...
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