diff --git a/test/porousmediumflow/mpnc/implicit/2p2ccomparison/problem.hh b/test/porousmediumflow/mpnc/implicit/2p2ccomparison/problem.hh index ce4a7e796026d463d20bf9d4697605f7f427a6d6..12436f264ebb71f4afe36111a15c4de6131d25f4 100644 --- a/test/porousmediumflow/mpnc/implicit/2p2ccomparison/problem.hh +++ b/test/porousmediumflow/mpnc/implicit/2p2ccomparison/problem.hh @@ -284,7 +284,9 @@ private: PhaseVector pc; using MaterialLaw = typename ParentType::SpatialParams::MaterialLaw; using MPAdapter = MPAdapter<MaterialLaw, numPhases>; - MPAdapter::capillaryPressures(pc, matParams, fs, liquidPhaseIdx); + + const int wPhaseIdx = this->spatialParams().template wettingPhaseAtPos<FluidSystem>(globalPos); + MPAdapter::capillaryPressures(pc, matParams, fs, wPhaseIdx); fs.setPressure(liquidPhaseIdx, fs.pressure(gasPhaseIdx) + pc[liquidPhaseIdx] - pc[gasPhaseIdx]); diff --git a/test/porousmediumflow/mpnc/implicit/kinetic/problem.hh b/test/porousmediumflow/mpnc/implicit/kinetic/problem.hh index 6a09aad720f67b1b9d29b072cf30aa3229d8c5cb..92dd18bd10115b859dcd1bf6d9f12fd4e3a091c4 100644 --- a/test/porousmediumflow/mpnc/implicit/kinetic/problem.hh +++ b/test/porousmediumflow/mpnc/implicit/kinetic/problem.hh @@ -424,7 +424,9 @@ private: //obtain pc according to saturation using MaterialLaw = typename ParentType::SpatialParams::MaterialLaw; using MPAdapter = MPAdapter<MaterialLaw, numPhases>; - MPAdapter::capillaryPressures(capPress, materialParams, equilibriumFluidState, liquidPhaseIdx); + + const int wPhaseIdx = this->spatialParams().template wettingPhaseAtPos<FluidSystem>(globalPos); + MPAdapter::capillaryPressures(capPress, materialParams, equilibriumFluidState, wPhaseIdx); Scalar p[numPhases]; if (this->spatialParams().inPM_(globalPos)){ diff --git a/test/porousmediumflow/mpnc/implicit/obstacle/problem.hh b/test/porousmediumflow/mpnc/implicit/obstacle/problem.hh index 999b4930baa1c9ae68b1cdb7d9608742ece92b5f..93276cb70179d2a05420334c650f23487cefb5df 100644 --- a/test/porousmediumflow/mpnc/implicit/obstacle/problem.hh +++ b/test/porousmediumflow/mpnc/implicit/obstacle/problem.hh @@ -362,7 +362,9 @@ private: PhaseVector pc; using MaterialLaw = typename ParentType::SpatialParams::MaterialLaw; using MPAdapter = MPAdapter<MaterialLaw, numPhases>; - MPAdapter::capillaryPressures(pc, matParams, fs, liquidPhaseIdx); + + const int wPhaseIdx = this->spatialParams().template wettingPhaseAtPos<FluidSystem>(globalPos); + MPAdapter::capillaryPressures(pc, matParams, fs, wPhaseIdx); fs.setPressure(otherPhaseIdx, fs.pressure(refPhaseIdx) + (pc[otherPhaseIdx] - pc[refPhaseIdx])); diff --git a/test/porousmediumflow/mpnc/implicit/thermalnonequilibrium/problem.hh b/test/porousmediumflow/mpnc/implicit/thermalnonequilibrium/problem.hh index 3216ac319a1352b13d0c76b9b441d1be981b3ca9..dc56fb8f76e6872a17a4895e0c4ff700d5c0777c 100644 --- a/test/porousmediumflow/mpnc/implicit/thermalnonequilibrium/problem.hh +++ b/test/porousmediumflow/mpnc/implicit/thermalnonequilibrium/problem.hh @@ -456,7 +456,9 @@ private: this->spatialParams().materialLawParamsAtPos(globalPos); using MaterialLaw = typename ParentType::SpatialParams::MaterialLaw; using MPAdapter = MPAdapter<MaterialLaw, numPhases>; - MPAdapter::capillaryPressures(capPress, materialParams, fluidState, wPhaseIdx); + + const int wettingPhaseIdx = this->spatialParams().template wettingPhaseAtPos<FluidSystem>(globalPos); + MPAdapter::capillaryPressures(capPress, materialParams, fluidState, wettingPhaseIdx); Scalar p[numPhases];