28#ifndef EWOMS_IMMISCIBLE_MODEL_HH
29#define EWOMS_IMMISCIBLE_MODEL_HH
31#include <opm/material/densead/Math.hpp>
44#include <opm/material/components/NullComponent.hpp>
45#include <opm/material/fluidsystems/GasPhase.hpp>
46#include <opm/material/fluidsystems/LiquidPhase.hpp>
47#include <opm/material/fluidsystems/SinglePhaseFluidSystem.hpp>
48#include <opm/material/fluidsystems/TwoPhaseImmiscibleFluidSystem.hpp>
54template <
class TypeTag>
58namespace Opm::Properties {
73template<
class TypeTag>
77template<
class TypeTag>
81template<
class TypeTag>
85template<
class TypeTag>
89template<
class TypeTag>
93template<
class TypeTag>
97template<
class TypeTag>
101template<
class TypeTag>
105template<
class TypeTag>
113template<
class TypeTag>
119 using type = Opm::SinglePhaseFluidSystem<Scalar , Fluid>;
122template<
class TypeTag>
129 using type = Opm::LiquidPhase<Scalar, Opm::NullComponent<Scalar> >;
135template<
class TypeTag>
142 using type = Opm::LiquidPhase<Scalar, Opm::NullComponent<Scalar> >;
145template<
class TypeTag>
152 using type = Opm::LiquidPhase<Scalar, Opm::NullComponent<Scalar> >;
155template<
class TypeTag>
164 using type = Opm::TwoPhaseImmiscibleFluidSystem<Scalar, WettingPhase, NonwettingPhase>;
208template <
class TypeTag>
220 enum { numComponents = FluidSystem::numComponents };
229 explicit ImmiscibleModel(Simulator& simulator)
230 : ParentType(simulator)
252 {
return "immiscible"; }
260 if (!(s = EnergyModule::primaryVarName(pvIdx)).empty())
263 std::ostringstream oss;
265 if (pvIdx == Indices::pressure0Idx) {
266 oss <<
"pressure_" << FluidSystem::phaseName(0);
268 else if (Indices::saturation0Idx <= pvIdx
269 && pvIdx < Indices::saturation0Idx + numPhases - 1) {
270 unsigned phaseIdx = pvIdx - Indices::saturation0Idx;
271 oss <<
"saturation_" << FluidSystem::phaseName(phaseIdx);
285 if (!(s = EnergyModule::eqName(eqIdx)).empty())
288 std::ostringstream oss;
290 if (Indices::conti0EqIdx <= eqIdx && eqIdx < Indices::conti0EqIdx + numComponents)
291 oss <<
"conti_" << FluidSystem::phaseName(eqIdx - Indices::conti0EqIdx);
303 ParentType::updateBegin();
308 size_t nDof = this->numTotalDof();
309 for (
unsigned dofIdx = 0; dofIdx < nDof; ++ dofIdx) {
310 if (this->isLocalDof(dofIdx)) {
312 this->solution(0)[dofIdx][Indices::pressure0Idx];
323 assert(referencePressure_ > 0);
325 Scalar tmp = EnergyModule::primaryVarWeight(asImp_(), globalDofIdx, pvIdx);
329 if (Indices::pressure0Idx == pvIdx) {
330 return 10 / referencePressure_;
341 Scalar
eqWeight(
unsigned globalDofIdx,
unsigned eqIdx)
const
343 Scalar tmp = EnergyModule::eqWeight(asImp_(), globalDofIdx, eqIdx);
349 unsigned compIdx = eqIdx - Indices::conti0EqIdx;
350 assert(compIdx <= numPhases);
357 void registerOutputModules_()
359 ParentType::registerOutputModules_();
366 const Implementation& asImp_()
const
367 {
return *
static_cast<const Implementation *
>(
this); }
369 mutable Scalar referencePressure_;
Provides the auxiliary methods required for consideration of the energy equation.
Definition energymodule.hh:54
Implements a boundary vector for the fully implicit multi-phase model which assumes immiscibility.
Definition immiscibleboundaryratevector.hh:50
This class provides the data all quantities that are required to calculate the fluxes of the fluid ph...
Definition immiscibleextensivequantities.hh:53
Contains the quantities which are are constant within a finite volume for the immiscible multi-phase ...
Definition immiscibleintensivequantities.hh:54
Calculates the local residual of the immiscible multi-phase model.
Definition immisciblelocalresidual.hh:46
A fully-implicit multi-phase flow model which assumes immiscibility of the phases.
Definition immisciblemodel.hh:211
static std::string name()
Definition immisciblemodel.hh:251
std::string primaryVarName(unsigned pvIdx) const
Given an primary variable index, return a human readable name.
Definition immisciblemodel.hh:257
Scalar primaryVarWeight(unsigned globalDofIdx, unsigned pvIdx) const
Definition immisciblemodel.hh:321
void updateBegin()
Called by the update() method before it tries to apply the newton method.
Definition immisciblemodel.hh:301
std::string eqName(unsigned eqIdx) const
Given an equation index, return a human readable name.
Definition immisciblemodel.hh:282
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition immisciblemodel.hh:236
Scalar eqWeight(unsigned globalDofIdx, unsigned eqIdx) const
Definition immisciblemodel.hh:341
Represents the primary variables used by the immiscible multi-phase, model.
Definition immiscibleprimaryvariables.hh:54
Implements a vector representing rates of conserved quantities.
Definition immiscibleratevector.hh:51
A base class for fully-implicit multi-phase porous-media flow models which assume multiple fluid phas...
Definition multiphasebasemodel.hh:175
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition multiphasebasemodel.hh:197
VTK output module for quantities which make sense for models which assume thermal equilibrium.
Definition vtkenergymodule.hpp:58
static void registerParameters()
Register all run-time parameters for the Vtk output module.
Definition vtkenergymodule.hpp:87
Contains the classes required to consider energy as a conservation quantity in a multi-phase module.
Implements a boundary vector for the fully implicit multi-phase model which assumes immiscibility.
This class provides the data all quantities that are required to calculate the fluxes of the fluid ph...
The indices for the isothermal multi-phase model.
Contains the quantities which are are constant within a finite volume for the immiscible multi-phase ...
Calculates the local residual of the immiscible multi-phase model.
Represents the primary variables used by the immiscible multi-phase, model.
Defines the properties required for the immiscible multi-phase model.
Implements a vector representing rates of conserved quantities.
A base class for fully-implicit multi-phase porous-media flow models which assume multiple fluid phas...
The generic type tag for problems using the immiscible multi-phase model.
Definition blackoilmodel.hh:82
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:45
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
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:240
void SetDefault(decltype(Param::value) new_value)
Set a runtime parameter.
Definition parametersystem.hpp:212
The indices for the isothermal multi-phase model.
Definition immiscibleindices.hh:45
Type of object for specifying boundary conditions.
Definition fvbaseproperties.hh:119
Specify whether energy should be considered as a conservation quantity or not.
Definition multiphasebaseproperties.hh:87
Data required to calculate a flux over a face.
Definition fvbaseproperties.hh:153
The fluid systems including the information about the phases.
Definition multiphasebaseproperties.hh:79
The fluid used by the model.
Definition immiscibleproperties.hh:49
Enumerations used by the model.
Definition multiphasebaseproperties.hh:51
The secondary variables within a sub-control volume.
Definition fvbaseproperties.hh:133
The type of the local residual function.
Definition fvbaseproperties.hh:94
The type of the model.
Definition basicproperties.hh:92
The non-wetting phase for two-phase models.
Definition immiscibleproperties.hh:44
A vector of primary variables within a sub-control volume.
Definition fvbaseproperties.hh:130
Vector containing volumetric or areal rates of quantities.
Definition fvbaseproperties.hh:116
The generic type tag for problems using the immiscible multi-phase model.
Definition immisciblemodel.hh:63
The type tag for single-phase immiscible problems.
Definition immisciblemodel.hh:66
The type tag for two-phase immiscible problems.
Definition immisciblemodel.hh:69
The wetting phase for two-phase models.
Definition immiscibleproperties.hh:41
VTK output module for quantities which make sense for models which assume thermal equilibrium.