mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ebos: avoid potential division by zero in transmissibility calculation
in practice this could happen if the NTG value for a cell is set to zero.
This commit is contained in:
parent
704389d14f
commit
0012aac5bd
@ -215,7 +215,12 @@ public:
|
|||||||
|
|
||||||
// convert half transmissibilities to full face
|
// convert half transmissibilities to full face
|
||||||
// transmissibilities using the harmonic mean
|
// transmissibilities using the harmonic mean
|
||||||
Scalar trans = 1.0 / (1.0/halfTrans1 + 1.0/halfTrans2);
|
Scalar trans;
|
||||||
|
if (std::abs(halfTrans1) < 1e-20 || std::abs(halfTrans2) < 1e-20)
|
||||||
|
// avoid division by zero
|
||||||
|
trans = 0.0;
|
||||||
|
else
|
||||||
|
trans = 1.0 / (1.0/halfTrans1 + 1.0/halfTrans2);
|
||||||
|
|
||||||
// apply the full face transmissibility multipliers
|
// apply the full face transmissibility multipliers
|
||||||
// for the inside ...
|
// for the inside ...
|
||||||
|
Loading…
Reference in New Issue
Block a user