mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix 2-phase blackoil boundary
This commit is contained in:
parent
732931d952
commit
7606cc911b
@ -106,6 +106,9 @@ public:
|
|||||||
////////
|
////////
|
||||||
(*this) = 0.0;
|
(*this) = 0.0;
|
||||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
|
if (!FluidSystem::phaseIsActive(phaseIdx)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const auto& pBoundary = fluidState.pressure(phaseIdx);
|
const auto& pBoundary = fluidState.pressure(phaseIdx);
|
||||||
const Evaluation& pInside = insideIntQuants.fluidState().pressure(phaseIdx);
|
const Evaluation& pInside = insideIntQuants.fluidState().pressure(phaseIdx);
|
||||||
|
|
||||||
|
@ -71,7 +71,6 @@ class BlackOilRateVector
|
|||||||
enum { enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>() };
|
enum { enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>() };
|
||||||
enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
|
enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
|
||||||
enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
|
enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
|
||||||
|
|
||||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||||
using ParentType = Dune::FieldVector<Evaluation, numEq>;
|
using ParentType = Dune::FieldVector<Evaluation, numEq>;
|
||||||
|
|
||||||
@ -95,15 +94,15 @@ public:
|
|||||||
// convert to "surface volume" if requested
|
// convert to "surface volume" if requested
|
||||||
if (getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>()) {
|
if (getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>()) {
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||||
(*this)[FluidSystem::gasCompIdx] /=
|
(*this)[Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx)] /=
|
||||||
FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, pvtRegionIdx);
|
FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, pvtRegionIdx);
|
||||||
}
|
}
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
|
||||||
(*this)[FluidSystem::oilCompIdx] /=
|
(*this)[Indices::canonicalToActiveComponentIndex(FluidSystem::oilCompIdx)] /=
|
||||||
FluidSystem::referenceDensity(FluidSystem::oilPhaseIdx, pvtRegionIdx);
|
FluidSystem::referenceDensity(FluidSystem::oilPhaseIdx, pvtRegionIdx);
|
||||||
}
|
}
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||||
(*this)[FluidSystem::waterCompIdx] /=
|
(*this)[Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx)] /=
|
||||||
FluidSystem::referenceDensity(FluidSystem::waterPhaseIdx, pvtRegionIdx);
|
FluidSystem::referenceDensity(FluidSystem::waterPhaseIdx, pvtRegionIdx);
|
||||||
}
|
}
|
||||||
if (enableSolvent) {
|
if (enableSolvent) {
|
||||||
@ -148,15 +147,15 @@ public:
|
|||||||
// convert to "surface volume" if requested
|
// convert to "surface volume" if requested
|
||||||
if (getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>()) {
|
if (getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>()) {
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||||
(*this)[FluidSystem::gasCompIdx] /=
|
(*this)[Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx)] /=
|
||||||
FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, pvtRegionIdx);
|
FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, pvtRegionIdx);
|
||||||
}
|
}
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
|
||||||
(*this)[FluidSystem::oilCompIdx] /=
|
(*this)[Indices::canonicalToActiveComponentIndex(FluidSystem::oilCompIdx)] /=
|
||||||
FluidSystem::referenceDensity(FluidSystem::oilPhaseIdx, pvtRegionIdx);
|
FluidSystem::referenceDensity(FluidSystem::oilPhaseIdx, pvtRegionIdx);
|
||||||
}
|
}
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||||
(*this)[FluidSystem::waterCompIdx] /=
|
(*this)[Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx)] /=
|
||||||
FluidSystem::referenceDensity(FluidSystem::waterPhaseIdx, pvtRegionIdx);
|
FluidSystem::referenceDensity(FluidSystem::waterPhaseIdx, pvtRegionIdx);
|
||||||
}
|
}
|
||||||
if (enableSolvent) {
|
if (enableSolvent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user