28 #ifndef EWOMS_MULTI_PHASE_BASE_MODEL_HH 29 #define EWOMS_MULTI_PHASE_BASE_MODEL_HH 31 #include <opm/material/densead/Math.hpp> 33 #include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp> 34 #include <opm/material/fluidmatrixinteractions/NullMaterial.hpp> 36 #include <opm/material/thermal/NullSolidEnergyLaw.hpp> 37 #include <opm/material/thermal/NullThermalConductionLaw.hpp> 56 template <
class TypeTag>
71 template<
class TypeTag>
74 using type = std::tuple<GetSplicePropType<TypeTag,
82 template<
class TypeTag>
87 template<
class TypeTag>
93 template<
class TypeTag>
99 template<
class TypeTag>
104 template<
class TypeTag>
109 template<
class TypeTag>
114 template<
class TypeTag>
121 template<
class TypeTag>
127 using Traits = NullMaterialTraits<Scalar, FluidSystem::numPhases>;
130 using type = NullMaterial<Traits>;
137 template<
class TypeTag>
143 template<
class TypeTag>
145 {
using type = NullSolidEnergyLaw<GetPropType<TypeTag, Properties::Scalar>>; };
149 template<
class TypeTag>
154 template<
class TypeTag>
156 {
using type = NullThermalConductionLaw<GetPropType<TypeTag, Properties::Scalar>>; };
160 template<
class TypeTag>
173 template <
class TypeTag>
184 using ElementIterator =
typename GridView::template Codim<0>::Iterator;
185 using Element =
typename GridView::template Codim<0>::Entity;
187 enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
190 explicit MultiPhaseBaseModel(Simulator& simulator)
191 : ParentType(simulator)
199 ParentType::registerParameters();
223 assert(phaseIdx < numPhases);
236 ElementContext elemCtx(this->simulator_);
237 ElementIterator elemIt = threadedElemIt.beginParallel();
240 for (; !threadedElemIt.isFinished(elemIt); elemIt = threadedElemIt.increment()) {
241 const Element& elem = *elemIt;
242 if (elem.partitionType() != Dune::InteriorEntity) {
246 elemCtx.updateStencil(elem);
247 elemCtx.updateIntensiveQuantities(0);
249 const auto& stencil = elemCtx.stencil(0);
251 for (
unsigned dofIdx = 0; dofIdx < elemCtx.numDof(0); ++dofIdx) {
252 const auto& scv = stencil.subControlVolume(dofIdx);
253 const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, 0);
256 this->localResidual(threadId).addPhaseStorage(tmp,
261 tmp *= scv.volume() * intQuants.extrusionFactor();
270 storage = this->gridView_.comm().sum(storage);
273 void registerOutputModules_()
275 ParentType::registerOutputModules_();
283 const Implementation& asImp_()
const 284 {
return *
static_cast<const Implementation*
>(
this); }
This file contains the necessary classes to calculate the velocity out of a pressure potential gradie...
Simplifies multi-threaded capabilities.
Definition: threadmanager.hpp:35
The material law for thermal conduction.
Definition: multiphasebaseproperties.hh:71
The context material law (extracted from the spatial parameters)
Definition: multiphasebaseproperties.hh:59
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
The type of the base class for all problems which use this model.
Definition: fvbaseproperties.hh:84
VTK output module for the temperature in which assume thermal equilibrium.
The base class for the problems of ECFV discretizations which deal with a multi-phase flow through a ...
Definition: multiphasebaseproblem.hh:62
Definition: propertysystem.hh:41
Defines the common properties required by the porous medium multi-phase models.
bool phaseIsConsidered(unsigned) const
Returns true iff a fluid phase is used by the model.
Definition: multiphasebasemodel.hh:211
static void registerParameters()
Register all run-time parameters for the Vtk output module.
Definition: vtktemperaturemodule.hpp:75
Definition: vcfvproperties.hh:41
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
The base class for the vertex centered finite volume discretization scheme.
Number of fluid phases in the system.
Definition: multiphasebaseproperties.hh:43
Number of derivatives in the system of PDEs.
Definition: basicproperties.hh:84
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition: multiphasebasemodel.hh:197
static unsigned threadId()
Return the index of the current OpenMP thread.
Definition: threadmanager.cpp:84
VTK output module for the temperature in which assume thermal equilibrium.
Definition: vtktemperaturemodule.hpp:50
Provides an STL-iterator like interface to iterate over the enties of a GridView in OpenMP threaded a...
Definition: threadedentityiterator.hh:41
The parameters of the material law for energy storage of the solid.
Definition: multiphasebaseproperties.hh:67
The parameters of the material law for thermal conduction.
Definition: multiphasebaseproperties.hh:75
Specifies the relation used for velocity.
Definition: multiphasebaseproperties.hh:83
void globalPhaseStorage(EqVector &storage, unsigned phaseIdx)
Compute the total storage inside one phase of all conservation quantities.
Definition: multiphasebasemodel.hh:221
This class calculates the pressure potential gradients and the filter velocities for multi-phase flow...
VTK output module for quantities which make sense for all models which deal with multiple fluid phase...
Number of chemical species in the system.
Definition: multiphasebaseproperties.hh:47
VTK output module for quantities which make sense for all models which deal with multiple fluid phase...
Definition: vtkmultiphasemodule.hpp:72
Specifies a flux module which uses the Darcy relation.
Definition: darcyfluxmodule.hh:66
Manages the initializing and running of time dependent problems.
Definition: simulator.hh:83
The material law for the energy stored in the solid matrix.
Definition: multiphasebaseproperties.hh:63
static void registerParameters()
Register all run-time parameters for the multi-phase VTK output module.
Definition: vtkmultiphasemodule.hpp:110
Definition: blackoilmodel.hh:80
The splice to be used for the spatial discretization.
Definition: multiphasebaseproperties.hh:39
Number of equations in the system of PDEs.
Definition: basicproperties.hh:80
Definition: multiphasebasemodel.hh:66
Defines the common parameters for the porous medium multi-phase models.
The base class for the problems of ECFV discretizations which deal with a multi-phase flow through a ...
The material law which ought to be used (extracted from the spatial parameters)
Definition: multiphasebaseproperties.hh:55
A base class for fully-implicit multi-phase porous-media flow models which assume multiple fluid phas...
Definition: multiphasebasemodel.hh:57