Loading...
Searching...
No Matches
blackoilmodel.hh
Go to the documentation of this file.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef OPM_BLACK_OIL_MODEL_HPP
#define OPM_BLACK_OIL_MODEL_HPP
#include <opm/material/densead/Math.hpp>
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
#include <opm/models/blackoil/blackoilbioeffectsmodules.hh>
#include <opm/models/blackoil/blackoilboundaryratevector.hh>
#include <opm/models/blackoil/blackoilbrinemodules.hh>
#include <opm/models/blackoil/blackoildarcyfluxmodule.hh>
#include <opm/models/blackoil/blackoildiffusionmodule.hh>
#include <opm/models/blackoil/blackoildispersionmodule.hh>
#include <opm/models/blackoil/blackoilextbomodules.hh>
#include <opm/models/blackoil/blackoilextensivequantities.hh>
#include <opm/models/blackoil/blackoilfoammodules.hh>
#include <opm/models/blackoil/blackoilvariableandequationindices.hh>
#include <opm/models/blackoil/blackoilintensivequantities.hh>
#include <opm/models/blackoil/blackoillocalresidual.hh>
#include <opm/models/blackoil/blackoilnewtonmethod.hpp>
#include <opm/models/blackoil/blackoilpolymermodules.hh>
#include <opm/models/blackoil/blackoilprimaryvariables.hh>
#include <opm/models/blackoil/blackoilproblem.hh>
#include <opm/models/blackoil/blackoilproperties.hh>
#include <opm/models/blackoil/blackoilratevector.hh>
#include <opm/models/blackoil/blackoilsolventmodules.hh>
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
#include <opm/models/common/multiphasebasemodel.hh>
#include <opm/models/io/vtkblackoilmodule.hpp>
#include <opm/models/io/vtkcompositionmodule.hpp>
#include <opm/models/io/vtkdiffusionmodule.hpp>
#include <cassert>
#include <istream>
#include <memory>
#include <ostream>
#include <sstream>
#include <stdexcept>
#include <string>
#include <tuple>
#include <vector>
namespace Opm {
template <class TypeTag>
class BlackOilModel;
}
namespace Opm::Properties {
namespace TTag {
struct BlackOilModel
{ using InheritsFrom = std::tuple<VtkBlackOilPolymer, MultiPhaseBaseModel>; };
} // namespace TTag
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilLocalResidual<TypeTag>; };
template<class TypeTag>
struct NewtonMethod<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilNewtonMethod<TypeTag>; };
template<class TypeTag>
struct Model<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilModel<TypeTag>; };
template<class TypeTag>
struct BaseProblem<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilProblem<TypeTag>; };
template<class TypeTag>
struct RateVector<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilRateVector<TypeTag>; };
template<class TypeTag>
struct BoundaryRateVector<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilBoundaryRateVector<TypeTag>; };
template<class TypeTag>
struct PrimaryVariables<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilPrimaryVariables<TypeTag>; };
template<class TypeTag>
struct IntensiveQuantities<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilIntensiveQuantities<TypeTag>; };
template<class TypeTag>
struct ExtensiveQuantities<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilExtensiveQuantities<TypeTag>; };
template<class TypeTag>
struct FluxModule<TypeTag, TTag::BlackOilModel>
{ using type = BlackOilDarcyFluxModule<TypeTag>; };
template<class TypeTag>
struct Indices<TypeTag, TTag::BlackOilModel>
{
using type = BlackOilVariableAndEquationIndices<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,
getPropValue<TypeTag, Properties::EnableBioeffects>()>;
};
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::BlackOilModel>
{
public:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
using type = BlackOilFluidSystem<Scalar>;
};
// by default, all ECL extension modules are disabled
template<class TypeTag>
struct EnableSolvent<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableExtbo<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnablePolymer<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnablePolymerMW<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableFoam<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableBrine<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableVapwat<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableDisgasInWater<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableSaltPrecipitation<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableBioeffects<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableTemperature<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableEnergy<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableDiffusion<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableDispersion<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct EnableConvectiveMixing<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
template<class TypeTag>
struct BlackOilEnergyScalingFactor<TypeTag, TTag::BlackOilModel>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
static constexpr Scalar alpha =
getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>() ? 1000.0 : 1.0;
public:
using type = Scalar;
static constexpr Scalar value = 1.0/(30.0*4184.0*alpha);
};
template<class TypeTag>
struct BlackOilUreaScalingFactor<TypeTag, TTag::BlackOilModel>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
static constexpr Scalar alpha =
getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>() ? 1000.0 : 1.0;
public:
using type = Scalar;
static constexpr Scalar value = 1.0/(10.0*alpha);
};
// by default, ebos formulates the conservation equations in terms of mass not surface
// volumes
template<class TypeTag>
struct BlackoilConserveSurfaceVolume<TypeTag, TTag::BlackOilModel>
{ static constexpr bool value = false; };
} // namespace Opm::Properties
namespace Opm {
template<class TypeTag >
class BlackOilModel
: public MultiPhaseBaseModel<TypeTag>
{
public:
using Indices = GetPropType<TypeTag, Properties::Indices>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
private:
using Implementation = GetPropType<TypeTag, Properties::Model>;
using ParentType = MultiPhaseBaseModel<TypeTag>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using Discretization = GetPropType<TypeTag, Properties::Discretization>;
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
enum { numComponents = FluidSystem::numComponents };
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
enum { enableDiffusion = getPropValue<TypeTag, Properties::EnableDiffusion>() };
enum { enableDispersion = getPropValue<TypeTag, Properties::EnableDispersion>() };
static constexpr bool compositionSwitchEnabled = Indices::compositionSwitchIdx >= 0;
static constexpr bool waterEnabled = Indices::waterEnabled;
using SolventModule = BlackOilSolventModule<TypeTag>;
using ExtboModule = BlackOilExtboModule<TypeTag>;
using PolymerModule = BlackOilPolymerModule<TypeTag>;
using EnergyModule = BlackOilEnergyModule<TypeTag>;
using DiffusionModule = BlackOilDiffusionModule<TypeTag, enableDiffusion>;
using DispersionModule = BlackOilDispersionModule<TypeTag, enableDispersion>;
using BioeffectsModule = BlackOilBioeffectsModule<TypeTag>;
public:
using LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>;
explicit BlackOilModel(Simulator& simulator)
: ParentType(simulator)
{
eqWeights_.resize(numEq, 1.0);
}
static void registerParameters()
{
ParentType::registerParameters();
SolventModule::registerParameters();
ExtboModule::registerParameters();
PolymerModule::registerParameters();
EnergyModule::registerParameters();
DiffusionModule::registerParameters();
BioeffectsModule::registerParameters();
// register runtime parameters of the VTK output modules
VtkBlackOilModule<TypeTag>::registerParameters();
VtkCompositionModule<TypeTag>::registerParameters();
VtkDiffusionModule<TypeTag>::registerParameters();
}
static std::string name()
{ return "blackoil"; }
std::string primaryVarName(int pvIdx) const
{
if (pvIdx == Indices::waterSwitchIdx) {
return "water_switching";
}
else if (pvIdx == Indices::pressureSwitchIdx) {
return "pressure_switching";
}
else if (static_cast<int>(pvIdx) == Indices::compositionSwitchIdx) {
return "composition_switching";
}
else if (SolventModule::primaryVarApplies(pvIdx)) {
return SolventModule::primaryVarName(pvIdx);
}
else if (ExtboModule::primaryVarApplies(pvIdx)) {
return ExtboModule::primaryVarName(pvIdx);
}
else if (PolymerModule::primaryVarApplies(pvIdx)) {
return PolymerModule::primaryVarName(pvIdx);
}
else if (EnergyModule::primaryVarApplies(pvIdx)) {
return EnergyModule::primaryVarName(pvIdx);
}
else {
throw std::logic_error("Invalid primary variable index");
}
}
std::string eqName(int eqIdx) const
{
if (Indices::conti0EqIdx <= eqIdx && eqIdx < Indices::conti0EqIdx + numComponents) {
std::ostringstream oss;
oss << "conti_" << FluidSystem::phaseName(eqIdx - Indices::conti0EqIdx);
return oss.str();
}
else if (SolventModule::eqApplies(eqIdx)) {
return SolventModule::eqName(eqIdx);
}
else if (ExtboModule::eqApplies(eqIdx)) {
return ExtboModule::eqName(eqIdx);
}
else if (PolymerModule::eqApplies(eqIdx)) {
return PolymerModule::eqName(eqIdx);
}
else if (EnergyModule::eqApplies(eqIdx)) {
return EnergyModule::eqName(eqIdx);
}
else {
throw std::logic_error("Invalid equation index");
}
}
Scalar primaryVarWeight(unsigned globalDofIdx, unsigned pvIdx) const
{
// do not care about the auxiliary equations as they are supposed to scale
// themselves
if (globalDofIdx >= this->numGridDof()) {
return 1.0;
}
// saturations are always in the range [0, 1]!
if (int(Indices::waterSwitchIdx) == int(pvIdx)) {
return 1.0;
}
// oil pressures usually are in the range of 100 to 500 bars for typical oil
// reservoirs (which is the only relevant application for the black-oil model).
else if (int(Indices::pressureSwitchIdx) == int(pvIdx)) {
return 1.0 / 300e5;
}
// deal with primary variables stemming from the solvent module
else if (SolventModule::primaryVarApplies(pvIdx)) {
return SolventModule::primaryVarWeight(pvIdx);
}
// deal with primary variables stemming from the extBO module
else if (ExtboModule::primaryVarApplies(pvIdx)) {
return ExtboModule::primaryVarWeight(pvIdx);
}
// deal with primary variables stemming from the polymer module
else if (PolymerModule::primaryVarApplies(pvIdx)) {
return PolymerModule::primaryVarWeight(pvIdx);
}
// deal with primary variables stemming from the energy module
else if (EnergyModule::primaryVarApplies(pvIdx)) {
return EnergyModule::primaryVarWeight(pvIdx);
}
// if the primary variable is either the gas saturation, Rs or Rv
assert(int(Indices::compositionSwitchIdx) == int(pvIdx));
switch (this->solution(0)[globalDofIdx].primaryVarsMeaningGas()) {
case PrimaryVariables::GasMeaning::Sg: return 1.0; // gas saturation
case PrimaryVariables::GasMeaning::Rs: return 1.0 / 250.; // gas dissolution factor
case PrimaryVariables::GasMeaning::Rv: return 1.0 / 0.025; // oil vaporization factor
default: throw std::logic_error("Invalid primary variable meaning flag for gas");
}
}
Scalar eqWeight(unsigned globalDofIdx, unsigned eqIdx) const
{
// do not care about the auxiliary equations as they are supposed to scale
// themselves
if (globalDofIdx >= this->numGridDof()) {
return 1.0;
}
return eqWeights_[eqIdx];
}
void setEqWeight(unsigned eqIdx, Scalar value)
{ eqWeights_[eqIdx] = value; }
template <class DofEntity>
void serializeEntity(std::ostream& outstream, const DofEntity& dof)
{
const unsigned dofIdx = static_cast<unsigned>(asImp_().dofMapper().index(dof));
// write phase state
if (!outstream.good()) {
throw std::runtime_error("Could not serialize degree of freedom " + std::to_string(dofIdx));
}
// write the primary variables
const auto& priVars = this->solution(/*timeIdx=*/0)[dofIdx];
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx) {
outstream << priVars[eqIdx] << " ";
}
// write the pseudo primary variables
outstream << static_cast<int>(priVars.primaryVarsMeaningGas()) << " ";
outstream << static_cast<int>(priVars.primaryVarsMeaningWater()) << " ";
outstream << static_cast<int>(priVars.primaryVarsMeaningPressure()) << " ";
outstream << priVars.pvtRegionIndex() << " ";
SolventModule::serializeEntity(asImp_(), outstream, dof);
ExtboModule::serializeEntity(asImp_(), outstream, dof);
PolymerModule::serializeEntity(asImp_(), outstream, dof);
EnergyModule::serializeEntity(asImp_(), outstream, dof);
}
template <class DofEntity>
void deserializeEntity(std::istream& instream,
const DofEntity& dof)
{
const unsigned dofIdx = static_cast<unsigned>(asImp_().dofMapper().index(dof));
// read in the "real" primary variables of the DOF
auto& priVars = this->solution(/*timeIdx=*/0)[dofIdx];
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx) {
if (!instream.good()) {
throw std::runtime_error("Could not deserialize degree of freedom " + std::to_string(dofIdx));
}
instream >> priVars[eqIdx];
}
// read the pseudo primary variables
unsigned primaryVarsMeaningGas;
instream >> primaryVarsMeaningGas;
unsigned primaryVarsMeaningWater;
instream >> primaryVarsMeaningWater;
unsigned primaryVarsMeaningPressure;
instream >> primaryVarsMeaningPressure;
unsigned pvtRegionIdx;
instream >> pvtRegionIdx;
if (!instream.good()) {
throw std::runtime_error("Could not deserialize degree of freedom " + std::to_string(dofIdx));
}
SolventModule::deserializeEntity(asImp_(), instream, dof);
ExtboModule::deserializeEntity(asImp_(), instream, dof);
PolymerModule::deserializeEntity(asImp_(), instream, dof);
EnergyModule::deserializeEntity(asImp_(), instream, dof);
using PVM_G = typename PrimaryVariables::GasMeaning;
using PVM_W = typename PrimaryVariables::WaterMeaning;
using PVM_P = typename PrimaryVariables::PressureMeaning;
priVars.setPrimaryVarsMeaningGas(static_cast<PVM_G>(primaryVarsMeaningGas));
priVars.setPrimaryVarsMeaningWater(static_cast<PVM_W>(primaryVarsMeaningWater));
priVars.setPrimaryVarsMeaningPressure(static_cast<PVM_P>(primaryVarsMeaningPressure));
priVars.setPvtRegionIndex(pvtRegionIdx);
}
template <class Restarter>
void deserialize(Restarter& res)
{
ParentType::deserialize(res);
// set the PVT indices of the primary variables. This is also done by writing
// them into the restart file and re-reading them, but it is better to calculate
// them from scratch because the input could have been changed in this regard...
ElementContext elemCtx(this->simulator_);
for (const auto& elem : elements(this->gridView())) {
elemCtx.updateStencil(elem);
for (unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timIdx=*/0); ++dofIdx) {
const unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timIdx=*/0);
updatePvtRegionIndex_(this->solution(/*timeIdx=*/0)[globalDofIdx],
elemCtx,
dofIdx,
/*timeIdx=*/0);
}
}
this->solution(/*timeIdx=*/1) = this->solution(/*timeIdx=*/0);
}
/*
// hack: this interferes with the static polymorphism trick
protected:
friend ParentType;
friend Discretization;
*/
template <class Context>
void supplementInitialSolution_(PrimaryVariables& priVars,
const Context& context,
unsigned dofIdx,
unsigned timeIdx)
{ updatePvtRegionIndex_(priVars, context, dofIdx, timeIdx); }
void registerOutputModules_()
{
ParentType::registerOutputModules_();
// add the VTK output modules which make sense for the blackoil model
SolventModule::registerOutputModules(asImp_(), this->simulator_);
PolymerModule::registerOutputModules(asImp_(), this->simulator_);
EnergyModule::registerOutputModules(asImp_(), this->simulator_);
BioeffectsModule::registerOutputModules(asImp_(), this->simulator_);
this->addOutputModule(std::make_unique<VtkBlackOilModule<TypeTag>>(this->simulator_));
this->addOutputModule(std::make_unique<VtkCompositionModule<TypeTag>>(this->simulator_));
if constexpr (enableDiffusion) {
this->addOutputModule(std::make_unique<VtkDiffusionModule<TypeTag>>(this->simulator_));
}
}
private:
std::vector<Scalar> eqWeights_;
Implementation& asImp_()
{ return *static_cast<Implementation*>(this); }
const Implementation& asImp_() const
{ return *static_cast<const Implementation*>(this); }
template <class Context>
void updatePvtRegionIndex_(PrimaryVariables& priVars,
const Context& context,
unsigned dofIdx,
unsigned timeIdx)
{
const unsigned regionIdx = context.problem().pvtRegionIndex(context, dofIdx, timeIdx);
priVars.setPvtRegionIndex(regionIdx);
}
};
} // namespace Opm
#endif // OPM_BLACK_OIL_MODEL_HPP
blackoilbioeffectsmodules.hh
Contains the classes required to extend the black-oil model by bioeffects.
blackoilboundaryratevector.hh
Implements a boundary vector for the fully implicit black-oil model.
blackoilbrinemodules.hh
Contains the classes required to extend the black-oil model by brine.
blackoildarcyfluxmodule.hh
This file contains the default flux module of the blackoil model.
blackoildiffusionmodule.hh
Classes required for molecular diffusion.
blackoildispersionmodule.hh
Classes required for mechanical dispersion.
blackoilextbomodules.hh
Contains the classes required to extend the black-oil model by solvent component.
blackoilextensivequantities.hh
This template class contains the data which is required to calculate the fluxes of the fluid phases o...
blackoilfoammodules.hh
Contains the classes required to extend the black-oil model to include the effects of foam.
blackoilintensivequantities.hh
Contains the quantities which are are constant within a finite volume in the black-oil model.
blackoillocalresidual.hh
Calculates the local residual of the black oil model.
blackoilnewtonmethod.hpp
A newton solver which is specific to the black oil model.
blackoilpolymermodules.hh
Contains the classes required to extend the black-oil model by polymer.
blackoilprimaryvariables.hh
Represents the primary variables used by the black-oil model.
blackoilproblem.hh
Base class for all problems which use the black-oil model.
blackoilproperties.hh
Declares the properties required by the black oil model.
blackoilratevector.hh
Implements a vector representing mass, molar or volumetric rates for the black oil model.
blackoilsolventmodules.hh
Contains the classes required to extend the black-oil model by solvents.
blackoiltwophaseindices.hh
The primary variable and equation indices for the black-oil model.
blackoilvariableandequationindices.hh
The primary variable and equation indices for the three-phase black-oil model.
Opm::BlackOilBioeffectsModule
Contains the high level supplements required to extend the black oil model by bioeffects.
Definition blackoilbioeffectsmodules.hh:93
Opm::BlackOilBioeffectsModule::registerParameters
static void registerParameters()
Register all run-time parameters for the black-oil bioeffects module.
Definition blackoilbioeffectsmodules.hh:139
Opm::BlackOilBioeffectsModule::registerOutputModules
static void registerOutputModules(Model &model, Simulator &simulator)
Register all bioeffects specific VTK and ECL output modules.
Definition blackoilbioeffectsmodules.hh:148
Opm::BlackOilBoundaryRateVector
Implements a boundary vector for the fully implicit black-oil model.
Definition blackoilboundaryratevector.hh:48
Opm::BlackOilDiffusionModule
Provides the auxiliary methods required for consideration of the diffusion equation.
Definition blackoildiffusionmodule.hh:50
Opm::BlackOilDispersionModule
Provides the auxiliary methods required for consideration of the dispersion equation.
Definition blackoildispersionmodule.hh:58
Opm::BlackOilEnergyModule
Contains the high level supplements required to extend the black oil model by energy.
Definition blackoilenergymodules.hh:58
Opm::BlackOilEnergyModule::registerParameters
static void registerParameters()
Register all run-time parameters for the black-oil energy module.
Definition blackoilenergymodules.hh:84
Opm::BlackOilEnergyModule::registerOutputModules
static void registerOutputModules(Model &model, Simulator &simulator)
Register all energy specific VTK and ECL output modules.
Definition blackoilenergymodules.hh:94
Opm::BlackOilExtboModule
Contains the high level supplements required to extend the black oil model.
Definition blackoilextbomodules.hh:62
Opm::BlackOilExtboModule::registerParameters
static void registerParameters()
Register all run-time parameters for the black-oil solvent module.
Definition blackoilextbomodules.hh:95
Opm::BlackOilExtensiveQuantities
This template class contains the data which is required to calculate the fluxes of the fluid phases o...
Definition blackoilextensivequantities.hh:59
Opm::BlackOilIntensiveQuantities
Contains the quantities which are are constant within a finite volume in the black-oil model.
Definition blackoilintensivequantities.hh:85
Opm::BlackOilLocalResidual
Calculates the local residual of the black oil model.
Definition blackoillocalresidual.hh:56
Opm::BlackOilModel
A fully-implicit black-oil flow model.
Definition blackoilmodel.hh:336
Opm::BlackOilModel::primaryVarName
std::string primaryVarName(int pvIdx) const
Given an primary variable index, return a human readable name.
Definition blackoilmodel.hh:405
Opm::BlackOilModel::primaryVarWeight
Scalar primaryVarWeight(unsigned globalDofIdx, unsigned pvIdx) const
Returns the relative weight of a primary variable for calculating relative errors.
Definition blackoilmodel.hh:463
Opm::BlackOilModel::eqWeight
Scalar eqWeight(unsigned globalDofIdx, unsigned eqIdx) const
Returns the relative weight of an equation.
Definition blackoilmodel.hh:519
Opm::BlackOilModel::serializeEntity
void serializeEntity(std::ostream &outstream, const DofEntity &dof)
Write the current solution for a degree of freedom to a restart file.
Definition blackoilmodel.hh:542
Opm::BlackOilModel::eqName
std::string eqName(int eqIdx) const
Given an equation index, return a human readable name.
Definition blackoilmodel.hh:436
Opm::BlackOilModel::name
static std::string name()
Definition blackoilmodel.hh:399
Opm::BlackOilModel::deserializeEntity
void deserializeEntity(std::istream &instream, const DofEntity &dof)
Reads the current solution variables for a degree of freedom from a restart file.
Definition blackoilmodel.hh:579
Opm::BlackOilModel::registerParameters
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition blackoilmodel.hh:379
Opm::BlackOilModel::deserialize
void deserialize(Restarter &res)
Deserializes the state of the model.
Definition blackoilmodel.hh:633
Opm::BlackOilNewtonMethod
A newton solver which is specific to the black oil model.
Definition blackoilnewtonmethod.hpp:61
Opm::BlackOilPolymerModule
Contains the high level supplements required to extend the black oil model by polymer.
Definition blackoilpolymermodules.hh:64
Opm::BlackOilPolymerModule::registerParameters
static void registerParameters()
Register all run-time parameters for the black-oil polymer module.
Definition blackoilpolymermodules.hh:146
Opm::BlackOilPolymerModule::registerOutputModules
static void registerOutputModules(Model &model, Simulator &simulator)
Register all polymer specific VTK and ECL output modules.
Definition blackoilpolymermodules.hh:156
Opm::BlackOilPrimaryVariables
Represents the primary variables used by the black-oil model.
Definition blackoilprimaryvariables.hh:68
Opm::BlackOilProblem
Base class for all problems which use the black-oil model.
Definition blackoilproblem.hh:43
Opm::BlackOilRateVector
Implements a vector representing mass, molar or volumetric rates for the black oil model.
Definition blackoilratevector.hh:62
Opm::BlackOilSolventModule
Contains the high level supplements required to extend the black oil model by solvents.
Definition blackoilsolventmodules.hh:68
Opm::BlackOilSolventModule::registerOutputModules
static void registerOutputModules(Model &model, Simulator &simulator)
Register all solvent specific VTK and ECL output modules.
Definition blackoilsolventmodules.hh:124
Opm::BlackOilSolventModule::registerParameters
static void registerParameters()
Register all run-time parameters for the black-oil solvent module.
Definition blackoilsolventmodules.hh:114
Opm::MultiPhaseBaseModel::registerParameters
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition multiphasebasemodel.hh:190
Opm::VtkBlackOilModule::registerParameters
static void registerParameters()
Register all run-time parameters for the multi-phase VTK output module.
Definition vtkblackoilmodule.hpp:93
Opm::VtkCompositionModule::registerParameters
static void registerParameters()
Register all run-time parameters for the Vtk output module.
Definition vtkcompositionmodule.hpp:87
Opm::VtkDiffusionModule::registerParameters
static void registerParameters()
Register all run-time parameters for the Vtk output module.
Definition vtkdiffusionmodule.hpp:88
multiphasebasemodel.hh
A base class for fully-implicit multi-phase porous-media flow models which assume multiple fluid phas...
Opm::Properties::TTag
The generic type tag for problems using the immiscible multi-phase model.
Definition blackoilmodel.hh:81
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
Opm::GetPropType
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition propertysystem.hh:233
Opm::getPropValue
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:240
Opm::BlackOilDarcyFluxModule
Provides a Darcy flux module for the blackoil model.
Definition blackoildarcyfluxmodule.hh:49
Opm::BlackOilVariableAndEquationIndices
The primary variable and equation indices for the three-phase black-oil model.
Definition blackoilvariableandequationindices.hh:47
Opm::Properties::BaseProblem
The type of the base class for all problems which use this model.
Definition fvbaseproperties.hh:84
Opm::Properties::BlackOilEnergyScalingFactor
The relative weight of the residual of the energy equation compared to the mass residuals.
Definition blackoilproperties.hh:101
Opm::Properties::BlackOilUreaScalingFactor
Similarly to the energy equation, a scaling is applied to the urea equation in MICP.
Definition blackoilproperties.hh:105
Opm::Properties::BlackoilConserveSurfaceVolume
Enable surface volume scaling.
Definition blackoilproperties.hh:59
Opm::Properties::BoundaryRateVector
Type of object for specifying boundary conditions.
Definition fvbaseproperties.hh:119
Opm::Properties::EnableBioeffects
Enable the ECL-blackoil extension for bioeffects (biofilm/MICP).
Definition blackoilproperties.hh:83
Opm::Properties::EnableBrine
Enable the ECL-blackoil extension for salt.
Definition blackoilproperties.hh:67
Opm::Properties::EnableConvectiveMixing
Enable convective mixing?
Definition multiphasebaseproperties.hh:99
Opm::Properties::EnableDiffusion
Enable diffusive fluxes?
Definition multiphasebaseproperties.hh:91
Opm::Properties::EnableDisgasInWater
Enable the ECL-blackoil extension for disolution of gas into water.
Definition blackoilproperties.hh:79
Opm::Properties::EnableDispersion
Enable dispersive fluxes?
Definition multiphasebaseproperties.hh:95
Opm::Properties::EnableEnergy
Specify whether energy should be considered as a conservation quantity or not.
Definition multiphasebaseproperties.hh:87
Opm::Properties::EnableExtbo
Enable the ECL-blackoil extension for extended BO. ("Second gas" - alternative approach).
Definition blackoilproperties.hh:47
Opm::Properties::EnableFoam
Enable the ECL-blackoil extension for foam.
Definition blackoilproperties.hh:63
Opm::Properties::EnablePolymerMW
Enable the tracking polymer molecular weight tracking and related functionalities.
Definition blackoilproperties.hh:55
Opm::Properties::EnablePolymer
Enable the ECL-blackoil extension for polymer.
Definition blackoilproperties.hh:51
Opm::Properties::EnableSaltPrecipitation
Enable the ECL-blackoil extension for salt precipitation.
Definition blackoilproperties.hh:71
Opm::Properties::EnableSolvent
Enable the ECL-blackoil extension for solvents. ("Second gas").
Definition blackoilproperties.hh:43
Opm::Properties::EnableTemperature
Allow the spatial and temporal domains to exhibit non-constant temperature in the black-oil model.
Definition blackoilproperties.hh:88
Opm::Properties::EnableVapwat
Enable the ECL-blackoil extension for water evaporation.
Definition blackoilproperties.hh:75
Opm::Properties::ExtensiveQuantities
Data required to calculate a flux over a face.
Definition fvbaseproperties.hh:149
Opm::Properties::FluidSystem
The fluid systems including the information about the phases.
Definition multiphasebaseproperties.hh:79
Opm::Properties::FluxModule
Specifies the relation used for velocity.
Definition multiphasebaseproperties.hh:83
Opm::Properties::Indices
Enumerations used by the model.
Definition multiphasebaseproperties.hh:51
Opm::Properties::IntensiveQuantities
The secondary variables within a sub-control volume.
Definition fvbaseproperties.hh:133
Opm::Properties::LocalResidual
The type of the local residual function.
Definition fvbaseproperties.hh:94
Opm::Properties::Model
The type of the model.
Definition basicproperties.hh:88
Opm::Properties::NewtonMethod
Specifies the type of the actual Newton method.
Definition newtonmethodproperties.hh:32
Opm::Properties::PrimaryVariables
A vector of primary variables within a sub-control volume.
Definition fvbaseproperties.hh:130
Opm::Properties::RateVector
Vector containing volumetric or areal rates of quantities.
Definition fvbaseproperties.hh:116
Opm::Properties::TTag::BlackOilModel
The type tag for the black-oil problems.
Definition blackoilmodel.hh:85
vtkblackoilmodule.hpp
VTK output module for the black oil model's parameters.
vtkcompositionmodule.hpp
VTK output module for the fluid composition.
vtkdiffusionmodule.hpp
VTK output module for quantities which make sense for models which incorperate molecular diffusion.