mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-30 13:03:49 -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
|
||||
// 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
|
||||
// for the inside ...
|
||||
|
Loading…
Reference in New Issue
Block a user