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
0b41bcbc
Commit
0b41bcbc
authored
5 years ago
by
Leopold Stadler
Committed by
Timo Koch
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[shallowwater] add upwinding of the mobility term
parent
c40c6e69
No related branches found
No related tags found
1 merge request
!1831
Resolve "[shallowwater] upwind mobility for shallow water flux."
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/flux/shallowwater/riemannproblem.hh
+25
-10
25 additions, 10 deletions
dumux/flux/shallowwater/riemannproblem.hh
with
25 additions
and
10 deletions
dumux/flux/shallowwater/riemannproblem.hh
+
25
−
10
View file @
0b41bcbc
...
@@ -82,14 +82,6 @@ std::array<Scalar,3> riemannProblem(const Scalar waterDepthLeft,
...
@@ -82,14 +82,6 @@ std::array<Scalar,3> riemannProblem(const Scalar waterDepthLeft,
const
Scalar
dzr
=
max
(
0.0
,
bedSurfaceLeft
-
bedSurfaceRight
);
const
Scalar
dzr
=
max
(
0.0
,
bedSurfaceLeft
-
bedSurfaceRight
);
const
Scalar
waterDepthRightReconstructed
=
max
(
0.0
,
waterDepthRight
-
dzr
);
const
Scalar
waterDepthRightReconstructed
=
max
(
0.0
,
waterDepthRight
-
dzr
);
// compute the mobility of the flux with the fluxlimiter
static
const
Scalar
upperWaterDepthFluxLimiting
=
getParam
<
Scalar
>
(
"FluxLimiterLET.UpperWaterDepth"
,
1e-3
);
static
const
Scalar
lowerWaterDepthFluxLimiting
=
getParam
<
Scalar
>
(
"FluxLimiterLET.LowerWaterDepth"
,
1e-5
);
const
Scalar
mobility
=
ShallowWater
::
fluxLimiterLET
(
waterDepthLeftReconstructed
,
waterDepthRightReconstructed
,
upperWaterDepthFluxLimiting
,
lowerWaterDepthFluxLimiting
);
// make rotation of the flux we compute an 1d flux
// make rotation of the flux we compute an 1d flux
Scalar
tempFlux
=
velocityXLeft
;
Scalar
tempFlux
=
velocityXLeft
;
velocityXLeft
=
nxy
[
0
]
*
tempFlux
+
nxy
[
1
]
*
velocityYLeft
;
velocityXLeft
=
nxy
[
0
]
*
tempFlux
+
nxy
[
1
]
*
velocityYLeft
;
...
@@ -125,10 +117,33 @@ std::array<Scalar,3> riemannProblem(const Scalar waterDepthLeft,
...
@@ -125,10 +117,33 @@ std::array<Scalar,3> riemannProblem(const Scalar waterDepthLeft,
Scalar hdyzrhdyzr = gravity * nxy[1] * hgzr;
Scalar hdyzrhdyzr = gravity * nxy[1] * hgzr;
*/
*/
// compute the mobility of the flux with the fluxlimiter
static
const
Scalar
upperWaterDepthFluxLimiting
=
getParam
<
Scalar
>
(
"FluxLimiterLET.UpperWaterDepth"
,
1e-3
);
static
const
Scalar
lowerWaterDepthFluxLimiting
=
getParam
<
Scalar
>
(
"FluxLimiterLET.LowerWaterDepth"
,
1e-5
);
static
const
bool
upwindWaterDepthFluxLimiting
=
getParam
<
bool
>
(
"FluxLimiterLET.UpwindFluxLimiting"
,
false
);
Scalar
limitingDepth
=
(
waterDepthLeftReconstructed
+
waterDepthRightReconstructed
)
*
0.5
;
//Using the upwind water depth from the flux direction can improve stability.
if
(
upwindWaterDepthFluxLimiting
)
{
if
(
riemannResult
.
flux
[
0
]
<
0
)
{
limitingDepth
=
waterDepthRightReconstructed
;
}
else
{
limitingDepth
=
waterDepthLeftReconstructed
;
}
}
const
Scalar
mobility
=
ShallowWater
::
fluxLimiterLET
(
limitingDepth
,
limitingDepth
,
upperWaterDepthFluxLimiting
,
lowerWaterDepthFluxLimiting
);
std
::
array
<
Scalar
,
3
>
localFlux
;
std
::
array
<
Scalar
,
3
>
localFlux
;
localFlux
[
0
]
=
riemannResult
.
flux
[
0
]
*
mobility
;
localFlux
[
0
]
=
riemannResult
.
flux
[
0
]
*
mobility
;
localFlux
[
1
]
=
riemannResult
.
flux
[
1
]
-
hdxzl
;
localFlux
[
1
]
=
(
riemannResult
.
flux
[
1
]
-
hdxzl
);
// * mobility
;
localFlux
[
2
]
=
riemannResult
.
flux
[
2
]
-
hdyzl
;
localFlux
[
2
]
=
(
riemannResult
.
flux
[
2
]
-
hdyzl
);
// * mobility
;
return
localFlux
;
return
localFlux
;
}
}
...
...
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