mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #859 from totto82/nodispgas
ignore dispersion in gas phase
This commit is contained in:
commit
ec8f84429e
@ -65,6 +65,13 @@ class BlackOilDispersionModule<TypeTag, /*enableDispersion=*/false>
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
using ExtensiveQuantities = BlackOilDispersionExtensiveQuantities<TypeTag,false>;
|
using ExtensiveQuantities = BlackOilDispersionExtensiveQuantities<TypeTag,false>;
|
||||||
|
|
||||||
|
#if HAVE_ECL_INPUT
|
||||||
|
static void initFromState(const EclipseState&)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Adds the dispersive flux to the flux vector over a flux
|
* \brief Adds the dispersive flux to the flux vector over a flux
|
||||||
* integration point.
|
* integration point.
|
||||||
@ -112,6 +119,16 @@ class BlackOilDispersionModule<TypeTag, /*enableDispersion=*/true>
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
using ExtensiveQuantities = BlackOilDispersionExtensiveQuantities<TypeTag,true>;
|
using ExtensiveQuantities = BlackOilDispersionExtensiveQuantities<TypeTag,true>;
|
||||||
|
#if HAVE_ECL_INPUT
|
||||||
|
static void initFromState(const EclipseState& eclState)
|
||||||
|
{
|
||||||
|
if (eclState.getSimulationConfig().hasVAPWAT() || eclState.getSimulationConfig().hasVAPOIL()) {
|
||||||
|
OpmLog::warning("Dispersion is activated in combination with VAPWAT/VAPOIL. \n"
|
||||||
|
"Water/oil is still allowed to vaporize, but dispersion in the "
|
||||||
|
"gas phase is ignored.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/*!
|
/*!
|
||||||
* \brief Adds the mass flux due to dispersion to the flux vector over the
|
* \brief Adds the mass flux due to dispersion to the flux vector over the
|
||||||
* flux integration point.
|
* flux integration point.
|
||||||
@ -170,6 +187,13 @@ public:
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Adding dispersion in the gas phase leads to
|
||||||
|
// convergence issues and unphysical results.
|
||||||
|
// We disable dispersion in the gas phase for now
|
||||||
|
if (FluidSystem::gasPhaseIdx == phaseIdx) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// no dispersion in gas for blackoil models unless gas can contain evaporated water or oil
|
// no dispersion in gas for blackoil models unless gas can contain evaporated water or oil
|
||||||
if ((!FluidSystem::enableVaporizedWater() && !FluidSystem::enableVaporizedOil()) && FluidSystem::gasPhaseIdx == phaseIdx) {
|
if ((!FluidSystem::enableVaporizedWater() && !FluidSystem::enableVaporizedOil()) && FluidSystem::gasPhaseIdx == phaseIdx) {
|
||||||
continue;
|
continue;
|
||||||
@ -226,6 +250,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static Scalar toMassFractionGasOil (unsigned regionIdx) {
|
static Scalar toMassFractionGasOil (unsigned regionIdx) {
|
||||||
Scalar rhoO = FluidSystem::referenceDensity(FluidSystem::oilPhaseIdx, regionIdx);
|
Scalar rhoO = FluidSystem::referenceDensity(FluidSystem::oilPhaseIdx, regionIdx);
|
||||||
Scalar rhoG = FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, regionIdx);
|
Scalar rhoG = FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, regionIdx);
|
||||||
|
Loading…
Reference in New Issue
Block a user