Skip to content
Snippets Groups Projects
Commit e567d092 authored by Lena Walter's avatar Lena Walter
Browse files

Uncomment dispersive flux for use of molefractions

and add dispersive flux calculation for use of massfraction  
(reviewed by Alex)

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9107 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent f1965988
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,9 @@ protected: ...@@ -58,6 +58,9 @@ protected:
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef typename GridView::IntersectionIterator IntersectionIterator; 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, VolumeVariables) VolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables; typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
...@@ -239,6 +242,13 @@ public: ...@@ -239,6 +242,13 @@ public:
// diffusive flux of the second component - massfraction // diffusive flux of the second component - massfraction
tmp = -(fluxVars.moleFractionGrad(transportCompIdx)*fluxVars.face().normal); tmp = -(fluxVars.moleFractionGrad(transportCompIdx)*fluxVars.face().normal);
tmp *= fluxVars.porousDiffCoeff() * fluxVars.molarDensity(); 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 // convert it to a mass flux and add it
flux[transportEqIdx] += tmp * FluidSystem::molarMass(transportCompIdx); flux[transportEqIdx] += tmp * FluidSystem::molarMass(transportCompIdx);
} }
...@@ -249,10 +259,10 @@ public: ...@@ -249,10 +259,10 @@ public:
tmp *= fluxVars.porousDiffCoeff() * fluxVars.molarDensity(); tmp *= fluxVars.porousDiffCoeff() * fluxVars.molarDensity();
// dispersive flux of second component - molefraction // dispersive flux of second component - molefraction
// Vector normalDisp; DimVector normalDisp;
// fluxVars.dispersionTensor().mv(fluxVars.face().normal, normalDisp); fluxVars.dispersionTensor().mv(fluxVars.face().normal, normalDisp);
// tmp -= fluxVars.molarDensity()* tmp -= fluxVars.molarDensity()*
// (normalDisp * fluxVars.moleFractionGrad(transportCompIdx)); (normalDisp * fluxVars.moleFractionGrad(transportCompIdx));
flux[transportEqIdx] += tmp; flux[transportEqIdx] += tmp;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment