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
b5dd304f
Commit
b5dd304f
authored
Mar 05, 2020
by
Dennis Gläser
Committed by
Ned Coltman
Mar 26, 2020
Browse files
[tracer][volvars] fix compIdx for calls to diffcoeffcontainer
parent
2192dae8
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/porousmediumflow/tracer/volumevariables.hh
View file @
b5dd304f
...
...
@@ -97,10 +97,14 @@ public:
moleOrMassFraction_
[
compIdx
]
=
this
->
priVars
()[
compIdx
];
}
// update the binary diffusion and effective diffusion coefficients
// Update the binary diffusion and effective diffusion coefficients.
// The container starts counting from compJIdx = 1 as it assumes the
// phase (main component) to have compIdx = 0. Tracer fluid systems
// start counting from zero with the actual tracer components, so we
// have to subtract 1 here before calling the fluid system
auto
getDiffusionCoefficient
=
[
&
](
int
phaseIdx
,
int
compIIdx
,
int
compJIdx
)
{
return
FluidSystem
::
binaryDiffusionCoefficient
(
compJIdx
,
return
FluidSystem
::
binaryDiffusionCoefficient
(
compJIdx
-
1
,
problem
,
element
,
scv
);
...
...
@@ -108,7 +112,7 @@ public:
auto
getEffectiveDiffusionCoefficient
=
[
&
](
int
phaseIdx
,
int
compIIdx
,
int
compJIdx
)
{
return
EffDiffModel
::
effectiveDiffusionCoefficient
(
*
this
,
phaseIdx
,
compIIdx
,
compJIdx
);
return
EffDiffModel
::
effectiveDiffusionCoefficient
(
*
this
,
phaseIdx
,
compIIdx
-
1
,
compJIdx
-
1
);
};
diffCoeff_
.
update
(
getDiffusionCoefficient
);
...
...
@@ -207,15 +211,23 @@ public:
/*!
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
* \note The container starts counting from compJIdx = 1 as it assumes the
* phase (main component) to have compIdx = 0. Tracer fluid systems
* start counting from zero with the actual tracer components, so we
* have to increase compJIdx by 1 before calling the container.
*/
Scalar
diffusionCoefficient
(
int
phaseIdx
,
int
compIIdx
,
int
compJIdx
)
const
{
return
diffCoeff_
(
phaseIdx
,
compIIdx
,
compJIdx
);
}
{
return
diffCoeff_
(
phaseIdx
,
compIIdx
+
1
,
compJIdx
+
1
);
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
* \note The container starts counting from compJIdx = 1 as it assumes the
* phase (main component) to have compIdx = 0. Tracer fluid systems
* start counting from zero with the actual tracer components, so we
* have to increase compJIdx by 1 before calling the container.
*/
Scalar
effectiveDiffusionCoefficient
(
int
phaseIdx
,
int
compIIdx
,
int
compJIdx
)
const
{
return
effectiveDiffCoeff_
(
phaseIdx
,
compIIdx
,
compJIdx
);
}
{
return
effectiveDiffCoeff_
(
phaseIdx
,
compIIdx
+
1
,
compJIdx
+
1
);
}
// /*!
// * \brief Returns the dispersivity of the fluid's streamlines.
...
...
Write
Preview
Supports
Markdown
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