All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
discretefracturemodel.hh
Go to the documentation of this file.
1 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set et ts=4 sw=4 sts=4:
3 /*
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 2 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 
19  Consult the COPYING file in the top-level source directory of this
20  module for the precise wording of the license and the list of
21  copyright holders.
22 */
28 #ifndef EWOMS_DISCRETE_FRACTURE_MODEL_HH
29 #define EWOMS_DISCRETE_FRACTURE_MODEL_HH
30 
31 #include <opm/material/densead/Math.hpp>
32 
39 
42 
43 #include <opm/common/ErrorMacros.hpp>
44 #include <opm/common/Exceptions.hpp>
45 
46 #include <string>
47 
48 namespace Ewoms {
49 template <class TypeTag>
51 }
52 
53 namespace Ewoms {
54 namespace Properties {
56 NEW_TYPE_TAG(DiscreteFractureModel, INHERITS_FROM(ImmiscibleTwoPhaseModel, VtkDiscreteFracture));
57 
60 
63 
66 
67 // The type of the base base class for actual problems.
68 // TODO!?
69 //SET_TYPE_PROP(DiscreteFractureModel BaseProblem, DiscreteFractureBaseProblem<TypeTag>);
70 
72 SET_TYPE_PROP(DiscreteFractureModel, PrimaryVariables,
74 
76 SET_TYPE_PROP(DiscreteFractureModel, IntensiveQuantities,
78 
80 SET_TYPE_PROP(DiscreteFractureModel, ExtensiveQuantities,
82 
85 SET_BOOL_PROP(DiscreteFractureModel, UseTwoPointGradients, true);
86 
87 // The intensive quantity cache cannot be used by the discrete fracture model, because
88 // the intensive quantities of a control degree of freedom are not identical to the
89 // intensive quantities of the other intensive quantities of the same of the same degree
90 // of freedom. This is because the fracture properties (volume, permeability, etc) are
91 // specific for each...
92 SET_BOOL_PROP(DiscreteFractureModel, EnableIntensiveQuantityCache, false);
93 } // namespace Properties
94 
112 template <class TypeTag>
113 class DiscreteFractureModel : public ImmiscibleModel<TypeTag>
114 {
115  typedef ImmiscibleModel<TypeTag> ParentType;
116  typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
117 
118 public:
119  DiscreteFractureModel(Simulator& simulator)
120  : ParentType(simulator)
121  {
122  if (EWOMS_GET_PARAM(TypeTag, bool, EnableIntensiveQuantityCache)) {
123  OPM_THROW(std::runtime_error,
124  "The discrete fracture model does not work in conjunction "
125  "with intensive quantities caching");
126  }
127  }
128 
132  static void registerParameters()
133  {
135 
136  // register runtime parameters of the VTK output modules
138  }
139 
143  static std::string name()
144  { return "discretefracture"; }
145 
146  void registerOutputModules_()
147  {
148  ParentType::registerOutputModules_();
149 
150  this->addOutputModule(new Ewoms::VtkDiscreteFractureModule<TypeTag>(this->simulator_));
151  }
152 };
153 } // namespace Ewoms
154 
155 #endif
static void registerParameters()
Register all run-time parameters for the multi-phase VTK output module.
Definition: vtkdiscretefracturemodule.hh:117
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition: immisciblemodel.hh:222
Defines the properties required for the immiscible multi-phase model which considers discrete fractur...
#define SET_BOOL_PROP(EffTypeTagName, PropTagName,...)
Set a property to a simple constant boolean value.
Definition: propertysystem.hh:361
This class expresses all intensive quantities of the discrete fracture model.
Contains the quantities which are are constant within a finite volume in the discret fracture immisci...
Definition: discretefractureintensivequantities.hh:48
Contains the quantities which are are constant within a finite volume in the discret fracture immisci...
The base class for the problems of ECFV discretizations which deal with a multi-phase flow through a ...
A fully-implicit multi-phase flow model which assumes immiscibility of the phases and is able to incl...
Definition: discretefracturemodel.hh:50
This class expresses all intensive quantities of the discrete fracture model.
Definition: discretefractureextensivequantities.hh:45
#define NEW_TYPE_TAG(...)
Define a new type tag.
Definition: propertysystem.hh:169
Calculates the local residual of the discrete fracture immiscible multi-phase model.
static std::string name()
Definition: discretefracturemodel.hh:143
#define INHERITS_FROM(...)
Syntactic sugar for NEW_TYPE_TAG.
Definition: propertysystem.hh:230
VTK output module for quantities which make sense for all models which deal with discrete fractures i...
Represents the primary variables used by the discrete fracture multi-phase model. ...
Definition: discretefractureprimaryvariables.hh:43
static void registerParameters()
Register all run-time parameters for the immiscible model.
Definition: discretefracturemodel.hh:132
#define EWOMS_GET_PARAM(TypeTag, ParamType, ParamName)
Retrieve a runtime parameter.
Definition: parametersystem.hh:99
The base class for the problems of ECFV discretizations which deal with a multi-phase flow through a ...
Definition: discretefractureproblem.hh:56
Represents the primary variables used by the discrete fracture multi-phase model. ...
#define SET_TYPE_PROP(EffTypeTagName, PropTagName,...)
Set a property which defines a type.
Definition: propertysystem.hh:377
A fully-implicit multi-phase flow model which assumes immiscibility of the phases.
VTK output module for quantities which make sense for all models which deal with discrete fractures i...
Definition: vtkdiscretefracturemodule.hh:84
Calculates the local residual of the discrete fracture immiscible multi-phase model.
Definition: discretefracturelocalresidual.hh:42