mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Added somax to input/output to restart file
This commit is contained in:
parent
69835d2cde
commit
bd0507cc3b
@ -1247,6 +1247,9 @@ namespace Opm {
|
||||
VectorType& Pb = simData.getCellData( "PBUB" );
|
||||
VectorType& Pd = simData.getCellData( "PDEW" );
|
||||
|
||||
simData.registerCellData( "SOMAX", 1 );
|
||||
VectorType& somax = simData.getCellData( "SOMAX" );
|
||||
|
||||
std::vector<int> failed_cells_pb;
|
||||
std::vector<int> failed_cells_pd;
|
||||
const auto& gridView = ebosSimulator().gridView();
|
||||
@ -1271,6 +1274,8 @@ namespace Opm {
|
||||
|
||||
temperature[cellIdx] = fs.temperature(FluidSystem::oilPhaseIdx).value();
|
||||
|
||||
somax[cellIdx] = ebosSimulator().model().maxOilSaturation(cellIdx);
|
||||
|
||||
if (aqua_active) {
|
||||
saturation[ satIdx + aqua_pos ] = fs.saturation(FluidSystem::waterPhaseIdx).value();
|
||||
bWater[cellIdx] = fs.invB(FluidSystem::waterPhaseIdx).value();
|
||||
|
@ -174,6 +174,10 @@ void solutionToSim( const data::Solution& sol,
|
||||
state.getCellData("SSOL") = sol.data("SSOL");
|
||||
}
|
||||
|
||||
if ( sol.has( "SOMAX" ) ) {
|
||||
state.registerCellData("SOMAX", 1);
|
||||
state.getCellData("SOMAX") = sol.data("SOMAX");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -149,6 +149,17 @@ public:
|
||||
// This is a restart, populate WellState and ReservoirState state objects from restart file
|
||||
output_writer_.initFromRestartFile(props_.phaseUsage(), grid(), state, prev_well_state, extra);
|
||||
initHydroCarbonState(state, props_.phaseUsage(), Opm::UgGridHelpers::numCells(grid()), has_disgas_, has_vapoil_);
|
||||
{
|
||||
const int num_cells = Opm::UgGridHelpers::numCells(grid());
|
||||
|
||||
typedef std::vector<double> VectorType;
|
||||
|
||||
VectorType& somax = state.getCellData( "SOMAX" );
|
||||
|
||||
for (int cellIdx = 0; cellIdx < num_cells; ++cellIdx) {
|
||||
ebosSimulator_.model().setMaxOilSaturation(somax[cellIdx], cellIdx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create timers and file for writing timing info.
|
||||
|
@ -420,11 +420,12 @@ namespace Opm
|
||||
ExtraData& extra )
|
||||
{
|
||||
std::map<std::string, UnitSystem::measure> solution_keys {{"PRESSURE" , UnitSystem::measure::pressure},
|
||||
{"SWAT" , UnitSystem::measure::identity},
|
||||
{"SGAS" , UnitSystem::measure::identity},
|
||||
{"TEMP" , UnitSystem::measure::temperature},
|
||||
{"RS" , UnitSystem::measure::gas_oil_ratio},
|
||||
{"RV" , UnitSystem::measure::oil_gas_ratio}};
|
||||
{"SWAT" , UnitSystem::measure::identity},
|
||||
{"SGAS" , UnitSystem::measure::identity},
|
||||
{"TEMP" , UnitSystem::measure::temperature},
|
||||
{"RS" , UnitSystem::measure::gas_oil_ratio},
|
||||
{"RV" , UnitSystem::measure::oil_gas_ratio},
|
||||
{"SOMAX", UnitSystem::measure::identity}};
|
||||
std::map<std::string, bool> extra_keys {{"OPMEXTRA" , false}};
|
||||
|
||||
if (restart_double_si_) {
|
||||
@ -774,6 +775,13 @@ namespace Opm
|
||||
data::TargetType::RESTART_AUXILIARY);
|
||||
}
|
||||
|
||||
if (sd.hasCellData("SOMAX")) {
|
||||
output.insert("SOMAX",
|
||||
Opm::UnitSystem::measure::identity,
|
||||
std::move( sd.getCellData("SOMAX") ),
|
||||
data::TargetType::RESTART_AUXILIARY);
|
||||
}
|
||||
|
||||
//Warn for any unhandled keyword
|
||||
if (log) {
|
||||
for (auto& keyValue : rstKeywords) {
|
||||
|
Loading…
Reference in New Issue
Block a user