mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-26 19:46:24 -06:00
Honor MULTZ- when determining TRANSZ over pinched cells (pinch all).
Previously, a barrier between cells in Z-direction was only honored if it was done using MULTZ. We disregarded MULTZ- completely when calculating the TRANZ over pinched cells. Now we also take into account MULTZ-.
This commit is contained in:
parent
44aaaf319e
commit
f6ae49fec4
@ -621,22 +621,24 @@ applyAllZMultipliers_(Scalar& trans,
|
|||||||
assert(insideFaceIdx==5); // as insideCartElemIdx < outsideCartElemIdx holds for the Z column
|
assert(insideFaceIdx==5); // as insideCartElemIdx < outsideCartElemIdx holds for the Z column
|
||||||
assert(outsideCartElemIdx > insideCartElemIdx);
|
assert(outsideCartElemIdx > insideCartElemIdx);
|
||||||
auto lastCartElemIdx = outsideCartElemIdx - cartDims[0]*cartDims[1];
|
auto lastCartElemIdx = outsideCartElemIdx - cartDims[0]*cartDims[1];
|
||||||
// Last multiplier
|
// Last multiplier using (Z+)*(Z-)
|
||||||
Scalar mult = transMult.getMultiplier(lastCartElemIdx , FaceDir::ZPlus);
|
Scalar mult = transMult.getMultiplier(lastCartElemIdx , FaceDir::ZPlus) *
|
||||||
|
transMult.getMultiplier(outsideCartElemIdx , FaceDir::ZMinus);
|
||||||
|
|
||||||
if ( !pinchTop )
|
if ( !pinchTop )
|
||||||
{
|
{
|
||||||
// pick the smallest multiplier for Z+ while looking down the pillar until reaching the other end of the connection
|
// pick the smallest multiplier using (Z+)*(Z-) while looking down
|
||||||
// While Z- is not all used here.
|
// the pillar until reaching the other end of the connection
|
||||||
for(auto cartElemIdx = insideCartElemIdx; cartElemIdx < lastCartElemIdx;
|
for(auto cartElemIdx = insideCartElemIdx; cartElemIdx < lastCartElemIdx;)
|
||||||
cartElemIdx += cartDims[0]*cartDims[1])
|
|
||||||
{
|
{
|
||||||
mult = std::min(mult, transMult.getMultiplier(cartElemIdx, FaceDir::ZPlus));
|
auto multiplier = transMult.getMultiplier(cartElemIdx, FaceDir::ZPlus);
|
||||||
|
cartElemIdx += cartDims[0]*cartDims[1];
|
||||||
|
multiplier *= transMult.getMultiplier(cartElemIdx, FaceDir::ZMinus);
|
||||||
|
mult = std::min(mult, multiplier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trans *= mult;
|
trans *= mult;
|
||||||
applyMultipliers_(trans, outsideFaceIdx, outsideCartElemIdx, transMult);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user