2cnistokes2p2cnispatialparams.hh 8.59 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
 *   See the file COPYING for full copying permissions.                      *
 *                                                                           *
 *   This program is free software: you can redistribute it and/or modify    *
 *   it under the terms of the GNU General Public License as published by    *
 *   the Free Software Foundation, either version 2 of the License, or       *
 *   (at your option) any later version.                                     *
 *                                                                           *
 *   This program is distributed in the hope that it will be useful,         *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
 *   GNU General Public License for more details.                            *
 *                                                                           *
 *   You should have received a copy of the GNU General Public License       *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.   *
 *****************************************************************************/
19
20
21
22
23
24
25
26
/*!
 * \file
 *
 * \brief Spatial parameters for the
 *        coupling of an non-isothermal two-component Stokes
 *        and an non-isothermal two-phase two-component Darcy model.
 */

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef DUMUX_TWOCNISTOKES2P2CNISPATIALPARAMS_HH
#define DUMUX_TWOCNISTOKES2P2CNISPATIALPARAMS_HH

#include <dumux/material/spatialparams/implicitspatialparams.hh>
#include <dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh>
#include <dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh>
#include <dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh>

namespace Dumux
{
//forward declaration
template<class TypeTag>
class TwoCNIStokesTwoPTwoCNISpatialParams;

namespace Properties
{
// The spatial parameters TypeTag
NEW_TYPE_TAG(TwoCNIStokesTwoPTwoCNISpatialParams);

// Set the spatial parameters
SET_TYPE_PROP(TwoCNIStokesTwoPTwoCNISpatialParams, SpatialParams,
Thomas Fetzer's avatar
Thomas Fetzer committed
48
              TwoCNIStokesTwoPTwoCNISpatialParams<TypeTag>);
49

Thomas Fetzer's avatar
Thomas Fetzer committed
50
51
52
53
54
// Set the material law parametrized by absolute saturations
SET_TYPE_PROP(TwoCNIStokesTwoPTwoCNISpatialParams,
              MaterialLaw,
              EffToAbsLaw<RegularizedVanGenuchten<typename GET_PROP_TYPE(TypeTag, Scalar)>>);
//               EffToAbsLaw<RegularizedBrooksCorey<typename GET_PROP_TYPE(TypeTag, Scalar)> >);
55
56
57
58
}


/*!
59
 * \ingroup ImplicitTestProblems
Hao Wu's avatar
Hao Wu committed
60
 * \ingroup TwoPTwoCNIStokesTwoCNIModel
61
62
63
 * \brief Definition of the spatial parameters for
 *        the coupling of an non-isothermal two-component Stokes
 *        and an non-isothermal two-phase two-component Darcy model.
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
 */
template<class TypeTag>
class TwoCNIStokesTwoPTwoCNISpatialParams : public ImplicitSpatialParams<TypeTag>
{
    typedef ImplicitSpatialParams<TypeTag> ParentType;
    typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
    typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
    typedef typename GridView::ctype CoordScalar;

    enum {
        dim=GridView::dimension,
        dimWorld=GridView::dimensionworld
    };

    typedef Dune::FieldVector<CoordScalar,dim> LocalPosition;
    typedef Dune::FieldVector<CoordScalar,dimWorld> GlobalPosition;
    typedef Dune::FieldVector<CoordScalar,dimWorld> DimVector;

    typedef typename GridView::IndexSet IndexSet;
    typedef typename GridView::template Codim<0>::Iterator ElementIterator;
    typedef typename GridView::template Codim<0>::Entity Element;

    typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
    typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables;
    typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;

    typedef std::vector<Scalar> PermeabilityType;
    typedef typename GET_PROP(TypeTag, ParameterTree) ParameterTree;
    typedef typename GridView::template Codim<dim>::Iterator VertexIterator;

public:
    typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
    typedef typename MaterialLaw::Params MaterialLawParams;
    typedef std::vector<MaterialLawParams> MaterialLawParamsVector;

