mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Check THP in the end
This commit is contained in:
parent
29a514754a
commit
f23b375c87
@ -1393,16 +1393,6 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controls.hasControl(Well2::InjectorCMode::THP) && currentControl != Well2::InjectorCMode::THP)
|
|
||||||
{
|
|
||||||
const auto& thp = controls.thp_limit;
|
|
||||||
double current_thp = well_state.thp()[well_index];
|
|
||||||
if (thp < current_thp) {
|
|
||||||
currentControl = Well2::InjectorCMode::THP;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (controls.hasControl(Well2::InjectorCMode::RATE) && currentControl != Well2::InjectorCMode::RATE)
|
if (controls.hasControl(Well2::InjectorCMode::RATE) && currentControl != Well2::InjectorCMode::RATE)
|
||||||
{
|
{
|
||||||
Well2::InjectorType injectorType = controls.injector_type;
|
Well2::InjectorType injectorType = controls.injector_type;
|
||||||
@ -1453,6 +1443,16 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (controls.hasControl(Well2::InjectorCMode::THP) && currentControl != Well2::InjectorCMode::THP)
|
||||||
|
{
|
||||||
|
const auto& thp = controls.thp_limit;
|
||||||
|
double current_thp = well_state.thp()[well_index];
|
||||||
|
if (thp < current_thp) {
|
||||||
|
currentControl = Well2::InjectorCMode::THP;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (well.isProducer( )) {
|
if (well.isProducer( )) {
|
||||||
@ -1469,16 +1469,6 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controls.hasControl(Well2::ProducerCMode::THP) && currentControl != Well2::ProducerCMode::THP)
|
|
||||||
{
|
|
||||||
const auto& thp = controls.thp_limit;
|
|
||||||
double current_thp = well_state.thp()[well_index];
|
|
||||||
if (thp > current_thp) {
|
|
||||||
currentControl = Well2::ProducerCMode::THP;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (controls.hasControl(Well2::ProducerCMode::ORAT) && currentControl != Well2::ProducerCMode::ORAT) {
|
if (controls.hasControl(Well2::ProducerCMode::ORAT) && currentControl != Well2::ProducerCMode::ORAT) {
|
||||||
double current_rate = -well_state.wellRates()[ wellrate_index + pu.phase_pos[BlackoilPhases::Liquid] ];
|
double current_rate = -well_state.wellRates()[ wellrate_index + pu.phase_pos[BlackoilPhases::Liquid] ];
|
||||||
if (controls.oil_rate < current_rate ) {
|
if (controls.oil_rate < current_rate ) {
|
||||||
@ -1555,6 +1545,16 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (controls.hasControl(Well2::ProducerCMode::THP) && currentControl != Well2::ProducerCMode::THP)
|
||||||
|
{
|
||||||
|
const auto& thp = controls.thp_limit;
|
||||||
|
double current_thp = well_state.thp()[well_index];
|
||||||
|
if (thp > current_thp) {
|
||||||
|
currentControl = Well2::ProducerCMode::THP;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user