mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-25 00:40:02 -06:00
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:
parent
70a7207578
commit
fb34eb304c
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1306,6 +1306,7 @@ public:
|
||||
unsigned globalDofIdx = context.globalSpaceIndex(interiorDofIdx, timeIdx);
|
||||
values.setThermalFlow(context, spaceIdx, timeIdx, initialFluidStates_[globalDofIdx]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -2051,6 +2052,21 @@ private:
|
||||
dofFluidState.setRv(rvData[cartesianDofIdx]);
|
||||
else if (Indices::gasEnabled && Indices::oilEnabled)
|
||||
dofFluidState.setRv(0.0);
|
||||
|
||||
//////
|
||||
// set invB_
|
||||
//////
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
if (!FluidSystem::phaseIsActive(phaseIdx))
|
||||
continue;
|
||||
|
||||
const auto& b = FluidSystem::inverseFormationVolumeFactor(dofFluidState, phaseIdx, pvtRegionIndex(dofIdx));
|
||||
dofFluidState.setInvB(phaseIdx, b);
|
||||
|
||||
const auto& rho = FluidSystem::density(dofFluidState, phaseIdx, pvtRegionIndex(dofIdx));
|
||||
dofFluidState.setDensity(phaseIdx, rho);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user