mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-30 11:06:55 -06:00
Added output of dew and bubble point pressures
This commit is contained in:
parent
dda6f58de0
commit
4a46451d95
@ -1271,6 +1271,13 @@ namespace Opm {
|
||||
VectorType& RsSat = simData.getCellData( "RSSAT" );
|
||||
VectorType& RvSat = simData.getCellData( "RVSAT" );
|
||||
|
||||
simData.registerCellData( "PBUB", 1 );
|
||||
simData.registerCellData( "PDEW", 1 );
|
||||
|
||||
VectorType& Pb = simData.getCellData( "PBUB" );
|
||||
VectorType& Pd = simData.getCellData( "PDEW" );
|
||||
|
||||
|
||||
for (int cellIdx = 0; cellIdx < numCells; ++cellIdx) {
|
||||
const auto& intQuants = *ebosModel.cachedIntensiveQuantities(cellIdx, /*timeIdx=*/0);
|
||||
const auto& fs = intQuants.fluidState();
|
||||
@ -1304,6 +1311,8 @@ namespace Opm {
|
||||
FluidSystem::gasPhaseIdx,
|
||||
intQuants.pvtRegionIndex(),
|
||||
/*maxOilSaturation=*/1.0).value();
|
||||
Pb[cellIdx] = FluidSystem::bubblePointPressure(fs, intQuants.pvtRegionIndex()).value();
|
||||
Pd[cellIdx] = FluidSystem::dewPointPressure(fs, intQuants.pvtRegionIndex()).value();
|
||||
}
|
||||
if( liquid_active )
|
||||
{
|
||||
|
@ -723,9 +723,14 @@ namespace Opm
|
||||
if (log && vapour_active &&
|
||||
liquid_active && rstKeywords["PBPD"] > 0) {
|
||||
rstKeywords["PBPD"] = 0;
|
||||
Opm::OpmLog::warning("Bubble/dew point pressure output unsupported",
|
||||
"Writing bubble points and dew points (PBPD) to file is unsupported, "
|
||||
"as the simulator does not use these internally.");
|
||||
output.insert("PBUB",
|
||||
Opm::UnitSystem::measure::pressure,
|
||||
std::move( sd.getCellData("PBUB") ),
|
||||
data::TargetType::RESTART_AUXILLARY);
|
||||
output.insert("PDEW",
|
||||
Opm::UnitSystem::measure::pressure,
|
||||
std::move( sd.getCellData("PDEW") ),
|
||||
data::TargetType::RESTART_AUXILLARY);
|
||||
}
|
||||
|
||||
//Warn for any unhandled keyword
|
||||
|
Loading…
Reference in New Issue
Block a user