Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
7f3580eb
Commit
7f3580eb
authored
Sep 01, 2021
by
Dennis Gläser
Committed by
Timo Koch
Sep 22, 2021
Browse files
[mpfa][fluxcaching] use constant zero threshold for diffcoeffs
parent
1fbc7f43
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/porousmediumflow/fluxvariablescachefiller.hh
View file @
7f3580eb
...
...
@@ -194,6 +194,7 @@ class PorousMediumFluxVariablesCacheFillerImplementation<TypeTag, Discretization
using
Problem
=
GetPropType
<
TypeTag
,
Properties
::
Problem
>
;
using
GridView
=
typename
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>::
GridView
;
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
GridGeometry
=
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>
;
using
FVElementGeometry
=
typename
GridGeometry
::
LocalView
;
...
...
@@ -624,22 +625,23 @@ private:
return
volVars
.
effectiveDiffusionCoefficient
(
phaseIdx
,
FluidSystem
::
getMainComponent
(
phaseIdx
),
compIdx
);
};
// Effective diffusion coefficients might
get
zero if saturation = 0.
// Effective diffusion coefficients might
be
zero if saturation = 0.
// Compute epsilon to detect obsolete rows in the iv-local matrices during assembly
const
auto
&
scv
=
*
scvs
(
fvGeometry
()).
begin
();
const
auto
&
scvf
=
*
scvfs
(
fvGeometry
()).
begin
();
static
const
auto
zeroD
=
getParamFromGroup
<
Scalar
>
(
problem
().
paramGroup
(),
"Mpfa.ZeroEffectiveDiffusionCoefficientThreshold"
,
1e-16
);
// compute a representative transmissibility for this interaction volume, using
// the threshold for zero diffusion coefficients, and use this as epsilon
const
auto
&
scv
=
fvGeometry
().
scv
(
iv
.
localScv
(
0
).
gridScvIndex
());
const
auto
&
scvf
=
fvGeometry
().
scvf
(
iv
.
localScvf
(
0
).
gridScvfIndex
());
const
auto
&
vv
=
elemVolVars
()[
scv
];
const
auto
D
=
[
&
]
()
{
// diffusion coefficients below 1e-20 are treated as zeroes!!
using
std
::
max
;
if
constexpr
(
!
FluidSystem
::
isTracerFluidSystem
())
return
max
(
1e-20
,
vv
.
diffusionCoefficient
(
phaseIdx
,
FluidSystem
::
getMainComponent
(
phaseIdx
),
compIdx
));
else
return
max
(
1e-20
,
vv
.
diffusionCoefficient
(
0
,
0
,
compIdx
));
}
();
const
auto
eps
=
Extrusion
::
area
(
scvf
)
*
computeTpfaTransmissibility
(
scvf
,
scv
,
zeroD
,
vv
.
extrusionFactor
()
);
auto
eps
=
1e-7
*
computeTpfaTransmissibility
(
scvf
,
scv
,
D
,
vv
.
extrusionFactor
())
*
Extrusion
::
area
(
scvf
);
localAssembler
.
assembleMatrices
(
handle
.
diffusionHandle
(),
iv
,
getD
,
eps
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment