mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-25 16:51:00 -06:00
not calculating emulsionViscosity for small liquid_fraction
it might introduce inf/nan in the Jacobian matrix.
This commit is contained in:
parent
4845ad0107
commit
3ddb830ae9
@ -884,9 +884,14 @@ pressureDropSpiralICD(const int seg) const
|
||||
density.clearDerivatives();
|
||||
}
|
||||
|
||||
const EvalWell liquid_emulsion_viscosity = mswellhelpers::emulsionViscosity(water_fraction, water_viscosity,
|
||||
oil_fraction, oil_viscosity, sicd);
|
||||
const EvalWell mixture_viscosity = (water_fraction + oil_fraction) * liquid_emulsion_viscosity + gas_fraction * gas_viscosity;
|
||||
|
||||
const EvalWell liquid_fraction = water_fraction + oil_fraction;
|
||||
|
||||
// viscosity contribution from the liquid
|
||||
const EvalWell liquid_viscosity_fraction = liquid_fraction < 1.e-30 ? 0 :
|
||||
liquid_fraction * mswellhelpers::emulsionViscosity(water_fraction, water_viscosity, oil_fraction, oil_viscosity, sicd);
|
||||
|
||||
const EvalWell mixture_viscosity = liquid_viscosity_fraction + gas_fraction * gas_viscosity;
|
||||
|
||||
const EvalWell reservoir_rate = segment_mass_rates_[seg] / density;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user