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
8e76a3ee
Commit
8e76a3ee
authored
3 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[momentum][fluxhelper] Adapt to changes in fluxvars
parent
48ad92e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2830
Test 3D with new staggered freeflow model
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/freeflow/navierstokes/momentum/fluxhelper.hh
+27
-16
27 additions, 16 deletions
dumux/freeflow/navierstokes/momentum/fluxhelper.hh
with
27 additions
and
16 deletions
dumux/freeflow/navierstokes/momentum/fluxhelper.hh
+
27
−
16
View file @
8e76a3ee
...
...
@@ -127,28 +127,39 @@ struct NavierStokesMomentumBoundaryFluxHelper
const
auto
&
orthogonalScvf
=
fvGeometry
.
lateralOrthogonalScvf
(
scvf
);
const
auto
innerTransportingVelocity
=
elemVolVars
[
orthogonalScvf
.
insideScvIdx
()].
velocity
();
if
(
scvf
.
boundary
())
static
const
bool
useOldScheme
=
getParam
<
bool
>
(
"FreeFlow.UseOldTransportingVelocity"
,
true
);
// TODO how to deprecate?
if
(
useOldScheme
)
{
if
(
const
auto
bcTypes
=
problem
.
boundaryTypes
(
element
,
scvf
);
bcTypes
.
isDirichlet
(
scvf
.
normalAxis
()))
return
problem
.
dirichlet
(
element
,
scvf
)[
scvf
.
normalAxis
()];
if
(
scvf
.
boundary
())
{
if
(
problem
.
boundaryTypes
(
element
,
scvf
).
isDirichlet
(
scvf
.
normalAxis
()))
return
problem
.
dirichlet
(
element
,
scvf
)[
scvf
.
normalAxis
()];
}
else
return
innerTransportingVelocity
;
// fallback
return
innerTransportingVelocity
;
}
else
// use the Dirichlet velocity as transporting velocity if the lateral face is on a Dirichlet boundary
if
(
scvf
.
boundary
())
{
static
const
bool
useOldScheme
=
getParam
<
bool
>
(
"FreeFlow.UseOldTransportingVelocity"
,
true
);
// TODO how to deprecate?
if
(
useOldScheme
)
return
innerTransportingVelocity
;
if
(
problem
.
boundaryTypes
(
element
,
scvf
).
isDirichlet
(
scvf
.
normalAxis
()))
return
0.5
*
(
problem
.
dirichlet
(
element
,
scvf
)[
scvf
.
normalAxis
()]
+
innerTransportingVelocity
);
}
if
(
orthogonalScvf
.
boundary
())
{
if
(
problem
.
boundaryTypes
(
element
,
orthogonalScvf
).
isDirichlet
(
scvf
.
normalAxis
()))
return
0.5
*
(
problem
.
dirichlet
(
element
,
scvf
)[
scvf
.
normalAxis
()]
+
innerTransportingVelocity
);
else
{
// average the transporting velocity by weighting with the scv volumes
const
auto
insideVolume
=
fvGeometry
.
scv
(
orthogonalScvf
.
insideScvIdx
()).
volume
();
const
auto
outsideVolume
=
fvGeometry
.
scv
(
orthogonalScvf
.
outsideScvIdx
()).
volume
();
const
auto
outerTransportingVelocity
=
elemVolVars
[
orthogonalScvf
.
outsideScvIdx
()].
velocity
();
return
(
insideVolume
*
innerTransportingVelocity
+
outsideVolume
*
outerTransportingVelocity
)
/
(
insideVolume
+
outsideVolume
);
}
return
innerTransportingVelocity
;
// fallback value, should actually never be called
}
// average the transporting velocity by weighting with the scv volumes
const
auto
insideVolume
=
fvGeometry
.
scv
(
orthogonalScvf
.
insideScvIdx
()).
volume
();
const
auto
outsideVolume
=
fvGeometry
.
scv
(
orthogonalScvf
.
outsideScvIdx
()).
volume
();
const
auto
outerTransportingVelocity
=
elemVolVars
[
orthogonalScvf
.
outsideScvIdx
()].
velocity
();
return
(
insideVolume
*
innerTransportingVelocity
+
outsideVolume
*
outerTransportingVelocity
)
/
(
insideVolume
+
outsideVolume
);
}();
// lateral face normal to boundary (integration point touches boundary)
...
...
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