diff --git a/dumux/boxmodels/1p2c/1p2clocalresidual.hh b/dumux/boxmodels/1p2c/1p2clocalresidual.hh index 39273fd70b287db52dd6eea72a61879682b14cc8..6d34e380d7c6c7c0a9959992a53fd6810ac9954b 100644 --- a/dumux/boxmodels/1p2c/1p2clocalresidual.hh +++ b/dumux/boxmodels/1p2c/1p2clocalresidual.hh @@ -58,6 +58,9 @@ protected: typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GridView::IntersectionIterator IntersectionIterator; + enum { dim = GridView::dimension }; + typedef Dune::FieldVector<Scalar, dim> DimVector; + typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables; typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; @@ -239,6 +242,13 @@ public: // diffusive flux of the second component - massfraction tmp = -(fluxVars.moleFractionGrad(transportCompIdx)*fluxVars.face().normal); tmp *= fluxVars.porousDiffCoeff() * fluxVars.molarDensity(); + + // dispersive flux of second component - massfraction + DimVector normalDisp; + fluxVars.dispersionTensor().mv(fluxVars.face().normal, normalDisp); + tmp -= fluxVars.molarDensity()* + (normalDisp * fluxVars.moleFractionGrad(transportCompIdx)); + // convert it to a mass flux and add it flux[transportEqIdx] += tmp * FluidSystem::molarMass(transportCompIdx); } @@ -249,10 +259,10 @@ public: tmp *= fluxVars.porousDiffCoeff() * fluxVars.molarDensity(); // dispersive flux of second component - molefraction - // Vector normalDisp; - // fluxVars.dispersionTensor().mv(fluxVars.face().normal, normalDisp); - // tmp -= fluxVars.molarDensity()* - // (normalDisp * fluxVars.moleFractionGrad(transportCompIdx)); + DimVector normalDisp; + fluxVars.dispersionTensor().mv(fluxVars.face().normal, normalDisp); + tmp -= fluxVars.molarDensity()* + (normalDisp * fluxVars.moleFractionGrad(transportCompIdx)); flux[transportEqIdx] += tmp; }