28#ifndef OPM_PTFLASH_MODEL_HH
29#define OPM_PTFLASH_MODEL_HH
31#include <opm/material/constraintsolvers/PTFlash.hpp>
33#include <opm/material/densead/Math.hpp>
35#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
36#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>
63template <
class TypeTag>
68namespace Opm::Properties {
72struct FlashModel {
using InheritsFrom = std::tuple<MultiPhaseBaseModel>; };
76template<
class TypeTag>
81template<
class TypeTag>
86template<
class TypeTag>
89 using type = Opm::PTFlash<GetPropType<TypeTag, Properties::Scalar>,
94template<
class TypeTag>
99template<
class TypeTag>
104template<
class TypeTag>
109template<
class TypeTag>
114template<
class TypeTag>
119template<
class TypeTag>
124template<
class TypeTag>
129template<
class TypeTag>
131{
static constexpr bool value =
false; };
134template<
class TypeTag>
136{
static constexpr bool value =
false; };
184template <
class TypeTag>
225 Parameters::Register<Parameters::FlashTolerance<Scalar>>
226 (
"The maximum tolerance for the flash solver to "
227 "consider the solution converged");
228 Parameters::Register<Parameters::FlashVerbosity>
229 (
"Flash solver verbosity level");
230 Parameters::Register<Parameters::FlashTwoPhaseMethod>
231 (
"Method for solving vapor-liquid composition. Available options include: "
232 "ssi, newton, ssi+newton");
234 Parameters::SetDefault<Parameters::FlashTolerance<Scalar>>(1e-12);
235 Parameters::SetDefault<Parameters::EnableIntensiveQuantityCache>(
true);
240 Parameters::SetDefault<Parameters::EnableThermodynamicHints>(
true);
248 const std::string& tmp = EnergyModule::primaryVarName(pvIdx);
252 std::ostringstream oss;
253 if (Indices::z0Idx <= pvIdx && pvIdx < Indices::z0Idx + numComponents - 1)
254 oss <<
"z_," << FluidSystem::componentName(pvIdx - Indices::z0Idx);
255 else if (pvIdx==Indices::pressure0Idx)
256 oss <<
"pressure_" << FluidSystem::phaseName(0);
268 const std::string& tmp = EnergyModule::eqName(eqIdx);
272 std::ostringstream oss;
273 if (Indices::conti0EqIdx <= eqIdx && eqIdx < Indices::conti0EqIdx
275 unsigned compIdx = eqIdx - Indices::conti0EqIdx;
276 oss <<
"continuity^" << FluidSystem::componentName(compIdx);
284 void registerOutputModules_()
286 ParentType::registerOutputModules_();
Provides the auxiliary methods required for consideration of the energy equation.
Definition energymodule.hh:50
Implements a boundary vector for the fully implicit compositional multi-phase model which is based on...
Definition flashboundaryratevector.hh:45
This template class contains the data which is required to calculate all fluxes of components over a ...
Definition flashextensivequantities.hh:54
Defines the primary variable and equation indices for the compositional multi-phase model based on fl...
Definition flashindices.hh:48
Contains the intensive quantities of the flash-based compositional multi-phase model.
Definition flashintensivequantities.hh:60
Calculates the local residual of the compositional multi-phase model based on flash calculations.
Definition flashlocalresidual.hh:45
A compositional multi-phase model based on flash-calculations.
Definition flashmodel.hh:187
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition flashmodel.hh:211
std::string primaryVarName(unsigned pvIdx) const
Given an primary variable index, return a human readable name.
Definition flashmodel.hh:246
std::string eqName(unsigned eqIdx) const
Given an equation index, return a human readable name.
Definition flashmodel.hh:266
A Newton solver specific to the PTFlash model.
Definition flashnewtonmethod.hh:53
Represents the primary variables used by the compositional flow model based on flash calculations.
Definition flashprimaryvariables.hh:57
Implements a vector representing rates of conserved quantities.
Definition flashratevector.hh:48
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
VTK output module for the fluid composition.
Definition vtkcompositionmodule.hpp:57
static void registerParameters()
Register all run-time parameters for the Vtk output module.
Definition vtkcompositionmodule.hpp:86
VTK output module for quantities which make sense for models which incorperate molecular diffusion.
Definition vtkdiffusionmodule.hpp:58
static void registerParameters()
Register all run-time parameters for the Vtk output module.
Definition vtkdiffusionmodule.hpp:87
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:86
VTK output module for the PT Flash calculation This module deals with the following quantities: K,...
Definition vtkptflashmodule.hpp:53
static void registerParameters()
Register all run-time parameters for the Vtk output module.
Definition vtkptflashmodule.hpp:82
Contains the classes required to consider energy as a conservation quantity in a multi-phase module.
Implements a boundary vector for the fully implicit compositional multi-phase model which is based on...
This template class contains the data which is required to calculate all fluxes of components over a ...
A Newton solver specific to the PTFlash model.
Declares the properties required by the compositional multi-phase model based on flash calculations.
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...
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
Defines the primary variable and equation indices for the compositional multi-phase model based on fl...
Contains the intensive quantities of the flash-based compositional multi-phase model.
Calculates the local residual of the compositional multi-phase model based on flash calculations.
Declares the parameters for the compositional multi-phase model based on flash calculations.
Represents the primary variables used by the compositional flow model based on flash calculations.
Type of object for specifying boundary conditions.
Definition fvbaseproperties.hh:119
Enable diffusive fluxes?
Definition multiphasebaseproperties.hh:79
Specify whether energy should be considered as a conservation quantity or not.
Definition multiphasebaseproperties.hh:76
Data required to calculate a flux over a face.
Definition fvbaseproperties.hh:149
The type of the flash constraint solver.
Definition flashproperties.hh:39
Enumerations used by the model.
Definition multiphasebaseproperties.hh:48
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:88
Specifies the type of the actual Newton method.
Definition nullconvergencewriter.hh:39
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 the isothermal single phase problems.
Definition flashmodel.hh:72
VTK output module for the fluid composition.
VTK output module for quantities which make sense for models which incorperate molecular diffusion.
VTK output module for quantities which make sense for models which assume thermal equilibrium.
VTK output module for the PT Flash calculation This module deals with the following quantities: K,...