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
f70482c8
Commit
f70482c8
authored
4 years ago
by
Dennis Gläser
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix/materiallaw-985' into 'master'
Fix/materiallaw vangenuchten spline assert Closes
#985
See merge request
!2459
parents
e590a9de
2f21ee34
No related branches found
No related tags found
1 merge request
!2459
Fix/materiallaw vangenuchten spline assert
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dumux/material/fluidmatrixinteractions/2p/brookscorey.hh
+1
-4
1 addition, 4 deletions
dumux/material/fluidmatrixinteractions/2p/brookscorey.hh
dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh
+15
-12
15 additions, 12 deletions
dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh
with
16 additions
and
16 deletions
dumux/material/fluidmatrixinteractions/2p/brookscorey.hh
+
1
−
4
View file @
f70482c8
...
...
@@ -279,7 +279,6 @@ public:
#include
<algorithm>
#include
<dumux/common/parameters.hh>
#include
<dumux/common/spline.hh>
#include
<dumux/common/optionalscalar.hh>
#include
<dumux/material/fluidmatrixinteractions/2p/materiallaw.hh>
...
...
@@ -592,7 +591,6 @@ public:
S
pcLowSwe_
=
0.01
;
};
//! Initialize the spline
template
<
class
MaterialLaw
>
void
init
(
const
MaterialLaw
*
m
,
const
std
::
string
&
paramGroup
)
{
...
...
@@ -624,8 +622,7 @@ public:
* \brief The regularized capillary pressure-saturation curve
* regularized part:
* - low saturation: extend the \f$\mathrm{p_c(S_w)}\f$ curve with the slope at the regularization point (i.e. no kink).
* - high saturation: connect the high regularization point with \f$\mathrm{\overline{S}_w =1}\f$
* with a spline and continue linearly for \f$\mathrm{\overline{S}_w > 1}\f$
* - high saturation: continue linearly
*/
OptionalScalar
<
Scalar
>
pc
(
const
Scalar
swe
)
const
{
...
...
This diff is collapsed.
Click to expand it.
dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh
+
15
−
12
View file @
f70482c8
...
...
@@ -848,11 +848,13 @@ private:
pcLowSwePcValue_
=
m
->
template
pc
<
false
>(
lowSw
);
pcHighSwePcValue_
=
m
->
template
pc
<
false
>(
highSw
);
pcSpline_
=
Spline
<
Scalar
>
(
highSwe
,
1.0
,
// x0, x1
pcHighSwePcValue_
,
0
,
// y0, y1
pcDerivativeHighSweThreshold_
,
pcDerivativeHighSweEnd_
);
// m0, m1
// Only initialize regularization spline if given parameters are in
// the admissible range. When constructing with non-sensible parameters
// the spline construction might fail (e.g. highSwe == 1.0)
if
(
highSwe
<
1.0
)
pcSpline_
=
Spline
<
Scalar
>
(
highSwe
,
1.0
,
// x0, x1
pcHighSwePcValue_
,
0
,
// y0, y1
pcDerivativeHighSweThreshold_
,
pcDerivativeHighSweEnd_
);
// m0, m1
}
template
<
class
MaterialLaw
>
...
...
@@ -868,14 +870,15 @@ private:
const
auto
krnLowSw
=
m
->
template
krn
<
false
>(
lowSw
);
const
auto
dkrnLowSw
=
m
->
template
dkrn_dsw
<
false
>(
lowSw
)
*
dsw_dswe
;
krwSpline_
=
Spline
<
Scalar
>
(
highSwe
,
1.0
,
// x0, x1
krwHighSw
,
1.0
,
// y0, y1
dkrwHighSw
,
0.0
);
// m0, m1
krnSpline_
=
Spline
<
Scalar
>
(
0.0
,
lowSwe
,
// x0, x1
1.0
,
krnLowSw
,
// y0, y1
0.0
,
dkrnLowSw
);
// m0, m1
if
(
highSwe
<
1.0
)
krwSpline_
=
Spline
<
Scalar
>
(
highSwe
,
1.0
,
// x0, x1
krwHighSw
,
1.0
,
// y0, y1
dkrwHighSw
,
0.0
);
// m0, m1
if
(
lowSwe
>
0.0
)
krnSpline_
=
Spline
<
Scalar
>
(
0.0
,
lowSwe
,
// x0, x1
1.0
,
krnLowSw
,
// y0, y1
0.0
,
dkrnLowSw
);
// m0, m1
}
Scalar
pcLowSwe_
,
pcHighSwe_
;
...
...
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