mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 18:21:00 -06:00
when Reynolds number is zero, return zero friction factor
which means there is not friction pressure loss. The formualtion has problem in handling zero-value Reynolds number.
This commit is contained in:
parent
6366087efd
commit
8a19b719d6
@ -104,7 +104,11 @@ namespace mswellhelpers
|
||||
// Reynolds number
|
||||
const double re = std::abs(diameter * w / (area * mu));
|
||||
|
||||
assert(re > 0.0);
|
||||
if ( re == 0.0 ) {
|
||||
// make sure it is because the mass rate is zero
|
||||
assert(w == 0.);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
const double re_value1 = 200.;
|
||||
const double re_value2 = 4000.;
|
||||
|
@ -581,7 +581,7 @@ namespace Opm
|
||||
duneB_.mv(x, Bx);
|
||||
|
||||
// invDBx = duneD^-1 * Bx_
|
||||
BVectorWell invDBx = mswellhelpers::invDX(duneD_, Bx);
|
||||
const BVectorWell invDBx = mswellhelpers::invDX(duneD_, Bx);
|
||||
|
||||
// Ax = Ax - duneC_^T * invDBx
|
||||
duneC_.mmtv(invDBx,Ax);
|
||||
@ -597,7 +597,7 @@ namespace Opm
|
||||
apply(BVector& r) const
|
||||
{
|
||||
// invDrw_ = duneD^-1 * resWell_
|
||||
BVectorWell invDrw = mswellhelpers::invDX(duneD_, resWell_);
|
||||
const BVectorWell invDrw = mswellhelpers::invDX(duneD_, resWell_);
|
||||
// r = r - duneC_^T * invDrw
|
||||
duneC_.mmtv(invDrw, r);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user