Merge pull request #1266 from akva2/serialize_whole_connection

added: serialize the whole connection struct to OPM_XWEL
This commit is contained in:
Joakim Hove 2019-11-27 17:13:19 +01:00 committed by GitHub
commit 70066df8ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -117,7 +117,7 @@ namespace Opm {
struct Connection {
using global_index = size_t;
static const constexpr int restart_size = 2;
static const constexpr int restart_size = 6;
global_index index;
Rates rates;

View File

@ -784,8 +784,12 @@ namespace {
auto& connection = well.connections.back();
connection.index = grid.getGlobalIndex(i, j, k);
connection.pressure = *opm_xwel_data; ++opm_xwel_data;
connection.reservoir_rate = *opm_xwel_data; ++opm_xwel_data;
connection.pressure = *opm_xwel_data++;
connection.reservoir_rate = *opm_xwel_data++;
connection.cell_pressure = *opm_xwel_data++;
connection.cell_saturation_water = *opm_xwel_data++;
connection.cell_saturation_gas = *opm_xwel_data++;
connection.effective_Kh = *opm_xwel_data++;
for (const auto& phase : phases) {
connection.rates.set(phase, *opm_xwel_data);

View File

@ -166,6 +166,10 @@ namespace {
xwel.push_back(connection->pressure);
xwel.push_back(connection->reservoir_rate);
xwel.push_back(connection->cell_pressure);
xwel.push_back(connection->cell_saturation_water);
xwel.push_back(connection->cell_saturation_gas);
xwel.push_back(connection->effective_Kh);
for (auto phase : phases)
xwel.push_back(connection->rates.get(phase));