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
99669bfb
Commit
99669bfb
authored
4 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[3p] Adapt volVars
parent
e56630b2
No related branches found
No related tags found
1 merge request
!1607
Feature/new materiallaw 2p
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/porousmediumflow/3p/volumevariables.hh
+20
-15
20 additions, 15 deletions
dumux/porousmediumflow/3p/volumevariables.hh
with
20 additions
and
15 deletions
dumux/porousmediumflow/3p/volumevariables.hh
+
20
−
15
View file @
99669bfb
...
...
@@ -31,6 +31,8 @@
#include
<dumux/porousmediumflow/nonisothermal/volumevariables.hh>
#include
<dumux/material/solidstates/updatesolidvolumefractions.hh>
#include
<dumux/common/deprecated.hh>
namespace
Dumux
{
/*!
...
...
@@ -89,21 +91,21 @@ public:
const
Scv
&
scv
)
{
ParentType
::
update
(
elemSol
,
problem
,
element
,
scv
);
completeFluidState
(
elemSol
,
problem
,
element
,
scv
,
fluidState_
,
solidState_
);
// capillary pressure parameters
using
MaterialLaw
=
typename
Problem
::
SpatialParams
::
MaterialLaw
;
const
auto
&
materialParams
=
problem
.
spatialParams
().
materialLawParams
(
element
,
scv
,
elemSol
);
// old material law interface is deprecated: Replace this by
// const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const
auto
fluidMatrixInteraction
=
Deprecated
::
makePcKrSw
<
3
>
(
Scalar
{},
problem
.
spatialParams
(),
element
,
scv
,
elemSol
);
completeFluidState
(
elemSol
,
problem
,
element
,
scv
,
fluidState_
,
solidState_
);
const
auto
sw
=
fluidState_
.
saturation
(
wPhaseIdx
);
const
auto
sn
=
fluidState_
.
saturation
(
nPhaseIdx
);
// mobilities
for
(
int
phaseIdx
=
0
;
phaseIdx
<
ParentType
::
numFluidPhases
();
++
phaseIdx
)
{
mobility_
[
phaseIdx
]
=
MaterialLaw
::
kr
(
materialParams
,
phaseIdx
,
fluidState_
.
saturation
(
wPhaseIdx
),
fluidState_
.
saturation
(
nPhaseIdx
),
fluidState_
.
saturation
(
gPhaseIdx
))
/
fluidState_
.
viscosity
(
phaseIdx
);
mobility_
[
phaseIdx
]
=
fluidMatrixInteraction
.
kr
(
phaseIdx
,
sw
,
sn
)
/
fluidState_
.
viscosity
(
phaseIdx
);
}
// porosity
...
...
@@ -136,9 +138,13 @@ public:
{
EnergyVolVars
::
updateTemperature
(
elemSol
,
problem
,
element
,
scv
,
fluidState
,
solidState
);
const
auto
&
materialParams
=
problem
.
spatialParams
().
materialLawParams
(
element
,
scv
,
elemSol
);
const
auto
&
priVars
=
elemSol
[
scv
.
localDofIndex
()];
// old material law interface is deprecated: Replace this by
// const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const
auto
fluidMatrixInteraction
=
Deprecated
::
makePcKrSw
<
3
>
(
Scalar
{},
problem
.
spatialParams
(),
element
,
scv
,
elemSol
);
const
Scalar
sw
=
priVars
[
swIdx
];
const
Scalar
sn
=
priVars
[
snIdx
];
const
Scalar
sg
=
1.0
-
sw
-
sn
;
...
...
@@ -151,12 +157,11 @@ public:
const
Scalar
pg
=
priVars
[
pressureIdx
];
// calculate capillary pressures
using
MaterialLaw
=
typename
Problem
::
SpatialParams
::
MaterialLaw
;
const
Scalar
pcgw
=
MaterialLaw
::
pcgw
(
materialParams
,
sw
);
const
Scalar
pcnw
=
MaterialLaw
::
pcnw
(
materialParams
,
sw
);
const
Scalar
pcgn
=
MaterialLaw
::
pcgn
(
materialParams
,
sw
+
sn
);
const
Scalar
pcgw
=
fluidMatrixInteraction
.
pcgw
(
sw
,
sn
);
const
Scalar
pcnw
=
fluidMatrixInteraction
.
pcnw
(
sw
,
sn
);
const
Scalar
pcgn
=
fluidMatrixInteraction
.
pcgn
(
sw
,
sn
);
const
Scalar
pcAlpha
=
MaterialLaw
::
pcAlpha
(
materialParams
,
sn
);
const
Scalar
pcAlpha
=
fluidMatrixInteraction
.
pcAlpha
(
sw
,
sn
);
const
Scalar
pcNW1
=
0.0
;
// TODO: this should be possible to assign in the problem file
const
Scalar
pn
=
pg
-
pcAlpha
*
pcgn
-
(
1.0
-
pcAlpha
)
*
(
pcgw
-
pcNW1
);
...
...
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