Fix generic boundary conditions for blackoil model

Currently it doesn't allow for polymer or solvent influx
on the boundary with the free flow option
This commit is contained in:
Tor Harald Sandve
2019-01-31 15:41:47 +01:00
parent 70a7207578
commit fb34eb304c
2 changed files with 28 additions and 3 deletions
+12 -3
View File
@@ -426,11 +426,15 @@ protected:
// only works for the element centered finite volume method. for ebos this
// does not matter, though.
unsigned upstreamIdx = upstreamIndex_(phaseIdx);
const auto& up = elemCtx.intensiveQuantities(upstreamIdx, timeIdx);
if (upstreamIdx == interiorDofIdx_)
if (upstreamIdx == interiorDofIdx_) {
const auto& up = elemCtx.intensiveQuantities(upstreamIdx, timeIdx);
volumeFlux_[phaseIdx] =
pressureDifference_[phaseIdx]*up.mobility(phaseIdx)*(-trans/faceArea);
else {
if (enableSolvent && phaseIdx == gasPhaseIdx) {
asImp_().setSolventVolumeFlux( pressureDifference_[phaseIdx]*up.solventMobility()*(-trans/faceArea));
}
} else {
// compute the phase mobility using the material law parameters of the
// interior element. TODO: this could probably be done more efficiently
const auto& matParams =
@@ -443,6 +447,11 @@ protected:
const auto& mob = kr[phaseIdx]/exFluidState.viscosity(phaseIdx);
volumeFlux_[phaseIdx] =
pressureDifference_[phaseIdx]*mob*(-trans/faceArea);
// Solvent inflow is not yet supported
if (enableSolvent && phaseIdx == gasPhaseIdx) {
asImp_().setSolventVolumeFlux( 0.0 );
}
}
}
}