mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Well Data: Report CTFs for Shut Connections
Needed to ensure that the CTFs reported to the summary files will be correct in the presence of WELPI even for shut connections.
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||
|
||||
#include <utility>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace Opm {
|
||||
@@ -2625,6 +2625,37 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
assignShutConnections(data::Wells& wsrpt) const
|
||||
{
|
||||
for (const auto& well : this->wells_ecl_) {
|
||||
auto xwPos = wsrpt.find(well.name());
|
||||
if (xwPos == wsrpt.end()) { // No well results. Unexpected.
|
||||
continue;
|
||||
}
|
||||
|
||||
auto& xcon = xwPos->second.connections;
|
||||
for (const auto& conn : well.getConnections()) {
|
||||
if (conn.state() != Connection::State::SHUT) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto& xc = xcon.emplace_back();
|
||||
xc.index = conn.global_index();
|
||||
xc.pressure = xc.reservoir_rate = 0.0;
|
||||
|
||||
xc.effective_Kh = conn.Kh();
|
||||
xc.trans_factor = conn.CF();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
|
||||
Reference in New Issue
Block a user