Skip to content
Snippets Groups Projects
Commit 6ceab6ce authored by Andreas Lauser's avatar Andreas Lauser
Browse files

H2O-N2 fluid system: also normalize the density if the complex relations are used

this is required to make sure that the relation

\rho^\kappa_g = X^\kappa_g \rho_g

holds unconditionally. note, that we define the sum of the mass
fractions to be the same as the sum of the mole fractions.

(also note, that this change only affects the case where the gas phase
is not present.)

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7271 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 3a072b70
No related branches found
No related tags found
No related merge requests found
...@@ -381,7 +381,7 @@ public: ...@@ -381,7 +381,7 @@ public:
// other // other
Scalar rho_gH2O = H2O::gasDensity(T, p*fluidState.moleFraction(gPhaseIdx, H2OIdx)); Scalar rho_gH2O = H2O::gasDensity(T, p*fluidState.moleFraction(gPhaseIdx, H2OIdx));
Scalar rho_gN2 = N2::gasDensity(T, p*fluidState.moleFraction(gPhaseIdx, N2Idx)); Scalar rho_gN2 = N2::gasDensity(T, p*fluidState.moleFraction(gPhaseIdx, N2Idx));
return rho_gH2O + rho_gN2; return (rho_gH2O + rho_gN2) / std::max(1e-5, sumMoleFrac);
}; };
/*! /*!
......
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