Merge pull request #4720 from totto82/fixinitrv

Fix  rv initialization
This commit is contained in:
Bård Skaflestad 2023-06-26 14:19:36 +02:00 committed by GitHub
commit 5d52ff46b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ operator()(const double depth,
const double temp,
const double satGas) const
{
if (satGas > 0.0) {
if (satGas > std::sqrt(std::numeric_limits<double>::epsilon())) {
return satRs(press, temp);
}
else {
@ -180,7 +180,7 @@ operator()(const double depth,
"Must not pass negative oil saturation"
};
}
if (satOil > 1e-16) {
if (satOil > std::sqrt(std::numeric_limits<double>::epsilon())) {
return satRv(press, temp);
}
else {
@ -222,7 +222,7 @@ operator()(const double depth,
};
}
if (satWat > 1e-16) {
if (satWat > std::sqrt(std::numeric_limits<double>::epsilon())) {
return satRvw(press, temp); //saturated Rvw
}
else {
@ -257,7 +257,7 @@ operator()(const double /* depth */,
const double temp,
const double satGas) const
{
if (satGas > 0.0) {
if (satGas > std::sqrt(std::numeric_limits<double>::epsilon())) {
return satRs(press, temp);
}
else {
@ -287,7 +287,7 @@ operator()(const double /*depth*/,
const double temp,
const double satOil) const
{
if (satOil > 0.0) {
if (satOil > std::sqrt(std::numeric_limits<double>::epsilon())) {
return satRv(press, temp);
}
else {
@ -317,7 +317,7 @@ operator()(const double /*depth*/,
const double temp,
const double satWat) const
{
if (satWat > 0.0) {
if (satWat > std::sqrt(std::numeric_limits<double>::epsilon())) {
return satRvw(press, temp);
}
else {