mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Revert to Original Rs/Rv Calculation Scheme for RESV Rates
Keep the alternative approach in place for reference and experimental purposes, but disabled by a macro.
This commit is contained in:
parent
f0e2a1efe0
commit
d388ce40e5
@ -552,6 +552,26 @@ namespace Opm {
|
|||||||
return { rs, rv };
|
return { rs, rv };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define BURN_RESV_BRIDGES 0
|
||||||
|
|
||||||
|
#if !BURN_RESV_BRIDGES
|
||||||
|
|
||||||
|
auto b = rs;
|
||||||
|
if (io >= 0 && ig >= 0) {
|
||||||
|
b = surface_rates[ig] / (surface_rates[io] + 1.0e-15);
|
||||||
|
}
|
||||||
|
const double Rs = std::min(rs, b);
|
||||||
|
|
||||||
|
b = rv;
|
||||||
|
if (io >= 0 && ig >= 0) {
|
||||||
|
b = surface_rates[io] / (surface_rates[ig] + 1.0e-15);
|
||||||
|
}
|
||||||
|
const double Rv = std::min(rv, b);
|
||||||
|
|
||||||
|
return { Rs, Rv };
|
||||||
|
|
||||||
|
#else // BURN_RESV_BRIDGES
|
||||||
|
|
||||||
auto eps = std::copysign(1.0e-15, surface_rates[io]);
|
auto eps = std::copysign(1.0e-15, surface_rates[io]);
|
||||||
const auto Rs = surface_rates[ig] / (surface_rates[io] + eps);
|
const auto Rs = surface_rates[ig] / (surface_rates[io] + eps);
|
||||||
|
|
||||||
@ -562,6 +582,10 @@ namespace Opm {
|
|||||||
std::clamp(static_cast<double>(Rs), 0.0, rs),
|
std::clamp(static_cast<double>(Rs), 0.0, rs),
|
||||||
std::clamp(static_cast<double>(Rv), 0.0, rv)
|
std::clamp(static_cast<double>(Rv), 0.0, rv)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // BURN_RESV_BRIDGES
|
||||||
|
|
||||||
|
#undef BURN_RESV_BRIDGES
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user