addressing reviewing comments

This commit is contained in:
Kai Bao
2024-10-30 13:15:38 +01:00
parent 56db6ad3fe
commit c6201e9b6a
4 changed files with 15 additions and 11 deletions
+4 -2
View File
@@ -504,9 +504,11 @@ private:
Dune::FieldVector<Scalar, numComponents> z(0.0);
Scalar sumMoles = 0.0;
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
const auto saturation = getValue(fs.saturation(phaseIdx));
for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
Scalar tmp = Opm::getValue(fs.molarity(phaseIdx, compIdx) * fs.saturation(phaseIdx));
z[compIdx] += Opm::max(tmp, 1e-8);
Scalar tmp = getValue(fs.molarity(phaseIdx, compIdx)) * saturation;
tmp = max(tmp, 1.e-8);
z[compIdx] += tmp;
sumMoles += tmp;
}
}