Merge pull request #2835 from bska/chase-ctfac-api-update

Provide Simulator's Dynamic CTF in data::Connection
This commit is contained in:
Bård Skaflestad 2020-10-06 14:33:12 +02:00 committed by GitHub
commit 406feea8e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -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()));
}

View File

@ -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;
}

View File

@ -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;