setting uninitialized bhp to be bhp_limit in updateWellStateWithTarget

to avoid uninitialized bhp 0. to be used.
This commit is contained in:
Kai Bao 2023-09-06 11:46:20 +02:00
parent 8bf45ea86b
commit 529af98ce9

View File

@ -874,6 +874,10 @@ namespace Opm
// within the wellbore from the previous result, and hopefully it is a good
// initial guess for the zero rate target.
ws.surface_rates[phasePos] = std::max(1.e-7, ws.surface_rates[phasePos]);
if (ws.bhp == 0.) {
ws.bhp = controls.bhp_limit;
}
}
//Producer
else
@ -1096,6 +1100,10 @@ namespace Opm
break;
} // end of switch
if (ws.bhp == 0.) {
ws.bhp = controls.bhp_limit;
}
}
}