From b5e34862b54e087d822b7fb586dd821c25ee14e1 Mon Sep 17 00:00:00 2001 From: Klaus Mosthaf <klmos@env.dtu.dk> Date: Fri, 24 Feb 2012 15:32:01 +0000 Subject: [PATCH] Made diffusion work again: The density at the integration points has not been calculated in the flux variables and was thus 0 --> no diffusive fluxes. git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7912 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/2p2c/2p2cfluxvariables.hh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dumux/boxmodels/2p2c/2p2cfluxvariables.hh b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh index 0164a00f95..bbb0e66327 100644 --- a/dumux/boxmodels/2p2c/2p2cfluxvariables.hh +++ b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh @@ -112,6 +112,21 @@ protected: const Element &element, const ElementVolumeVariables &elemVolVars) { + // calculate densities at the integration points of the face + Vector tmp(0.0); + for (int idx = 0; + idx < fvGeom_.numVertices; + idx++) // loop over adjacent vertices + { + for (int phaseIdx = 0; phaseIdx < numPhases; phaseIdx++) + { + densityAtIP_[phaseIdx] += elemVolVars[idx].density(phaseIdx)* + face().shapeValue[idx]; + molarDensityAtIP_[phaseIdx] += elemVolVars[idx].molarDensity(phaseIdx)* + face().shapeValue[idx]; + } + } + calculateGradients_(problem, element, elemVolVars); calculateVelocities_(problem, element, elemVolVars); calculateDiffCoeffPM_(problem, element, elemVolVars); -- GitLab