added: serialize the whole connection struct to OPM_XWEL
This commit is contained in:
parent
854b79c280
commit
a34bc76b46
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user