28#ifndef EWOMS_RICHARDS_MODEL_HH
29#define EWOMS_RICHARDS_MODEL_HH
31#include <opm/material/densead/Math.hpp>
45#include <opm/material/components/NullComponent.hpp>
46#include <opm/material/fluidsystems/LiquidPhase.hpp>
47#include <opm/material/fluidsystems/GasPhase.hpp>
48#include <opm/material/fluidsystems/TwoPhaseImmiscibleFluidSystem.hpp>
54template <
class TypeTag>
58namespace Opm::Properties {
63struct Richards {
using InheritsFrom = std::tuple<MultiPhaseBaseModel>; };
67template<
class TypeTag>
71template<
class TypeTag>
83template<
class TypeTag>
87template<
class TypeTag>
91template<
class TypeTag>
95template<
class TypeTag>
99template<
class TypeTag>
103template<
class TypeTag>
107template<
class TypeTag>
111template<
class TypeTag>
115template<
class TypeTag>
119template<
class TypeTag>
123template<
class TypeTag>
136template<
class TypeTag>
143 using type = Opm::LiquidPhase<Scalar, Opm::NullComponent<Scalar> >;
154template<
class TypeTag>
161 using type = Opm::GasPhase<Scalar, Opm::NullComponent<Scalar> >;
173template<
class TypeTag>
182 using type = Opm::TwoPhaseImmiscibleFluidSystem<Scalar, WettingFluid, NonWettingFluid>;
247template <
class TypeTag>
259 static const unsigned numPhases = FluidSystem::numPhases;
260 static const unsigned numComponents = FluidSystem::numComponents;
270 static_assert(numPhases == 2,
271 "Exactly two fluids are required for this model");
272 static_assert(numComponents == 2,
273 "Exactly two components are required for this model");
274 static_assert(liquidPhaseIdx != gasPhaseIdx,
275 "The liquid and the gas phases must be different");
276 static_assert(liquidCompIdx != gasCompIdx,
277 "The liquid and the gas components must be different");
285 assert(FluidSystem::isLiquid(liquidPhaseIdx));
286 assert(!FluidSystem::isLiquid(gasPhaseIdx));
301 {
return "richards"; }
308 std::ostringstream oss;
309 if (pvIdx == Indices::pressureWIdx)
310 oss <<
"pressure_" << FluidSystem::phaseName(liquidPhaseIdx);
322 std::ostringstream oss;
323 if (eqIdx == Indices::contiEqIdx)
324 oss <<
"continuity_" << FluidSystem::phaseName(liquidPhaseIdx);
336 if (Indices::pressureWIdx == pvIdx) {
337 return 10 / referencePressure_;
346 Scalar
eqWeight(
unsigned, [[maybe_unused]]
unsigned eqIdx)
const
348 assert((eqIdx - Indices::contiEqIdx) <= FluidSystem::numPhases);
359 ParentType::updateBegin();
364 for (
unsigned dofIdx = 0; dofIdx < this->numGridDof(); ++ dofIdx) {
365 if (this->isLocalDof(dofIdx)) {
367 this->solution(0)[dofIdx][Indices::pressureWIdx];
377 {
return phaseIdx == liquidPhaseIdx; }
379 void registerOutputModules_()
381 ParentType::registerOutputModules_();
384 mutable Scalar referencePressure_;
A base class for fully-implicit multi-phase porous-media flow models which assume multiple fluid phas...
Definition multiphasebasemodel.hh:153
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition multiphasebasemodel.hh:179
Implements a boundary vector for the fully implicit Richards model.
Definition richardsboundaryratevector.hh:45
Calculates and stores the data which is required to calculate the flux of fluid over a face of a fini...
Definition richardsextensivequantities.hh:47
Intensive quantities required by the Richards model.
Definition richardsintensivequantities.hh:50
Element-wise calculation of the residual for the Richards model.
Definition richardslocalresidual.hh:43
This model implements a variant of the Richards equation for quasi-twophase flow.
Definition richardsmodel.hh:250
void updateBegin()
Called by the update() method before it tries to apply the newton method.
Definition richardsmodel.hh:357
bool phaseIsConsidered(unsigned phaseIdx) const
Definition richardsmodel.hh:376
Scalar eqWeight(unsigned, unsigned eqIdx) const
Returns the relative weight of an equation.
Definition richardsmodel.hh:346
std::string eqName(unsigned eqIdx) const
Given an equation index, return a human readable name.
Definition richardsmodel.hh:320
std::string primaryVarName(unsigned pvIdx) const
Given an primary variable index, return a human readable name.
Definition richardsmodel.hh:306
static void registerParameters()
Register all run-time parameters for the model.
Definition richardsmodel.hh:292
static std::string name()
Definition richardsmodel.hh:300
Scalar primaryVarWeight(unsigned, unsigned pvIdx) const
Returns the relative weight of a primary variable for calculating relative errors.
Definition richardsmodel.hh:334
A Richards model specific Newton method.
Definition richardsnewtonmethod.hh:46
Represents the primary variables used in the Richards model.
Definition richardsprimaryvariables.hh:53
Implements a vector representing mass, molar or volumetric rates.
Definition richardsratevector.hh:52
A base class for fully-implicit multi-phase porous-media flow models which assume multiple fluid phas...
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
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:235
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
Implements a boundary vector for the fully implicit Richards model.
Calculates and stores the data which is required to calculate the flux of fluid over a face of a fini...
Indices for the primary variables/conservation equations of the Richards model.
Intensive quantities required by the Richards model.
Element-wise calculation of the residual for the Richards model.
A Richards model specific Newton method.
Represents the primary variables used in the Richards model.
Contains the property declarations for the Richards model.
Implements a vector representing mass, molar or volumetric rates.
Type of object for specifying boundary conditions.
Definition fvbaseproperties.hh:119
Data required to calculate a flux over a face.
Definition fvbaseproperties.hh:149
The fluid systems including the information about the phases.
Definition baseoutputmodule.hh:52
Index of the component which constitutes the gas.
Definition richardsproperties.hh:61
Index of the fluid which represents the non-wetting phase.
Definition richardsproperties.hh:53
Enumerations used by the model.
Definition multiphasebaseproperties.hh:48
The secondary variables within a sub-control volume.
Definition fvbaseproperties.hh:133
Index of the component which constitutes the liquid.
Definition richardsproperties.hh:57
Index of the fluid which represents the wetting phase.
Definition richardsproperties.hh:49
The type of the local residual function.
Definition fvbaseproperties.hh:94
The type of the model.
Definition basicproperties.hh:88
Specifies the type of the actual Newton method.
Definition nullconvergencewriter.hh:39
The fluid used as the non-wetting phase (by default, we set the fluid system to the immiscible one,...
Definition richardsproperties.hh:45
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 type tag for problems discretized using the Richards model.
Definition richardsmodel.hh:63
The fluid used as the wetting phase (by default, we set the fluid system to the immiscible one,...
Definition richardsproperties.hh:40
Indices for the primary variables/conservation equations of the Richards model.
Definition richardsindices.hh:39