mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: do not use Opm:: prefix when inside namespace Opm
This commit is contained in:
@@ -65,7 +65,7 @@ class BlackOilBoundaryRateVector : public GetPropType<TypeTag, Properties::RateV
|
||||
|
||||
static constexpr bool blackoilConserveSurfaceVolume = getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>();
|
||||
|
||||
using EnergyModule = Opm::BlackOilEnergyModule<TypeTag, enableEnergy>;
|
||||
using EnergyModule = BlackOilEnergyModule<TypeTag, enableEnergy>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@@ -146,8 +146,8 @@ public:
|
||||
specificEnthalpy = fluidState.enthalpy(phaseIdx);
|
||||
}
|
||||
else {
|
||||
density = Opm::getValue(fluidState.density(phaseIdx));
|
||||
specificEnthalpy = Opm::getValue(fluidState.enthalpy(phaseIdx));
|
||||
density = getValue(fluidState.density(phaseIdx));
|
||||
specificEnthalpy = getValue(fluidState.enthalpy(phaseIdx));
|
||||
}
|
||||
}
|
||||
else if (focusDofIdx == interiorDofIdx) {
|
||||
@@ -155,8 +155,8 @@ public:
|
||||
specificEnthalpy = insideIntQuants.fluidState().enthalpy(phaseIdx);
|
||||
}
|
||||
else {
|
||||
density = Opm::getValue(insideIntQuants.fluidState().density(phaseIdx));
|
||||
specificEnthalpy = Opm::getValue(insideIntQuants.fluidState().enthalpy(phaseIdx));
|
||||
density = getValue(insideIntQuants.fluidState().density(phaseIdx));
|
||||
specificEnthalpy = getValue(insideIntQuants.fluidState().enthalpy(phaseIdx));
|
||||
}
|
||||
|
||||
Evaluation enthalpyRate = density*extQuants.volumeFlux(phaseIdx)*specificEnthalpy;
|
||||
@@ -186,9 +186,9 @@ public:
|
||||
|
||||
#ifndef NDEBUG
|
||||
for (unsigned i = 0; i < numEq; ++i) {
|
||||
Opm::Valgrind::CheckDefined((*this)[i]);
|
||||
Valgrind::CheckDefined((*this)[i]);
|
||||
}
|
||||
Opm::Valgrind::CheckDefined(*this);
|
||||
Valgrind::CheckDefined(*this);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -263,8 +263,8 @@ public:
|
||||
|
||||
#ifndef NDEBUG
|
||||
for (unsigned i = 0; i < numEq; ++i)
|
||||
Opm::Valgrind::CheckDefined((*this)[i]);
|
||||
Opm::Valgrind::CheckDefined(*this);
|
||||
Valgrind::CheckDefined((*this)[i]);
|
||||
Valgrind::CheckDefined(*this);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@@ -70,10 +70,10 @@ class BlackOilBrineModule
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
|
||||
using TabulatedTwoDFunction = typename Opm::IntervalTabulated2DFunction<Scalar>;
|
||||
using TabulatedFunction = Tabulated1DFunction<Scalar>;
|
||||
using TabulatedTwoDFunction = IntervalTabulated2DFunction<Scalar>;
|
||||
|
||||
static constexpr unsigned saltConcentrationIdx = Indices::saltConcentrationIdx;
|
||||
static constexpr unsigned contiBrineEqIdx = Indices::contiBrineEqIdx;
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
/*!
|
||||
* \brief Initialize all internal data structures needed by the brine module
|
||||
*/
|
||||
static void initFromState(const Opm::EclipseState& eclState)
|
||||
static void initFromState(const EclipseState& eclState)
|
||||
{
|
||||
// some sanity checks: if brine are enabled, the BRINE keyword must be
|
||||
// present, if brine are disabled the keyword must not be present.
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
* Toolbox::template decay<LhsEval>(intQuants.porosity());
|
||||
|
||||
// avoid singular matrix if no water is present.
|
||||
surfaceVolumeWater = Opm::max(surfaceVolumeWater, 1e-10);
|
||||
surfaceVolumeWater = max(surfaceVolumeWater, 1e-10);
|
||||
|
||||
// Brine in water phase
|
||||
const LhsEval massBrine = surfaceVolumeWater
|
||||
@@ -249,8 +249,8 @@ public:
|
||||
else {
|
||||
flux[contiBrineEqIdx] =
|
||||
extQuants.volumeFlux(waterPhaseIdx)
|
||||
*Opm::decay<Scalar>(up.fluidState().invB(waterPhaseIdx))
|
||||
*Opm::decay<Scalar>(up.fluidState().saltConcentration());
|
||||
*decay<Scalar>(up.fluidState().invB(waterPhaseIdx))
|
||||
*decay<Scalar>(up.fluidState().saltConcentration());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <dune/common/fvector.hh>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
/*!
|
||||
@@ -92,7 +93,7 @@ class BlackOilDiffusionModule<TypeTag, /*enableDiffusion=*/true>
|
||||
enum { numComponents = FluidSystem::numComponents };
|
||||
enum { conti0EqIdx = Indices::conti0EqIdx };
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@@ -270,7 +271,7 @@ protected:
|
||||
if(!FluidSystem::enableDiffusion())
|
||||
return;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, timeIdx);
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
if (!FluidSystem::phaseIsActive(phaseIdx)) {
|
||||
@@ -424,7 +425,7 @@ protected:
|
||||
-
|
||||
intQuantsInside.fluidState().moleFraction(phaseIdx, compIdx))
|
||||
* diffusivity / faceArea; //opm-models expects pr area flux
|
||||
Opm::Valgrind::CheckDefined(moleFractionGradientNormal_[phaseIdx][compIdx]);
|
||||
Valgrind::CheckDefined(moleFractionGradientNormal_[phaseIdx][compIdx]);
|
||||
|
||||
// use the arithmetic average for the effective
|
||||
// diffusion coefficients.
|
||||
@@ -434,7 +435,7 @@ protected:
|
||||
intQuantsOutside.effectiveDiffusionCoefficient(phaseIdx, compIdx))
|
||||
/ 2;
|
||||
|
||||
Opm::Valgrind::CheckDefined(effectiveDiffusionCoefficient_[phaseIdx][compIdx]);
|
||||
Valgrind::CheckDefined(effectiveDiffusionCoefficient_[phaseIdx][compIdx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
// energys have been disabled at compile time
|
||||
return;
|
||||
|
||||
Opm::VtkBlackOilEnergyModule<TypeTag>::registerParameters();
|
||||
VtkBlackOilEnergyModule<TypeTag>::registerParameters();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
// energys have been disabled at compile time
|
||||
return;
|
||||
|
||||
model.addOutputModule(new Opm::VtkBlackOilEnergyModule<TypeTag>(simulator));
|
||||
model.addOutputModule(new VtkBlackOilEnergyModule<TypeTag>(simulator));
|
||||
}
|
||||
|
||||
static bool primaryVarApplies(unsigned pvIdx)
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
if (!enableEnergy)
|
||||
return;
|
||||
|
||||
const auto& poro = Opm::decay<LhsEval>(intQuants.porosity());
|
||||
const auto& poro = decay<LhsEval>(intQuants.porosity());
|
||||
|
||||
// accumulate the internal energy of the fluids
|
||||
const auto& fs = intQuants.fluidState();
|
||||
@@ -158,16 +158,16 @@ public:
|
||||
if (!FluidSystem::phaseIsActive(phaseIdx))
|
||||
continue;
|
||||
|
||||
const auto& u = Opm::decay<LhsEval>(fs.internalEnergy(phaseIdx));
|
||||
const auto& S = Opm::decay<LhsEval>(fs.saturation(phaseIdx));
|
||||
const auto& rho = Opm::decay<LhsEval>(fs.density(phaseIdx));
|
||||
const auto& u = decay<LhsEval>(fs.internalEnergy(phaseIdx));
|
||||
const auto& S = decay<LhsEval>(fs.saturation(phaseIdx));
|
||||
const auto& rho = decay<LhsEval>(fs.density(phaseIdx));
|
||||
|
||||
storage[contiEnergyEqIdx] += poro*S*u*rho;
|
||||
}
|
||||
|
||||
// add the internal energy of the rock
|
||||
Scalar refPoro = intQuants.referencePorosity();
|
||||
const auto& uRock = Opm::decay<LhsEval>(intQuants.rockInternalEnergy());
|
||||
const auto& uRock = decay<LhsEval>(intQuants.rockInternalEnergy());
|
||||
storage[contiEnergyEqIdx] += (1.0 - refPoro)*uRock;
|
||||
storage[contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
|
||||
}
|
||||
@@ -214,8 +214,8 @@ public:
|
||||
|
||||
const auto& volFlux = extQuants.volumeFlux(phaseIdx);
|
||||
flux[contiEnergyEqIdx] +=
|
||||
Opm::decay<UpstreamEval>(fs.enthalpy(phaseIdx))
|
||||
* Opm::decay<UpstreamEval>(fs.density(phaseIdx))
|
||||
decay<UpstreamEval>(fs.enthalpy(phaseIdx))
|
||||
* decay<UpstreamEval>(fs.density(phaseIdx))
|
||||
* volFlux;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
static Scalar computeResidualError(const EqVector& resid)
|
||||
{
|
||||
// do not weight the residual of energy when it comes to convergence
|
||||
return std::abs(Opm::scalarValue(resid[contiEnergyEqIdx]));
|
||||
return std::abs(scalarValue(resid[contiEnergyEqIdx]));
|
||||
}
|
||||
|
||||
template <class DofEntity>
|
||||
@@ -469,7 +469,7 @@ class BlackOilEnergyExtensiveQuantities
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
using EnergyModule = BlackOilEnergyModule<TypeTag>;
|
||||
|
||||
@@ -496,28 +496,28 @@ public:
|
||||
Evaluation deltaT;
|
||||
if (elemCtx.focusDofIndex() == inIdx)
|
||||
deltaT =
|
||||
Opm::decay<Scalar>(exFs.temperature(/*phaseIdx=*/0))
|
||||
decay<Scalar>(exFs.temperature(/*phaseIdx=*/0))
|
||||
- inFs.temperature(/*phaseIdx=*/0);
|
||||
else if (elemCtx.focusDofIndex() == exIdx)
|
||||
deltaT =
|
||||
exFs.temperature(/*phaseIdx=*/0)
|
||||
- Opm::decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
|
||||
- decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
|
||||
else
|
||||
deltaT =
|
||||
Opm::decay<Scalar>(exFs.temperature(/*phaseIdx=*/0))
|
||||
- Opm::decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
|
||||
decay<Scalar>(exFs.temperature(/*phaseIdx=*/0))
|
||||
- decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
|
||||
|
||||
Evaluation inLambda;
|
||||
if (elemCtx.focusDofIndex() == inIdx)
|
||||
inLambda = inIq.totalThermalConductivity();
|
||||
else
|
||||
inLambda = Opm::decay<Scalar>(inIq.totalThermalConductivity());
|
||||
inLambda = decay<Scalar>(inIq.totalThermalConductivity());
|
||||
|
||||
Evaluation exLambda;
|
||||
if (elemCtx.focusDofIndex() == exIdx)
|
||||
exLambda = exIq.totalThermalConductivity();
|
||||
else
|
||||
exLambda = Opm::decay<Scalar>(exIq.totalThermalConductivity());
|
||||
exLambda = decay<Scalar>(exIq.totalThermalConductivity());
|
||||
|
||||
auto distVec = elemCtx.pos(exIdx, timeIdx);
|
||||
distVec -= elemCtx.pos(inIdx, timeIdx);
|
||||
@@ -560,14 +560,14 @@ public:
|
||||
- inFs.temperature(/*phaseIdx=*/0);
|
||||
else
|
||||
deltaT =
|
||||
Opm::decay<Scalar>(boundaryFs.temperature(/*phaseIdx=*/0))
|
||||
- Opm::decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
|
||||
decay<Scalar>(boundaryFs.temperature(/*phaseIdx=*/0))
|
||||
- decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
|
||||
|
||||
Evaluation lambda;
|
||||
if (ctx.focusDofIndex() == inIdx)
|
||||
lambda = inIq.totalThermalConductivity();
|
||||
else
|
||||
lambda = Opm::decay<Scalar>(inIq.totalThermalConductivity());
|
||||
lambda = decay<Scalar>(inIq.totalThermalConductivity());
|
||||
|
||||
auto distVec = scvf.integrationPos();
|
||||
distVec -= ctx.pos(inIdx, timeIdx);
|
||||
|
||||
@@ -83,10 +83,10 @@ class BlackOilExtboModule
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
typedef typename Opm::Tabulated1DFunction<Scalar> TabulatedFunction;
|
||||
typedef typename Opm::UniformXTabulated2DFunction<Scalar> Tabulated2DFunction;
|
||||
using TabulatedFunction = Tabulated1DFunction<Scalar>;
|
||||
using Tabulated2DFunction = UniformXTabulated2DFunction<Scalar>;
|
||||
|
||||
static constexpr unsigned zFractionIdx = Indices::zFractionIdx;
|
||||
static constexpr unsigned contiZfracEqIdx = Indices::contiZfracEqIdx;
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
/*!
|
||||
* \brief Initialize all internal data structures needed by the solvent module
|
||||
*/
|
||||
static void initFromState(const Opm::EclipseState& eclState)
|
||||
static void initFromState(const EclipseState& eclState)
|
||||
{
|
||||
// some sanity checks: if extended BO is enabled, the PVTSOL keyword must be
|
||||
// present, if extended BO is disabled the keyword must not be present.
|
||||
@@ -267,7 +267,7 @@ public:
|
||||
// extBO have disabled at compile time
|
||||
return;
|
||||
|
||||
//Opm::VtkBlackOilExtboModule<TypeTag>::registerParameters();
|
||||
//VtkBlackOilExtboModule<TypeTag>::registerParameters();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
// extBO have disabled at compile time
|
||||
return;
|
||||
|
||||
//model.addOutputModule(new Opm::VtkBlackOilExtboModule<TypeTag>(simulator));
|
||||
//model.addOutputModule(new VtkBlackOilExtboModule<TypeTag>(simulator));
|
||||
}
|
||||
|
||||
static bool primaryVarApplies(unsigned pvIdx)
|
||||
@@ -393,8 +393,8 @@ public:
|
||||
else {
|
||||
flux[contiZfracEqIdx] =
|
||||
extQuants.volumeFlux(gasPhaseIdx)
|
||||
* (Opm::decay<Scalar>(upGas.yVolume()))
|
||||
* Opm::decay<Scalar>(fsGas.invB(gasPhaseIdx));
|
||||
* (decay<Scalar>(upGas.yVolume()))
|
||||
* decay<Scalar>(fsGas.invB(gasPhaseIdx));
|
||||
}
|
||||
if (FluidSystem::enableDissolvedGas()) { // account for dissolved z in oil phase
|
||||
unsigned upIdxOil = static_cast<unsigned>(extQuants.upstreamIndex(oilPhaseIdx));
|
||||
@@ -410,9 +410,9 @@ public:
|
||||
else {
|
||||
flux[contiZfracEqIdx] +=
|
||||
extQuants.volumeFlux(oilPhaseIdx)
|
||||
* Opm::decay<Scalar>(upOil.xVolume())
|
||||
* Opm::decay<Scalar>(fsOil.Rs())
|
||||
* Opm::decay<Scalar>(fsOil.invB(oilPhaseIdx));
|
||||
* decay<Scalar>(upOil.xVolume())
|
||||
* decay<Scalar>(fsOil.Rs())
|
||||
* decay<Scalar>(fsOil.invB(oilPhaseIdx));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -898,7 +898,7 @@ class BlackOilExtboExtensiveQuantities
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
static constexpr unsigned gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
||||
static constexpr int dimWorld = GridView::dimensionworld;
|
||||
|
||||
@@ -63,7 +63,7 @@ class BlackOilExtensiveQuantities
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
enum { enableDiffusion = getPropValue<TypeTag, Properties::EnableDiffusion>() };
|
||||
using DiffusionExtensiveQuantities = Opm::BlackOilDiffusionExtensiveQuantities<TypeTag, enableDiffusion>;
|
||||
using DiffusionExtensiveQuantities = BlackOilDiffusionExtensiveQuantities<TypeTag, enableDiffusion>;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@@ -72,9 +72,9 @@ class BlackOilFoamModule
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
|
||||
using TabulatedFunction = Tabulated1DFunction<Scalar>;
|
||||
|
||||
static constexpr unsigned foamConcentrationIdx = Indices::foamConcentrationIdx;
|
||||
static constexpr unsigned contiFoamEqIdx = Indices::contiFoamEqIdx;
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
/*!
|
||||
* \brief Initialize all internal data structures needed by the foam module
|
||||
*/
|
||||
static void initFromState(const Opm::EclipseState& eclState)
|
||||
static void initFromState(const EclipseState& eclState)
|
||||
{
|
||||
// some sanity checks: if foam is enabled, the FOAM keyword must be
|
||||
// present, if foam is disabled the keyword must not be present.
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
setNumPvtRegions(numPvtRegions);
|
||||
|
||||
// Get and check FOAMROCK data.
|
||||
const Opm::FoamConfig& foamConf = eclState.getInitConfig().getFoamConfig();
|
||||
const FoamConfig& foamConf = eclState.getInitConfig().getFoamConfig();
|
||||
if (numSatRegions != foamConf.size()) {
|
||||
throw std::runtime_error("Inconsistent sizes, number of saturation regions differ from the number of elements "
|
||||
"in FoamConfig, which typically corresponds to the number of records in FOAMROCK.");
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
foamCoefficients_[satReg].ep_surf = rec.exponent();
|
||||
foamRockDensity_[satReg] = rec.rockDensity();
|
||||
foamAllowDesorption_[satReg] = rec.allowDesorption();
|
||||
const auto& foamadsTable = foamadsTables.template getTable<Opm::FoamadsTable>(satReg);
|
||||
const auto& foamadsTable = foamadsTables.template getTable<FoamadsTable>(satReg);
|
||||
const auto& conc = foamadsTable.getFoamConcentrationColumn();
|
||||
const auto& ads = foamadsTable.getAdsorbedFoamColumn();
|
||||
adsorbedFoamTable_[satReg].setXYContainers(conc, ads);
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
|
||||
// Set data that vary with PVT region.
|
||||
for (std::size_t pvtReg = 0; pvtReg < numPvtRegions; ++pvtReg) {
|
||||
const auto& foammobTable = foammobTables.template getTable<Opm::FoammobTable>(pvtReg);
|
||||
const auto& foammobTable = foammobTables.template getTable<FoammobTable>(pvtReg);
|
||||
const auto& conc = foammobTable.getFoamConcentrationColumn();
|
||||
const auto& mobMult = foammobTable.getMobilityMultiplierColumn();
|
||||
gasMobilityMultiplierTable_[pvtReg].setXYContainers(conc, mobMult);
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
// foam has been disabled at compile time
|
||||
return;
|
||||
|
||||
//Opm::VtkBlackOilFoamModule<TypeTag>::registerParameters();
|
||||
//VtkBlackOilFoamModule<TypeTag>::registerParameters();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -245,9 +245,9 @@ public:
|
||||
return;
|
||||
|
||||
if (enableVtkOutput) {
|
||||
Opm::OpmLog::warning("VTK output requested, currently unsupported by the foam module.");
|
||||
OpmLog::warning("VTK output requested, currently unsupported by the foam module.");
|
||||
}
|
||||
//model.addOutputModule(new Opm::VtkBlackOilFoamModule<TypeTag>(simulator));
|
||||
//model.addOutputModule(new VtkBlackOilFoamModule<TypeTag>(simulator));
|
||||
}
|
||||
|
||||
static bool primaryVarApplies(unsigned pvIdx)
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
* Toolbox::template decay<LhsEval>(intQuants.porosity());
|
||||
|
||||
// Avoid singular matrix if no gas is present.
|
||||
surfaceVolumeFreeGas = Opm::max(surfaceVolumeFreeGas, 1e-10);
|
||||
surfaceVolumeFreeGas = max(surfaceVolumeFreeGas, 1e-10);
|
||||
|
||||
// Foam/surfactant in gas phase.
|
||||
const LhsEval gasFoam = surfaceVolumeFreeGas
|
||||
@@ -355,8 +355,8 @@ public:
|
||||
} else {
|
||||
flux[contiFoamEqIdx] =
|
||||
extQuants.volumeFlux(gasPhaseIdx)
|
||||
*Opm::decay<Scalar>(up.fluidState().invB(gasPhaseIdx))
|
||||
*Opm::decay<Scalar>(up.foamConcentration());
|
||||
*decay<Scalar>(up.fluidState().invB(gasPhaseIdx))
|
||||
*decay<Scalar>(up.foamConcentration());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -99,11 +99,11 @@ class BlackOilIntensiveQuantities
|
||||
static const bool compositionSwitchEnabled = Indices::gasEnabled;
|
||||
static const bool waterEnabled = Indices::waterEnabled;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
using FluxIntensiveQuantities = typename FluxModule::FluxIntensiveQuantities;
|
||||
using FluidState = Opm::BlackOilFluidState<Evaluation, FluidSystem, enableTemperature, enableEnergy, compositionSwitchEnabled, enableBrine, Indices::numPhases >;
|
||||
using DiffusionIntensiveQuantities = Opm::BlackOilDiffusionIntensiveQuantities<TypeTag, enableDiffusion>;
|
||||
using FluidState = BlackOilFluidState<Evaluation, FluidSystem, enableTemperature, enableEnergy, compositionSwitchEnabled, enableBrine, Indices::numPhases >;
|
||||
using DiffusionIntensiveQuantities = BlackOilDiffusionIntensiveQuantities<TypeTag, enableDiffusion>;
|
||||
|
||||
public:
|
||||
BlackOilIntensiveQuantities()
|
||||
@@ -168,8 +168,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Opm::Valgrind::CheckDefined(Sg);
|
||||
Opm::Valgrind::CheckDefined(Sw);
|
||||
Valgrind::CheckDefined(Sg);
|
||||
Valgrind::CheckDefined(Sw);
|
||||
|
||||
Evaluation So = 1.0 - Sw - Sg;
|
||||
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
// calculate relative permeabilities. note that we store the result into the
|
||||
// mobility_ class attribute. the division by the phase viscosity happens later.
|
||||
MaterialLaw::relativePermeabilities(mobility_, materialParams, fluidState_);
|
||||
Opm::Valgrind::CheckDefined(mobility_);
|
||||
Valgrind::CheckDefined(mobility_);
|
||||
|
||||
// update the Saturation functions for the blackoil solvent module.
|
||||
asImp_().solventPostSatFuncUpdate_(elemCtx, dofIdx, timeIdx);
|
||||
@@ -221,8 +221,8 @@ public:
|
||||
|
||||
Evaluation SoMax = 0.0;
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
|
||||
SoMax = Opm::max(fluidState_.saturation(oilPhaseIdx),
|
||||
elemCtx.problem().maxOilSaturation(globalSpaceIdx));
|
||||
SoMax = max(fluidState_.saturation(oilPhaseIdx),
|
||||
elemCtx.problem().maxOilSaturation(globalSpaceIdx));
|
||||
}
|
||||
|
||||
// take the meaning of the switiching primary variable into account for the gas
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
oilPhaseIdx,
|
||||
pvtRegionIdx,
|
||||
SoMax);
|
||||
fluidState_.setRs(Opm::min(RsMax, RsSat));
|
||||
fluidState_.setRs(min(RsMax, RsSat));
|
||||
}
|
||||
else if (compositionSwitchEnabled)
|
||||
fluidState_.setRs(0.0);
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
gasPhaseIdx,
|
||||
pvtRegionIdx,
|
||||
SoMax);
|
||||
fluidState_.setRv(Opm::min(RvMax, RvSat));
|
||||
fluidState_.setRv(min(RvMax, RvSat));
|
||||
}
|
||||
else if (compositionSwitchEnabled)
|
||||
fluidState_.setRv(0.0);
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
|
||||
// oil phase, we can directly set the composition of the oil phase
|
||||
const auto& Rs = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx);
|
||||
fluidState_.setRs(Opm::min(RsMax, Rs));
|
||||
fluidState_.setRs(min(RsMax, Rs));
|
||||
|
||||
if (FluidSystem::enableVaporizedOil()) {
|
||||
// the gas phase is not present, but we need to compute its "composition"
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
pvtRegionIdx,
|
||||
SoMax);
|
||||
|
||||
fluidState_.setRv(Opm::min(RvMax, RvSat));
|
||||
fluidState_.setRv(min(RvMax, RvSat));
|
||||
}
|
||||
else
|
||||
fluidState_.setRv(0.0);
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
pvtRegionIdx,
|
||||
SoMax);
|
||||
|
||||
fluidState_.setRs(Opm::min(RsMax, RsSat));
|
||||
fluidState_.setRs(min(RsMax, RsSat));
|
||||
} else {
|
||||
fluidState_.setRs(0.0);
|
||||
}
|
||||
@@ -322,7 +322,7 @@ public:
|
||||
else
|
||||
mobility_[phaseIdx] /= mu;
|
||||
}
|
||||
Opm::Valgrind::CheckDefined(mobility_);
|
||||
Valgrind::CheckDefined(mobility_);
|
||||
|
||||
// calculate the phase densities
|
||||
Evaluation rho;
|
||||
@@ -398,14 +398,14 @@ public:
|
||||
if (!FluidSystem::phaseIsActive(phaseIdx))
|
||||
continue;
|
||||
|
||||
assert(Opm::isfinite(fluidState_.density(phaseIdx)));
|
||||
assert(Opm::isfinite(fluidState_.saturation(phaseIdx)));
|
||||
assert(Opm::isfinite(fluidState_.temperature(phaseIdx)));
|
||||
assert(Opm::isfinite(fluidState_.pressure(phaseIdx)));
|
||||
assert(Opm::isfinite(fluidState_.invB(phaseIdx)));
|
||||
assert(isfinite(fluidState_.density(phaseIdx)));
|
||||
assert(isfinite(fluidState_.saturation(phaseIdx)));
|
||||
assert(isfinite(fluidState_.temperature(phaseIdx)));
|
||||
assert(isfinite(fluidState_.pressure(phaseIdx)));
|
||||
assert(isfinite(fluidState_.invB(phaseIdx)));
|
||||
}
|
||||
assert(Opm::isfinite(fluidState_.Rs()));
|
||||
assert(Opm::isfinite(fluidState_.Rv()));
|
||||
assert(isfinite(fluidState_.Rs()));
|
||||
assert(isfinite(fluidState_.Rv()));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -80,14 +80,14 @@ class BlackOilLocalResidual : public GetPropType<TypeTag, Properties::DiscLocalR
|
||||
static constexpr bool enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>();
|
||||
static constexpr bool enableDiffusion = getPropValue<TypeTag, Properties::EnableDiffusion>();
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
using SolventModule = BlackOilSolventModule<TypeTag>;
|
||||
using ExtboModule = BlackOilExtboModule<TypeTag>;
|
||||
using PolymerModule = BlackOilPolymerModule<TypeTag>;
|
||||
using EnergyModule = BlackOilEnergyModule<TypeTag>;
|
||||
using FoamModule = BlackOilFoamModule<TypeTag>;
|
||||
using BrineModule = BlackOilBrineModule<TypeTag>;
|
||||
using DiffusionModule = Opm::BlackOilDiffusionModule<TypeTag, enableDiffusion>;
|
||||
using DiffusionModule = BlackOilDiffusionModule<TypeTag, enableDiffusion>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
if (Indices::numPhases == 3) { // add trivial equation for the pseudo phase
|
||||
unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
|
||||
if (timeIdx == 0)
|
||||
storage[conti0EqIdx + activeCompIdx] = Opm::variable<LhsEval>(0.0, conti0EqIdx + activeCompIdx);
|
||||
storage[conti0EqIdx + activeCompIdx] = variable<LhsEval>(0.0, conti0EqIdx + activeCompIdx);
|
||||
else
|
||||
storage[conti0EqIdx + activeCompIdx] = 0.0;
|
||||
}
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
const ExtensiveQuantities& extQuants,
|
||||
const FluidState& upFs)
|
||||
{
|
||||
const auto& invB = Opm::getInvB_<FluidSystem, FluidState, UpEval>(upFs, phaseIdx, pvtRegionIdx);
|
||||
const auto& invB = getInvB_<FluidSystem, FluidState, UpEval>(upFs, phaseIdx, pvtRegionIdx);
|
||||
const auto& surfaceVolumeFlux = invB*extQuants.volumeFlux(phaseIdx);
|
||||
unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
|
||||
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
if (phaseIdx == oilPhaseIdx) {
|
||||
// dissolved gas (in the oil phase).
|
||||
if (FluidSystem::enableDissolvedGas()) {
|
||||
const auto& Rs = Opm::BlackOil::getRs_<FluidSystem, FluidState, UpEval>(upFs, pvtRegionIdx);
|
||||
const auto& Rs = BlackOil::getRs_<FluidSystem, FluidState, UpEval>(upFs, pvtRegionIdx);
|
||||
|
||||
unsigned activeGasCompIdx = Indices::canonicalToActiveComponentIndex(gasCompIdx);
|
||||
if (blackoilConserveSurfaceVolume)
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
else if (phaseIdx == gasPhaseIdx) {
|
||||
// vaporized oil (in the gas phase).
|
||||
if (FluidSystem::enableVaporizedOil()) {
|
||||
const auto& Rv = Opm::BlackOil::getRv_<FluidSystem, FluidState, UpEval>(upFs, pvtRegionIdx);
|
||||
const auto& Rv = BlackOil::getRv_<FluidSystem, FluidState, UpEval>(upFs, pvtRegionIdx);
|
||||
|
||||
unsigned activeOilCompIdx = Indices::canonicalToActiveComponentIndex(oilCompIdx);
|
||||
if (blackoilConserveSurfaceVolume)
|
||||
|
||||
@@ -83,55 +83,55 @@ struct BlackOilModel { using InheritsFrom = std::tuple<VtkComposition,
|
||||
|
||||
//! Set the local residual function
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilLocalResidual<TypeTag>; };
|
||||
struct LocalResidual<TypeTag, TTag::BlackOilModel> { using type = BlackOilLocalResidual<TypeTag>; };
|
||||
|
||||
//! Use the black-oil specific newton method
|
||||
template<class TypeTag>
|
||||
struct NewtonMethod<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilNewtonMethod<TypeTag>; };
|
||||
struct NewtonMethod<TypeTag, TTag::BlackOilModel> { using type = BlackOilNewtonMethod<TypeTag>; };
|
||||
|
||||
//! The Model property
|
||||
template<class TypeTag>
|
||||
struct Model<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilModel<TypeTag>; };
|
||||
struct Model<TypeTag, TTag::BlackOilModel> { using type = BlackOilModel<TypeTag>; };
|
||||
|
||||
//! The Problem property
|
||||
template<class TypeTag>
|
||||
struct BaseProblem<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilProblem<TypeTag>; };
|
||||
struct BaseProblem<TypeTag, TTag::BlackOilModel> { using type = BlackOilProblem<TypeTag>; };
|
||||
|
||||
//! the RateVector property
|
||||
template<class TypeTag>
|
||||
struct RateVector<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilRateVector<TypeTag>; };
|
||||
struct RateVector<TypeTag, TTag::BlackOilModel> { using type = BlackOilRateVector<TypeTag>; };
|
||||
|
||||
//! the BoundaryRateVector property
|
||||
template<class TypeTag>
|
||||
struct BoundaryRateVector<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilBoundaryRateVector<TypeTag>; };
|
||||
struct BoundaryRateVector<TypeTag, TTag::BlackOilModel> { using type = BlackOilBoundaryRateVector<TypeTag>; };
|
||||
|
||||
//! the PrimaryVariables property
|
||||
template<class TypeTag>
|
||||
struct PrimaryVariables<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilPrimaryVariables<TypeTag>; };
|
||||
struct PrimaryVariables<TypeTag, TTag::BlackOilModel> { using type = BlackOilPrimaryVariables<TypeTag>; };
|
||||
|
||||
//! the IntensiveQuantities property
|
||||
template<class TypeTag>
|
||||
struct IntensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilIntensiveQuantities<TypeTag>; };
|
||||
struct IntensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = BlackOilIntensiveQuantities<TypeTag>; };
|
||||
|
||||
//! the ExtensiveQuantities property
|
||||
template<class TypeTag>
|
||||
struct ExtensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilExtensiveQuantities<TypeTag>; };
|
||||
struct ExtensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = BlackOilExtensiveQuantities<TypeTag>; };
|
||||
|
||||
//! Use the the velocity module which is aware of the black-oil specific model extensions
|
||||
//! (i.e., the polymer and solvent extensions)
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilDarcyFluxModule<TypeTag>; };
|
||||
struct FluxModule<TypeTag, TTag::BlackOilModel> { using type = BlackOilDarcyFluxModule<TypeTag>; };
|
||||
|
||||
//! The indices required by the model
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::BlackOilModel>
|
||||
{ using type = Opm::BlackOilIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnableExtbo>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0>; };
|
||||
{ using type = BlackOilIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnableExtbo>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0>; };
|
||||
|
||||
//! Set the fluid system to the black-oil fluid system by default
|
||||
template<class TypeTag>
|
||||
@@ -142,7 +142,7 @@ private:
|
||||
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
|
||||
|
||||
public:
|
||||
using type = Opm::BlackOilFluidSystem<Scalar>;
|
||||
using type = BlackOilFluidSystem<Scalar>;
|
||||
};
|
||||
|
||||
// by default, all ECL extension modules are disabled
|
||||
@@ -286,7 +286,7 @@ class BlackOilModel
|
||||
using ExtboModule = BlackOilExtboModule<TypeTag>;
|
||||
using PolymerModule = BlackOilPolymerModule<TypeTag>;
|
||||
using EnergyModule = BlackOilEnergyModule<TypeTag>;
|
||||
using DiffusionModule = Opm::BlackOilDiffusionModule<TypeTag, enableDiffusion>;
|
||||
using DiffusionModule = BlackOilDiffusionModule<TypeTag, enableDiffusion>;
|
||||
|
||||
public:
|
||||
BlackOilModel(Simulator& simulator)
|
||||
@@ -307,11 +307,11 @@ public:
|
||||
DiffusionModule::registerParameters();
|
||||
|
||||
// register runtime parameters of the VTK output modules
|
||||
Opm::VtkBlackOilModule<TypeTag>::registerParameters();
|
||||
Opm::VtkCompositionModule<TypeTag>::registerParameters();
|
||||
VtkBlackOilModule<TypeTag>::registerParameters();
|
||||
VtkCompositionModule<TypeTag>::registerParameters();
|
||||
|
||||
if (enableDiffusion)
|
||||
Opm::VtkDiffusionModule<TypeTag>::registerParameters();
|
||||
VtkDiffusionModule<TypeTag>::registerParameters();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -596,11 +596,11 @@ protected:
|
||||
PolymerModule::registerOutputModules(*this, this->simulator_);
|
||||
EnergyModule::registerOutputModules(*this, this->simulator_);
|
||||
|
||||
this->addOutputModule(new Opm::VtkBlackOilModule<TypeTag>(this->simulator_));
|
||||
this->addOutputModule(new Opm::VtkCompositionModule<TypeTag>(this->simulator_));
|
||||
this->addOutputModule(new VtkBlackOilModule<TypeTag>(this->simulator_));
|
||||
this->addOutputModule(new VtkCompositionModule<TypeTag>(this->simulator_));
|
||||
|
||||
if (enableDiffusion)
|
||||
this->addOutputModule(new Opm::VtkDiffusionModule<TypeTag>(this->simulator_));
|
||||
this->addOutputModule(new VtkDiffusionModule<TypeTag>(this->simulator_));
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
succeeded = comm.min(succeeded);
|
||||
|
||||
if (!succeeded)
|
||||
throw Opm::NumericalIssue("A process did not succeed in adapting the primary variables");
|
||||
throw NumericalIssue("A process did not succeed in adapting the primary variables");
|
||||
|
||||
numPriVarsSwitched_ = comm.sum(numPriVarsSwitched_);
|
||||
}
|
||||
@@ -249,8 +249,8 @@ protected:
|
||||
static constexpr bool enableBrine = Indices::saltConcentrationIdx >= 0;
|
||||
|
||||
currentValue.checkDefined();
|
||||
Opm::Valgrind::CheckDefined(update);
|
||||
Opm::Valgrind::CheckDefined(currentResidual);
|
||||
Valgrind::CheckDefined(update);
|
||||
Valgrind::CheckDefined(currentResidual);
|
||||
|
||||
// saturation delta for each phase
|
||||
Scalar deltaSw = 0.0;
|
||||
@@ -296,7 +296,7 @@ protected:
|
||||
// limit pressure delta
|
||||
if (pvIdx == Indices::pressureSwitchIdx) {
|
||||
if (std::abs(delta) > dpMaxRel_*currentValue[pvIdx])
|
||||
delta = Opm::signum(delta)*dpMaxRel_*currentValue[pvIdx];
|
||||
delta = signum(delta)*dpMaxRel_*currentValue[pvIdx];
|
||||
}
|
||||
// water saturation delta
|
||||
else if (pvIdx == Indices::waterSaturationIdx)
|
||||
|
||||
@@ -75,10 +75,10 @@ class BlackOilPolymerModule
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
|
||||
using TabulatedTwoDFunction = typename Opm::IntervalTabulated2DFunction<Scalar>;
|
||||
using TabulatedFunction = Tabulated1DFunction<Scalar>;
|
||||
using TabulatedTwoDFunction = IntervalTabulated2DFunction<Scalar>;
|
||||
|
||||
static constexpr unsigned polymerConcentrationIdx = Indices::polymerConcentrationIdx;
|
||||
static constexpr unsigned polymerMoleWeightIdx = Indices::polymerMoleWeightIdx;
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
/*!
|
||||
* \brief Initialize all internal data structures needed by the polymer module
|
||||
*/
|
||||
static void initFromState(const Opm::EclipseState& eclState)
|
||||
static void initFromState(const EclipseState& eclState)
|
||||
{
|
||||
// some sanity checks: if polymers are enabled, the POLYMER keyword must be
|
||||
// present, if polymers are disabled the keyword must not be present.
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
if (!plyrockTables.empty()) {
|
||||
assert(numSatRegions == plyrockTables.size());
|
||||
for (unsigned satRegionIdx = 0; satRegionIdx < numSatRegions; ++ satRegionIdx) {
|
||||
const auto& plyrockTable = plyrockTables.template getTable<Opm::PlyrockTable>(satRegionIdx);
|
||||
const auto& plyrockTable = plyrockTables.template getTable<PlyrockTable>(satRegionIdx);
|
||||
setPlyrock(satRegionIdx,
|
||||
plyrockTable.getDeadPoreVolumeColumn()[0],
|
||||
plyrockTable.getResidualResistanceFactorColumn()[0],
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
if (!plyadsTables.empty()) {
|
||||
assert(numSatRegions == plyadsTables.size());
|
||||
for (unsigned satRegionIdx = 0; satRegionIdx < numSatRegions; ++ satRegionIdx) {
|
||||
const auto& plyadsTable = plyadsTables.template getTable<Opm::PlyadsTable>(satRegionIdx);
|
||||
const auto& plyadsTable = plyadsTables.template getTable<PlyadsTable>(satRegionIdx);
|
||||
// Copy data
|
||||
const auto& c = plyadsTable.getPolymerConcentrationColumn();
|
||||
const auto& ads = plyadsTable.getAdsorbedPolymerColumn();
|
||||
@@ -193,14 +193,14 @@ public:
|
||||
if (!plyviscTables.empty()) {
|
||||
// different viscosity model is used for POLYMW
|
||||
if (enablePolymerMolarWeight) {
|
||||
Opm::OpmLog::warning("PLYVISC should not be used in POLYMW runs, "
|
||||
OpmLog::warning("PLYVISC should not be used in POLYMW runs, "
|
||||
"it will have no effect. A viscosity model based on PLYVMH is used instead.\n");
|
||||
}
|
||||
else {
|
||||
|
||||
assert(numPvtRegions == plyviscTables.size());
|
||||
for (unsigned pvtRegionIdx = 0; pvtRegionIdx < numPvtRegions; ++ pvtRegionIdx) {
|
||||
const auto& plyadsTable = plyviscTables.template getTable<Opm::PlyviscTable>(pvtRegionIdx);
|
||||
const auto& plyadsTable = plyviscTables.template getTable<PlyviscTable>(pvtRegionIdx);
|
||||
// Copy data
|
||||
const auto& c = plyadsTable.getPolymerConcentrationColumn();
|
||||
const auto& visc = plyadsTable.getViscosityMultiplierColumn();
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
setNumMixRegions(numMixRegions);
|
||||
if (!plymaxTables.empty()) {
|
||||
for (unsigned mixRegionIdx = 0; mixRegionIdx < numMixRegions; ++ mixRegionIdx) {
|
||||
const auto& plymaxTable = plymaxTables.template getTable<Opm::PlymaxTable>(mixRegionIdx);
|
||||
const auto& plymaxTable = plymaxTables.template getTable<PlymaxTable>(mixRegionIdx);
|
||||
setPlymax(mixRegionIdx, plymaxTable.getPolymerConcentrationColumn()[0]);
|
||||
}
|
||||
}
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
|
||||
if (!eclState.getTableManager().getPlmixparTable().empty()) {
|
||||
if (enablePolymerMolarWeight) {
|
||||
Opm::OpmLog::warning("PLMIXPAR should not be used in POLYMW runs, it will have no effect.\n");
|
||||
OpmLog::warning("PLMIXPAR should not be used in POLYMW runs, it will have no effect.\n");
|
||||
}
|
||||
else {
|
||||
const auto& plmixparTable = eclState.getTableManager().getPlmixparTable();
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
hasShrate_ = eclState.getTableManager().useShrate();
|
||||
|
||||
if ((hasPlyshlog_ || hasShrate_) && enablePolymerMolarWeight) {
|
||||
Opm::OpmLog::warning("PLYSHLOG and SHRATE should not be used in POLYMW runs, they will have no effect.\n");
|
||||
OpmLog::warning("PLYSHLOG and SHRATE should not be used in POLYMW runs, they will have no effect.\n");
|
||||
}
|
||||
|
||||
if (hasPlyshlog_ && !enablePolymerMolarWeight) {
|
||||
@@ -255,14 +255,14 @@ public:
|
||||
plyshlogShearEffectRefMultiplier_.resize(numPvtRegions);
|
||||
plyshlogShearEffectRefLogVelocity_.resize(numPvtRegions);
|
||||
for (unsigned pvtRegionIdx = 0; pvtRegionIdx < numPvtRegions; ++ pvtRegionIdx) {
|
||||
const auto& plyshlogTable = plyshlogTables.template getTable<Opm::PlyshlogTable>(pvtRegionIdx);
|
||||
const auto& plyshlogTable = plyshlogTables.template getTable<PlyshlogTable>(pvtRegionIdx);
|
||||
|
||||
Scalar plyshlogRefPolymerConcentration = plyshlogTable.getRefPolymerConcentration();
|
||||
auto waterVelocity = plyshlogTable.getWaterVelocityColumn().vectorCopy();
|
||||
auto shearMultiplier = plyshlogTable.getShearMultiplierColumn().vectorCopy();
|
||||
|
||||
// do the unit version here for the waterVelocity
|
||||
Opm::UnitSystem unitSystem = eclState.getDeckUnitSystem();
|
||||
UnitSystem unitSystem = eclState.getDeckUnitSystem();
|
||||
double siFactor = hasShrate_? unitSystem.parse("1/Time").getSIScaling() : unitSystem.parse("Length/Time").getSIScaling();
|
||||
for (size_t i = 0; i < waterVelocity.size(); ++i) {
|
||||
waterVelocity[i] *= siFactor;
|
||||
@@ -507,7 +507,7 @@ public:
|
||||
// polymers have been disabled at compile time
|
||||
return;
|
||||
|
||||
Opm::VtkBlackOilPolymerModule<TypeTag>::registerParameters();
|
||||
VtkBlackOilPolymerModule<TypeTag>::registerParameters();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -520,7 +520,7 @@ public:
|
||||
// polymers have been disabled at compile time
|
||||
return;
|
||||
|
||||
model.addOutputModule(new Opm::VtkBlackOilPolymerModule<TypeTag>(simulator));
|
||||
model.addOutputModule(new VtkBlackOilPolymerModule<TypeTag>(simulator));
|
||||
}
|
||||
|
||||
static bool primaryVarApplies(unsigned pvIdx)
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
* Toolbox::template decay<LhsEval>(intQuants.porosity());
|
||||
|
||||
// avoid singular matrix if no water is present.
|
||||
surfaceVolumeWater = Opm::max(surfaceVolumeWater, 1e-10);
|
||||
surfaceVolumeWater = max(surfaceVolumeWater, 1e-10);
|
||||
|
||||
// polymer in water phase
|
||||
const LhsEval massPolymer = surfaceVolumeWater
|
||||
@@ -621,7 +621,7 @@ public:
|
||||
|
||||
// tracking the polymer molecular weight
|
||||
if (enablePolymerMolarWeight) {
|
||||
accumulationPolymer = Opm::max(accumulationPolymer, 1e-10);
|
||||
accumulationPolymer = max(accumulationPolymer, 1e-10);
|
||||
|
||||
storage[contiPolymerMolarWeightEqIdx] += accumulationPolymer
|
||||
* Toolbox::template decay<LhsEval> (intQuants.polymerMoleWeight());
|
||||
@@ -660,14 +660,14 @@ public:
|
||||
else {
|
||||
flux[contiPolymerEqIdx] =
|
||||
extQuants.volumeFlux(waterPhaseIdx)
|
||||
*Opm::decay<Scalar>(up.fluidState().invB(waterPhaseIdx))
|
||||
*Opm::decay<Scalar>(up.polymerViscosityCorrection())
|
||||
/Opm::decay<Scalar>(extQuants.polymerShearFactor())
|
||||
*Opm::decay<Scalar>(up.polymerConcentration());
|
||||
*decay<Scalar>(up.fluidState().invB(waterPhaseIdx))
|
||||
*decay<Scalar>(up.polymerViscosityCorrection())
|
||||
/decay<Scalar>(extQuants.polymerShearFactor())
|
||||
*decay<Scalar>(up.polymerConcentration());
|
||||
|
||||
// modify water
|
||||
flux[contiWaterEqIdx] /=
|
||||
Opm::decay<Scalar>(extQuants.waterShearFactor());
|
||||
decay<Scalar>(extQuants.waterShearFactor());
|
||||
}
|
||||
|
||||
// flux related to transport of polymer molecular weight
|
||||
@@ -677,7 +677,7 @@ public:
|
||||
flux[contiPolymerEqIdx]*up.polymerMoleWeight();
|
||||
else
|
||||
flux[contiPolymerMolarWeightEqIdx] =
|
||||
flux[contiPolymerEqIdx]*Opm::decay<Scalar>(up.polymerMoleWeight());
|
||||
flux[contiPolymerEqIdx]*decay<Scalar>(up.polymerMoleWeight());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -835,10 +835,10 @@ public:
|
||||
unsigned pvtnumRegionIdx,
|
||||
const Evaluation& v0)
|
||||
{
|
||||
using ToolboxLocal = Opm::MathToolbox<Evaluation>;
|
||||
using ToolboxLocal = MathToolbox<Evaluation>;
|
||||
|
||||
const auto& viscosityMultiplierTable = plyviscViscosityMultiplierTable_[pvtnumRegionIdx];
|
||||
Scalar viscosityMultiplier = viscosityMultiplierTable.eval(Opm::scalarValue(polymerConcentration), /*extrapolate=*/true);
|
||||
Scalar viscosityMultiplier = viscosityMultiplierTable.eval(scalarValue(polymerConcentration), /*extrapolate=*/true);
|
||||
|
||||
const Scalar eps = 1e-14;
|
||||
// return 1.0 if the polymer has no effect on the water.
|
||||
@@ -846,7 +846,7 @@ public:
|
||||
return ToolboxLocal::createConstant(v0, 1.0);
|
||||
|
||||
const std::vector<Scalar>& shearEffectRefLogVelocity = plyshlogShearEffectRefLogVelocity_[pvtnumRegionIdx];
|
||||
auto v0AbsLog = Opm::log(Opm::abs(v0));
|
||||
auto v0AbsLog = log(abs(v0));
|
||||
// return 1.0 if the velocity /sharte is smaller than the first velocity entry.
|
||||
if (v0AbsLog < shearEffectRefLogVelocity[0])
|
||||
return ToolboxLocal::createConstant(v0, 1.0);
|
||||
@@ -862,7 +862,7 @@ public:
|
||||
std::vector<Scalar> shearEffectMultiplier(numTableEntries, 1.0);
|
||||
for (size_t i = 0; i < numTableEntries; ++i) {
|
||||
shearEffectMultiplier[i] = (1.0 + (viscosityMultiplier - 1.0)*shearEffectRefMultiplier[i]) / viscosityMultiplier;
|
||||
shearEffectMultiplier[i] = Opm::log(shearEffectMultiplier[i]);
|
||||
shearEffectMultiplier[i] = log(shearEffectMultiplier[i]);
|
||||
}
|
||||
// store the logarithmic velocity and logarithmic multipliers in a table for easy look up and
|
||||
// linear interpolation in the logarithmic space.
|
||||
@@ -890,7 +890,7 @@ public:
|
||||
auto f = F(u);
|
||||
auto df = dF(u);
|
||||
u -= f/df;
|
||||
if (std::abs(Opm::scalarValue(f)) < 1e-12) {
|
||||
if (std::abs(scalarValue(f)) < 1e-12) {
|
||||
converged = true;
|
||||
break;
|
||||
}
|
||||
@@ -900,7 +900,7 @@ public:
|
||||
}
|
||||
|
||||
// return the shear factor
|
||||
return Opm::exp(logShearEffectMultiplier.eval(u, /*extrapolate=*/true));
|
||||
return exp(logShearEffectMultiplier.eval(u, /*extrapolate=*/true));
|
||||
|
||||
}
|
||||
|
||||
@@ -1214,7 +1214,7 @@ class BlackOilPolymerExtensiveQuantities
|
||||
static constexpr int dimWorld = GridView::dimensionworld;
|
||||
static constexpr unsigned waterPhaseIdx = FluidSystem::waterPhaseIdx;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
using PolymerModule = BlackOilPolymerModule<TypeTag>;
|
||||
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
|
||||
using DimEvalVector = Dune::FieldVector<Evaluation, dimWorld>;
|
||||
@@ -1274,7 +1274,7 @@ public:
|
||||
const Scalar& Swcr = scaledDrainageInfo.Swcr;
|
||||
|
||||
// guard against zero porosity and no mobile water
|
||||
Evaluation denom = Opm::max(poroAvg * (Sw - Swcr), 1e-12);
|
||||
Evaluation denom = max(poroAvg * (Sw - Swcr), 1e-12);
|
||||
Evaluation waterVolumeVelocity = extQuants.volumeFlux(waterPhaseIdx) / denom;
|
||||
|
||||
// if shrate is specified. Compute shrate based on the water velocity
|
||||
@@ -1287,8 +1287,8 @@ public:
|
||||
// compute permeability from transmissibility.
|
||||
Scalar absPerm = trans / faceArea * dist.two_norm();
|
||||
waterVolumeVelocity *=
|
||||
PolymerModule::shrate(pvtnumRegionIdx)*Opm::sqrt(poroAvg*Sw / (relWater*absPerm));
|
||||
assert(Opm::isfinite(waterVolumeVelocity));
|
||||
PolymerModule::shrate(pvtnumRegionIdx)*sqrt(poroAvg*Sw / (relWater*absPerm));
|
||||
assert(isfinite(waterVolumeVelocity));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ class BlackOilPrimaryVariables : public FvBasePrimaryVariables<TypeTag>
|
||||
enum { waterCompIdx = FluidSystem::waterCompIdx };
|
||||
enum { oilCompIdx = FluidSystem::oilCompIdx };
|
||||
|
||||
using Toolbox = typename Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
using ComponentVector = Dune::FieldVector<Scalar, numComponents>;
|
||||
using SolventModule = BlackOilSolventModule<TypeTag, enableSolvent>;
|
||||
using ExtboModule = BlackOilExtboModule<TypeTag, enableExtbo>;
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
BlackOilPrimaryVariables()
|
||||
: ParentType()
|
||||
{
|
||||
Opm::Valgrind::SetUndefined(*this);
|
||||
Valgrind::SetUndefined(*this);
|
||||
pvtRegionIdx_ = 0;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
BlackOilPrimaryVariables(Scalar value)
|
||||
: ParentType(value)
|
||||
{
|
||||
Opm::Valgrind::SetUndefined(primaryVarsMeaning_);
|
||||
Valgrind::SetUndefined(primaryVarsMeaning_);
|
||||
pvtRegionIdx_ = 0;
|
||||
}
|
||||
|
||||
@@ -190,13 +190,13 @@ public:
|
||||
{
|
||||
using ConstEvaluation = typename std::remove_reference<typename FluidState::Scalar>::type;
|
||||
using FsEvaluation = typename std::remove_const<ConstEvaluation>::type;
|
||||
using FsToolbox = typename Opm::MathToolbox<FsEvaluation>;
|
||||
using FsToolbox = MathToolbox<FsEvaluation>;
|
||||
|
||||
#ifndef NDEBUG
|
||||
// make sure the temperature is the same in all fluid phases
|
||||
for (unsigned phaseIdx = 1; phaseIdx < numPhases; ++phaseIdx) {
|
||||
Opm::Valgrind::CheckDefined(fluidState.temperature(0));
|
||||
Opm::Valgrind::CheckDefined(fluidState.temperature(phaseIdx));
|
||||
Valgrind::CheckDefined(fluidState.temperature(0));
|
||||
Valgrind::CheckDefined(fluidState.temperature(phaseIdx));
|
||||
|
||||
assert(fluidState.temperature(0) == fluidState.temperature(phaseIdx));
|
||||
}
|
||||
@@ -216,8 +216,8 @@ public:
|
||||
paramCache.setMaxOilSat(FsToolbox::value(fluidState.saturation(oilPhaseIdx)));
|
||||
|
||||
// create a mutable fluid state with well defined densities based on the input
|
||||
using NcpFlash = Opm::NcpFlash<Scalar, FluidSystem>;
|
||||
using FlashFluidState = Opm::CompositionalFluidState<Scalar, FluidSystem>;
|
||||
using NcpFlash = NcpFlash<Scalar, FluidSystem>;
|
||||
using FlashFluidState = CompositionalFluidState<Scalar, FluidSystem>;
|
||||
FlashFluidState fsFlash;
|
||||
fsFlash.setTemperature(FsToolbox::value(fluidState.temperature(/*phaseIdx=*/0)));
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
{
|
||||
using ConstEvaluation = typename std::remove_reference<typename FluidState::Scalar>::type;
|
||||
using FsEvaluation = typename std::remove_const<ConstEvaluation>::type;
|
||||
using FsToolbox = typename Opm::MathToolbox<FsEvaluation>;
|
||||
using FsToolbox = MathToolbox<FsEvaluation>;
|
||||
|
||||
bool gasPresent = FluidSystem::phaseIsActive(gasPhaseIdx)?(fluidState.saturation(gasPhaseIdx) > 0.0):false;
|
||||
bool oilPresent = FluidSystem::phaseIsActive(oilPhaseIdx)?(fluidState.saturation(oilPhaseIdx) > 0.0):false;
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
(*this)[compositionSwitchIdx] = FsToolbox::value(fluidState.saturation(gasPhaseIdx));
|
||||
}
|
||||
else if (primaryVarsMeaning() == Sw_po_Rs) {
|
||||
const auto& Rs = Opm::BlackOil::getRs_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
|
||||
const auto& Rs = BlackOil::getRs_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
|
||||
|
||||
if (waterEnabled)
|
||||
(*this)[waterSaturationIdx] = FsToolbox::value(fluidState.saturation(waterPhaseIdx));
|
||||
@@ -331,7 +331,7 @@ public:
|
||||
else {
|
||||
assert(primaryVarsMeaning() == Sw_pg_Rv);
|
||||
|
||||
const auto& Rv = Opm::BlackOil::getRv_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
|
||||
const auto& Rv = BlackOil::getRv_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
|
||||
if (waterEnabled)
|
||||
(*this)[waterSaturationIdx] = FsToolbox::value(fluidState.saturation(waterPhaseIdx));
|
||||
|
||||
@@ -678,11 +678,11 @@ public:
|
||||
#ifndef NDEBUG
|
||||
// check the "real" primary variables
|
||||
for (unsigned i = 0; i < this->size(); ++i)
|
||||
Opm::Valgrind::CheckDefined((*this)[i]);
|
||||
Valgrind::CheckDefined((*this)[i]);
|
||||
|
||||
// check the "pseudo" primary variables
|
||||
Opm::Valgrind::CheckDefined(primaryVarsMeaning_);
|
||||
Opm::Valgrind::CheckDefined(pvtRegionIdx_);
|
||||
Valgrind::CheckDefined(primaryVarsMeaning_);
|
||||
Valgrind::CheckDefined(pvtRegionIdx_);
|
||||
#endif // NDEBUG
|
||||
}
|
||||
|
||||
@@ -748,18 +748,18 @@ private:
|
||||
Scalar Sw,
|
||||
const MaterialLawParams& matParams) const
|
||||
{
|
||||
using SatOnlyFluidState = Opm::SimpleModularFluidState<Scalar,
|
||||
numPhases,
|
||||
numComponents,
|
||||
FluidSystem,
|
||||
/*storePressure=*/false,
|
||||
/*storeTemperature=*/false,
|
||||
/*storeComposition=*/false,
|
||||
/*storeFugacity=*/false,
|
||||
/*storeSaturation=*/true,
|
||||
/*storeDensity=*/false,
|
||||
/*storeViscosity=*/false,
|
||||
/*storeEnthalpy=*/false>;
|
||||
using SatOnlyFluidState = SimpleModularFluidState<Scalar,
|
||||
numPhases,
|
||||
numComponents,
|
||||
FluidSystem,
|
||||
/*storePressure=*/false,
|
||||
/*storeTemperature=*/false,
|
||||
/*storeComposition=*/false,
|
||||
/*storeFugacity=*/false,
|
||||
/*storeSaturation=*/true,
|
||||
/*storeDensity=*/false,
|
||||
/*storeViscosity=*/false,
|
||||
/*storeEnthalpy=*/false>;
|
||||
SatOnlyFluidState fluidState;
|
||||
fluidState.setSaturation(waterPhaseIdx, Sw);
|
||||
fluidState.setSaturation(oilPhaseIdx, So);
|
||||
|
||||
@@ -71,12 +71,12 @@ class BlackOilRateVector
|
||||
enum { enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>() };
|
||||
enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
|
||||
enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
using ParentType = Dune::FieldVector<Evaluation, numEq>;
|
||||
|
||||
public:
|
||||
BlackOilRateVector() : ParentType()
|
||||
{ Opm::Valgrind::SetUndefined(*this); }
|
||||
{ Valgrind::SetUndefined(*this); }
|
||||
|
||||
/*!
|
||||
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)
|
||||
|
||||
@@ -78,10 +78,10 @@ class BlackOilSolventModule
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using SolventPvt = Opm::SolventPvt<Scalar>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
using SolventPvt = ::Opm::SolventPvt<Scalar>;
|
||||
|
||||
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
|
||||
using TabulatedFunction = Tabulated1DFunction<Scalar>;
|
||||
|
||||
static constexpr unsigned solventSaturationIdx = Indices::solventSaturationIdx;
|
||||
static constexpr unsigned contiSolventEqIdx = Indices::contiSolventEqIdx;
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
/*!
|
||||
* \brief Initialize all internal data structures needed by the solvent module
|
||||
*/
|
||||
static void initFromState(const Opm::EclipseState& eclState, const Schedule& schedule)
|
||||
static void initFromState(const EclipseState& eclState, const Schedule& schedule)
|
||||
{
|
||||
// some sanity checks: if solvents are enabled, the SOLVENT keyword must be
|
||||
// present, if solvents are disabled the keyword must not be present.
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
unsigned numSatRegions = tableManager.getTabdims().getNumSatTables();
|
||||
setNumSatRegions(numSatRegions);
|
||||
for (unsigned satRegionIdx = 0; satRegionIdx < numSatRegions; ++ satRegionIdx) {
|
||||
const auto& ssfnTable = ssfnTables.template getTable<Opm::SsfnTable>(satRegionIdx);
|
||||
const auto& ssfnTable = ssfnTables.template getTable<SsfnTable>(satRegionIdx);
|
||||
ssfnKrg_[satRegionIdx].setXYContainers(ssfnTable.getSolventFractionColumn(),
|
||||
ssfnTable.getGasRelPermMultiplierColumn(),
|
||||
/*sortInput=*/true);
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
// resize the attributes of the object
|
||||
sof2Krn_.resize(numSatRegions);
|
||||
for (unsigned satRegionIdx = 0; satRegionIdx < numSatRegions; ++ satRegionIdx) {
|
||||
const auto& sof2Table = sof2Tables.template getTable<Opm::Sof2Table>(satRegionIdx);
|
||||
const auto& sof2Table = sof2Tables.template getTable<Sof2Table>(satRegionIdx);
|
||||
sof2Krn_[satRegionIdx].setXYContainers(sof2Table.getSoColumn(),
|
||||
sof2Table.getKroColumn(),
|
||||
/*sortInput=*/true);
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
// resize the attributes of the object
|
||||
misc_.resize(numMiscRegions);
|
||||
for (unsigned miscRegionIdx = 0; miscRegionIdx < numMiscRegions; ++miscRegionIdx) {
|
||||
const auto& miscTable = miscTables.template getTable<Opm::MiscTable>(miscRegionIdx);
|
||||
const auto& miscTable = miscTables.template getTable<MiscTable>(miscRegionIdx);
|
||||
|
||||
// solventFraction = Ss / (Ss + Sg);
|
||||
const auto& solventFraction = miscTable.getSolventFractionColumn();
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
assert(numMiscRegions == pmiscTables.size());
|
||||
|
||||
for (unsigned regionIdx = 0; regionIdx < numMiscRegions; ++regionIdx) {
|
||||
const auto& pmiscTable = pmiscTables.template getTable<Opm::PmiscTable>(regionIdx);
|
||||
const auto& pmiscTable = pmiscTables.template getTable<PmiscTable>(regionIdx);
|
||||
|
||||
// Copy data
|
||||
const auto& po = pmiscTable.getOilPhasePressureColumn();
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
|
||||
|
||||
for (unsigned regionIdx = 0; regionIdx < numSatRegions; ++regionIdx) {
|
||||
const Opm::MsfnTable& msfnTable = msfnTables.template getTable<Opm::MsfnTable>(regionIdx);
|
||||
const MsfnTable& msfnTable = msfnTables.template getTable<MsfnTable>(regionIdx);
|
||||
|
||||
// Copy data
|
||||
// Ssg = Ss + Sg;
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
assert(numMiscRegions == sorwmisTables.size());
|
||||
|
||||
for (unsigned regionIdx = 0; regionIdx < numMiscRegions; ++regionIdx) {
|
||||
const auto& sorwmisTable = sorwmisTables.template getTable<Opm::SorwmisTable>(regionIdx);
|
||||
const auto& sorwmisTable = sorwmisTables.template getTable<SorwmisTable>(regionIdx);
|
||||
|
||||
// Copy data
|
||||
const auto& sw = sorwmisTable.getWaterSaturationColumn();
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
assert(numMiscRegions ==sgcwmisTables.size());
|
||||
|
||||
for (unsigned regionIdx = 0; regionIdx < numMiscRegions; ++regionIdx) {
|
||||
const auto& sgcwmisTable = sgcwmisTables.template getTable<Opm::SgcwmisTable>(regionIdx);
|
||||
const auto& sgcwmisTable = sgcwmisTables.template getTable<SgcwmisTable>(regionIdx);
|
||||
|
||||
// Copy data
|
||||
const auto& sw = sgcwmisTable.getWaterSaturationColumn();
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
|
||||
assert(numMiscRegions == tlpmixparTables.size());
|
||||
for (unsigned regionIdx = 0; regionIdx < numMiscRegions; ++regionIdx) {
|
||||
const auto& tlpmixparTable = tlpmixparTables.template getTable<Opm::TlpmixpaTable>(regionIdx);
|
||||
const auto& tlpmixparTable = tlpmixparTables.template getTable<TlpmixpaTable>(regionIdx);
|
||||
|
||||
// Copy data
|
||||
const auto& po = tlpmixparTable.getOilPhasePressureColumn();
|
||||
@@ -475,7 +475,7 @@ public:
|
||||
// solvents have disabled at compile time
|
||||
return;
|
||||
|
||||
Opm::VtkBlackOilSolventModule<TypeTag>::registerParameters();
|
||||
VtkBlackOilSolventModule<TypeTag>::registerParameters();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
// solvents have disabled at compile time
|
||||
return;
|
||||
|
||||
model.addOutputModule(new Opm::VtkBlackOilSolventModule<TypeTag>(simulator));
|
||||
model.addOutputModule(new VtkBlackOilSolventModule<TypeTag>(simulator));
|
||||
}
|
||||
|
||||
static bool primaryVarApplies(unsigned pvIdx)
|
||||
@@ -582,7 +582,7 @@ public:
|
||||
else
|
||||
flux[contiSolventEqIdx] =
|
||||
extQuants.solventVolumeFlux()
|
||||
*Opm::decay<Scalar>(up.solventInverseFormationVolumeFactor());
|
||||
*decay<Scalar>(up.solventInverseFormationVolumeFactor());
|
||||
}
|
||||
else {
|
||||
if (upIdx == inIdx)
|
||||
@@ -592,7 +592,7 @@ public:
|
||||
else
|
||||
flux[contiSolventEqIdx] =
|
||||
extQuants.solventVolumeFlux()
|
||||
*Opm::decay<Scalar>(up.solventDensity());
|
||||
*decay<Scalar>(up.solventDensity());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1321,7 +1321,7 @@ class BlackOilSolventExtensiveQuantities
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
using Toolbox = Opm::MathToolbox<Evaluation>;
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
static constexpr unsigned gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
||||
static constexpr int dimWorld = GridView::dimensionworld;
|
||||
@@ -1341,7 +1341,7 @@ public:
|
||||
unsigned timeIdx)
|
||||
{
|
||||
const auto& gradCalc = elemCtx.gradientCalculator();
|
||||
Opm::PressureCallback<TypeTag> pressureCallback(elemCtx);
|
||||
PressureCallback<TypeTag> pressureCallback(elemCtx);
|
||||
|
||||
const auto& scvf = elemCtx.stencil(timeIdx).interiorFace(scvfIdx);
|
||||
const auto& faceNormal = scvf.normal();
|
||||
@@ -1356,7 +1356,7 @@ public:
|
||||
elemCtx,
|
||||
scvfIdx,
|
||||
pressureCallback);
|
||||
Opm::Valgrind::CheckDefined(solventPGrad);
|
||||
Valgrind::CheckDefined(solventPGrad);
|
||||
|
||||
// correct the pressure gradients by the gravitational acceleration
|
||||
if (EWOMS_GET_PARAM(TypeTag, bool, EnableGravity)) {
|
||||
@@ -1402,8 +1402,8 @@ public:
|
||||
for (unsigned dimIdx = 0; dimIdx < dimWorld; ++dimIdx) {
|
||||
solventPGrad[dimIdx] += f[dimIdx];
|
||||
|
||||
if (!Opm::isfinite(solventPGrad[dimIdx]))
|
||||
throw Opm::NumericalIssue("Non-finite potential gradient for solvent 'phase'");
|
||||
if (!isfinite(solventPGrad[dimIdx]))
|
||||
throw NumericalIssue("Non-finite potential gradient for solvent 'phase'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1430,7 +1430,7 @@ public:
|
||||
if (solventUpstreamDofIdx_ == i)
|
||||
solventVolumeFlux_ = solventPGradNormal*up.solventMobility();
|
||||
else
|
||||
solventVolumeFlux_ = solventPGradNormal*Opm::scalarValue(up.solventMobility());
|
||||
solventVolumeFlux_ = solventPGradNormal*scalarValue(up.solventMobility());
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -1472,7 +1472,7 @@ public:
|
||||
pressureExterior += distZ*g*rhoAvg;
|
||||
|
||||
Evaluation pressureDiffSolvent = pressureExterior - pressureInterior;
|
||||
if (std::abs(Opm::scalarValue(pressureDiffSolvent)) > thpres) {
|
||||
if (std::abs(scalarValue(pressureDiffSolvent)) > thpres) {
|
||||
if (pressureDiffSolvent < 0.0)
|
||||
pressureDiffSolvent += thpres;
|
||||
else
|
||||
@@ -1508,7 +1508,7 @@ public:
|
||||
*pressureDiffSolvent;
|
||||
else
|
||||
solventVolumeFlux_ =
|
||||
Opm::scalarValue(up.solventMobility())
|
||||
scalarValue(up.solventMobility())
|
||||
*(-trans/faceArea)
|
||||
*pressureDiffSolvent;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user