diff --git a/opm/simulators/wells/WellState.hpp b/opm/simulators/wells/WellState.hpp index 99c5c4426..bea26c092 100644 --- a/opm/simulators/wells/WellState.hpp +++ b/opm/simulators/wells/WellState.hpp @@ -195,7 +195,8 @@ namespace Opm well.rates.set( rt::gas, wv[ wellrate_index + pu.phase_pos[BlackoilPhases::Vapour] ] ); } - const int num_perf_well = this->well_perf_data_[well_index].size(); + const auto& pd = this->well_perf_data_[well_index]; + const int num_perf_well = pd.size(); well.connections.resize(num_perf_well); for( int i = 0; i < num_perf_well; ++i ) { @@ -204,6 +205,7 @@ namespace Opm connection.index = globalCellIdxMap[active_index]; connection.pressure = this->perfPress()[ itr.second[1] + i ]; connection.reservoir_rate = this->perfRates()[ itr.second[1] + i ]; + connection.trans_factor = pd[i].connection_transmissibility_factor; } assert(num_perf_well == int(well.connections.size())); } diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 840a36b02..71469449d 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -168,6 +168,8 @@ Opm::data::Connection getConnection() con1.cell_saturation_water = 5.0; con1.cell_saturation_gas = 6.0; con1.effective_Kh = 7.0; + con1.trans_factor = 8.0; + return con1; } diff --git a/tests/test_ecl_output.cc b/tests/test_ecl_output.cc index c1363c2ba..72e66e0dc 100644 --- a/tests/test_ecl_output.cc +++ b/tests/test_ecl_output.cc @@ -240,8 +240,8 @@ void test_readWriteWells() * the connection keys (active indices) and well names correspond to the * input deck. All other entries in the well structures are arbitrary. */ - w1.connections.push_back( { 88, rc1, 30.45, 123.45, 0.0, 0.0, 0.0, 0.0 } ); - w1.connections.push_back( { 288, rc2, 33.19, 67.89, 0.0, 0.0, 0.0, 0.0 } ); + w1.connections.push_back( { 88, rc1, 30.45, 123.45, 0.0, 0.0, 0.0, 0.0, 123.456 } ); + w1.connections.push_back( { 288, rc2, 33.19, 67.89, 0.0, 0.0, 0.0, 0.0, 123.456 } ); w2.rates = r2; w2.bhp = 2.34; @@ -249,7 +249,7 @@ void test_readWriteWells() w2.control = 1; //w1.injectionControl = 2; //w1.productionControl = 2; - w2.connections.push_back( { 188, rc3, 36.22, 19.28, 0.0, 0.0, 0.0, 0.0 } ); + w2.connections.push_back( { 188, rc3, 36.22, 19.28, 0.0, 0.0, 0.0, 0.0, 123.456 } ); Opm::data::Wells wellRates;