Skip to content
GitLab
Menu
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
c784ce62
Commit
c784ce62
authored
Sep 04, 2017
by
Timo Koch
Browse files
Adapt box and mpfa ficks law to using maincomponent
parent
29a12d4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
dumux/discretization/box/fickslaw.hh
View file @
c784ce62
...
...
@@ -52,6 +52,7 @@ class FicksLawImplementation<TypeTag, DiscretizationMethods::Box>
{
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
Model
=
typename
GET_PROP_TYPE
(
TypeTag
,
Model
);
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
);
using
VolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
VolumeVariables
);
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
...
...
@@ -115,7 +116,7 @@ public:
for
(
int
compIdx
=
0
;
compIdx
<
numComponents
;
compIdx
++
)
{
if
(
compIdx
==
phaseIdx
)
if
(
compIdx
==
FluidSystem
::
getMainComponent
(
phaseIdx
)
)
continue
;
// effective diffusion tensors
...
...
@@ -145,7 +146,8 @@ public:
// apply the diffusion tensor and return the flux
auto
DGradX
=
applyDiffusionTensor_
(
D
,
gradX
);
componentFlux
[
compIdx
]
=
-
1.0
*
rho
*
(
DGradX
*
scvf
.
unitOuterNormal
())
*
scvf
.
area
();
componentFlux
[
phaseIdx
]
-=
componentFlux
[
compIdx
];
if
(
Model
::
mainComponentIsBalanced
(
phaseIdx
)
&&
!
FluidSystem
::
isTracerFluidSystem
())
componentFlux
[
phaseIdx
]
-=
componentFlux
[
compIdx
];
}
return
componentFlux
;
}
...
...
dumux/discretization/cellcentered/mpfa/fickslaw.hh
View file @
c784ce62
...
...
@@ -48,12 +48,14 @@ class FicksLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
Model
=
typename
GET_PROP_TYPE
(
TypeTag
,
Model
);
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
MpfaHelper
=
typename
GET_PROP_TYPE
(
TypeTag
,
MpfaHelper
);
using
VolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
VolumeVariables
);
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
EffDiffModel
=
typename
GET_PROP_TYPE
(
TypeTag
,
EffectiveDiffusivityModel
);
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
ElementVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementVolumeVariables
);
using
ElementFluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementFluxVariablesCache
);
...
...
@@ -174,7 +176,7 @@ public:
ComponentFluxVector
componentFlux
(
0.0
);
for
(
int
compIdx
=
0
;
compIdx
<
numComponents
;
compIdx
++
)
{
if
(
compIdx
==
phaseIdx
)
if
(
compIdx
==
FluidSystem
::
getMainComponent
(
phaseIdx
)
)
continue
;
const
auto
&
fluxVarsCache
=
elemFluxVarsCache
[
scvf
];
...
...
@@ -239,8 +241,8 @@ public:
// accumulate the phase component flux
for
(
int
compIdx
=
0
;
compIdx
<
numComponents
;
compIdx
++
)
if
(
compIdx
!=
phaseIdx
)
componentFlux
[
phaseIdx
]
-=
componentFlux
[
compIdx
];
if
(
compIdx
!=
FluidSystem
::
getMainComponent
(
phaseIdx
)
&&
Model
::
mainComponentIsBalanced
(
phaseIdx
)
&&
!
FluidSystem
::
isTracerFluidSystem
()
)
componentFlux
[
FluidSystem
::
getMainComponent
(
phaseIdx
)
]
-=
componentFlux
[
compIdx
];
return
componentFlux
;
}
...
...
Bernd Flemisch
@bernd
mentioned in commit
fb8b7e38
·
Sep 03, 2019
mentioned in commit
fb8b7e38
mentioned in commit fb8b7e3801625ecb000173fc0c4eedb84648feda
Toggle commit list
Bernd Flemisch
@bernd
mentioned in merge request
!1710 (merged)
·
Sep 03, 2019
mentioned in merge request
!1710 (merged)
mentioned in merge request !1710
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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