    /*!
100
101
102
     * \brief Spatial parameters for the
     *        coupling of an isothermal two-component Stokes
     *        and an isothermal two-phase two-component Darcy model.
103
     *
104
     * \param gridView The GridView which is used by the problem
105
106
     */
    TwoCNIStokesTwoPTwoCNISpatialParams(const GridView& gridView)
Thomas Fetzer's avatar
Thomas Fetzer committed
107
        : ParentType(gridView)
108
    {
Thomas Fetzer's avatar
Thomas Fetzer committed
109
110
111
112
113
114
115
116
117
118
        porosity_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, Porosity);
        permeability_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, Permeability);
        lambdaSolid_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LambdaSolid);

        // residual saturations
        params_.setSwr(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, Swr));
        params_.setSnr(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, Snr));
        // parameters for the vanGenuchten law
        params_.setVgAlpha(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, VgAlpha));
        params_.setVgn(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, VgN));
119
120
121
    }

    /*!
122
     * \brief Returns the intrinsic permeability tensor \f$[m^2]\f$
123
     *
124
125
126
     * \param element The finite element
     * \param fvGeometry The finite volume geometry of the element
     * \param scvIdx The local index of the sub-control volume
127
128
129
130
131
     */
    const Scalar intrinsicPermeability(const Element &element,
                                 	   const FVElementGeometry &fvGeometry,
                                 	   const int scvIdx) const
    {
Thomas Fetzer's avatar
Thomas Fetzer committed
132
        return permeability_;
133
134
    }

135
136
137
138
139
140
141
    /*!
     * \brief Returns the porosity \f$[-]\f$
     *
     * \param element The finite element
     * \param fvGeometry The finite volume geometry of the element
     * \param scvIdx The local index of the sub-control volume
     */
142
143
144
145
    Scalar porosity(const Element &element,
                    const FVElementGeometry &fvGeometry,
                    const int scvIdx) const
    {
Thomas Fetzer's avatar
Thomas Fetzer committed
146
        return porosity_;
147
148
    }

149
150
151
152
153
154
155
    /*!
     * \brief Returns the parameter object for the material law
     *
     * \param element The finite element
     * \param fvGeometry The finite volume geometry of the element
     * \param scvIdx The local index of the sub-control volume
     */
156
157
158
159
    const MaterialLawParams& materialLawParams(const Element &element,
                                               const FVElementGeometry &fvGeometry,
                                               const int scvIdx) const
    {
Thomas Fetzer's avatar
Thomas Fetzer committed
160
        return params_;
161
162
163
    }

    /*!
164
     * \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix.
165
     *
166
     * This is only required for non-isothermal models.
167
168
     *
     * \param element The finite element
169
170
171
172
173
174
175
     * \param fvGeometry The finite volume geometry
     * \param scvIdx The local index of the sub-control volume
     */
    Scalar solidHeatCapacity(const Element &element,
                             const FVElementGeometry &fvGeometry,
                             const int scvIdx) const
    {
Thomas Fetzer's avatar
Thomas Fetzer committed
176
        return 790;
177
178
179
180
181
182
183
184
185
    }

    /*!
     * \brief Returns the mass density \f$[kg / m^3]\f$ of the rock matrix.
     *
     * This is only required for non-isothermal models.
     *
     * \param element The finite element
     * \param fvGeometry The finite volume geometry
186
     * \param scvIdx The local index of the sub-control volume
187
     */
188
    Scalar solidDensity(const Element &element,
189
190
191
                        const FVElementGeometry &fvGeometry,
                        const int scvIdx) const
    {
192
        return 2700; // density of granite [kg/m^3]
193
194
195
    }

    /*!
196
     * \brief Returns the thermal conductivity \f$\mathrm{[W/(m K)]}\f$ of the solid
197
     *
198
     * This is only required for non-isothermal models.
199
     *
200
201
202
     * \param element The finite element
     * \param fvGeometry The finite volume geometry of the element
     * \param scvIdx The local index of the sub-control volume
203
     */
204
    Scalar solidThermalConductivity(const Element &element,
205
206
207
                                    const FVElementGeometry &fvGeometry,
                                    const int scvIdx) const
    {
Thomas Fetzer's avatar
Thomas Fetzer committed
208
        return lambdaSolid_;
209
210
211
    }

private:
Thomas Fetzer's avatar
Thomas Fetzer committed
212
213
214
215
    Scalar permeability_;
    Scalar porosity_;
    Scalar lambdaSolid_;
    MaterialLawParams params_;
216
217
};

Thomas Fetzer's avatar
Thomas Fetzer committed
218
} // end namespace Dumux
219

220
#endif // DUMUX_TWOCNISTOKES2P2CNISPATIALPARAMS_HH