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
00467f85
Commit
00467f85
authored
8 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[richards] Use endPointPc and thus make sure pc >= 0
parent
14f7dc7e
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/porousmediumflow/richards/implicit/volumevariables.hh
+8
-4
8 additions, 4 deletions
dumux/porousmediumflow/richards/implicit/volumevariables.hh
with
8 additions
and
4 deletions
dumux/porousmediumflow/richards/implicit/volumevariables.hh
+
8
−
4
View file @
00467f85
...
@@ -87,8 +87,9 @@ public:
...
@@ -87,8 +87,9 @@ public:
const
auto
&
materialParams
=
problem
.
spatialParams
().
materialLawParams
(
element
,
scv
,
elemSol
);
const
auto
&
materialParams
=
problem
.
spatialParams
().
materialLawParams
(
element
,
scv
,
elemSol
);
relativePermeabilityWetting_
=
MaterialLaw
::
krw
(
materialParams
,
fluidState_
.
saturation
(
wPhaseIdx
));
relativePermeabilityWetting_
=
MaterialLaw
::
krw
(
materialParams
,
fluidState_
.
saturation
(
wPhaseIdx
));
//! precompute the minimum capillary pressure (entry pressure)
// precompute the minimum capillary pressure (entry pressure)
minPc_
=
MaterialLaw
::
pc
(
materialParams
,
/*Sw=*/
1.0
);
// needed to make sure we don't compute unphysical capillary pressures and thus saturations
minPc_
=
MaterialLaw
::
endPointPc
(
materialParams
);
pn_
=
problem
.
nonWettingReferencePressure
();
pn_
=
problem
.
nonWettingReferencePressure
();
porosity_
=
problem
.
spatialParams
().
porosity
(
element
,
scv
,
elemSol
);
porosity_
=
problem
.
spatialParams
().
porosity
(
element
,
scv
,
elemSol
);
permeability_
=
problem
.
spatialParams
().
permeability
(
element
,
scv
,
elemSol
);
permeability_
=
problem
.
spatialParams
().
permeability
(
element
,
scv
,
elemSol
);
...
@@ -113,8 +114,11 @@ public:
...
@@ -113,8 +114,11 @@ public:
fluidState
.
setPressure
(
wPhaseIdx
,
priVars
[
pressureIdx
]);
fluidState
.
setPressure
(
wPhaseIdx
,
priVars
[
pressureIdx
]);
// compute the capillary pressure to compute the saturation
// compute the capillary pressure to compute the saturation
// the material law takes care of cases where pc gets negative
// make sure that we the capillary pressure is not smaller than the minimum pc
const
Scalar
pc
=
problem
.
nonWettingReferencePressure
()
-
fluidState
.
pressure
(
wPhaseIdx
);
// this would possibly return unphysical values from regularized material laws
using
std
::
max
;
const
Scalar
pc
=
max
(
MaterialLaw
::
endPointPc
(
materialParams
),
problem
.
nonWettingReferencePressure
()
-
fluidState
.
pressure
(
wPhaseIdx
));
const
Scalar
sw
=
MaterialLaw
::
sw
(
materialParams
,
pc
);
const
Scalar
sw
=
MaterialLaw
::
sw
(
materialParams
,
pc
);
fluidState
.
setSaturation
(
wPhaseIdx
,
sw
);
fluidState
.
setSaturation
(
wPhaseIdx
,
sw
);
...
...
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