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

H2O-N2 fluid system: some cosmetic cleanup of the viscosity

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7144 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 62089ff9
No related branches found
No related tags found
No related merge requests found
...@@ -420,24 +420,22 @@ public: ...@@ -420,24 +420,22 @@ public:
H2O::gasViscosity(T, H2O::vaporPressure(T)), H2O::gasViscosity(T, H2O::vaporPressure(T)),
N2::gasViscosity(T, p) N2::gasViscosity(T, p)
}; };
// molar masses
const Scalar M[numComponents] = {
H2O::molarMass(),
N2::molarMass()
};
Scalar sumx = 0.0;
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
sumx += fluidState.moleFraction(phaseIdx, compIdx);
sumx = std::max(1e-10, sumx);
for (int i = 0; i < numComponents; ++i) { for (int i = 0; i < numComponents; ++i) {
Scalar divisor = 0; Scalar divisor = 0;
for (int j = 0; j < numComponents; ++j) { for (int j = 0; j < numComponents; ++j) {
Scalar phiIJ = 1 + sqrt(mu[i]/mu[j]) * Scalar phiIJ = 1 + sqrt(mu[i]/mu[j]) * pow(molarMass(j)/molarMass(i), 1/4.0);
pow(M[j]/M[i], 1/4.0);
phiIJ *= phiIJ; phiIJ *= phiIJ;
phiIJ /= sqrt(8*(1 + M[i]/M[j])); phiIJ /= sqrt(8*(1 + molarMass(i)/molarMass(j)));
divisor += fluidState.moleFraction(phaseIdx, j)*phiIJ; divisor += fluidState.moleFraction(phaseIdx, j)/sumx * phiIJ;
} }
muResult += fluidState.moleFraction(phaseIdx, i)*mu[i] / divisor; muResult += fluidState.moleFraction(phaseIdx, i)/sumx * mu[i] / divisor;
} }
return muResult; return muResult;
} }
}; };
......
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