Return zero for e.g., the gas:oil-ratio if no oil

This commit is contained in:
babrodtk
2015-08-10 08:54:34 +02:00
parent 79410685ca
commit 926f7ba175
2 changed files with 32 additions and 10 deletions
+3 -4
View File
@@ -823,10 +823,9 @@ BOOST_AUTO_TEST_CASE(ParseInterpolateRealisticVFPPROD)
double liquid = f_i - aqua;
double vapour = g_i * liquid;
if (aqua == 0.0 || liquid == 0.0) {
//FIXME: This skips some corner cases, but will fail in current
//implementation, since getWFR(...), getGFR(...), getFlo(...)
//might perform division by zero
if ((aqua + liquid) == 0.0 || liquid == 0.0) {
//FIXME: This skips some corner cases, when
//getWFR(...) and getGFR(...) are infinite
}
else {
//Value given as pascal, convert to barsa for comparison with reference