3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
box/effectivestresslaw.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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program 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 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
25#ifndef DUMUX_DISCRETIZATION_BOX_EFFECTIVE_STRESS_LAW_HH
26#define DUMUX_DISCRETIZATION_BOX_EFFECTIVE_STRESS_LAW_HH
27
31
32namespace Dumux {
33
41template<class StressType, class GridGeometry>
42class EffectiveStressLaw<StressType, GridGeometry, typename GridGeometry::DiscretizationMethod>
43{
44 using FVElementGeometry = typename GridGeometry::LocalView;
45 using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
46 using Extrusion = Extrusion_t<GridGeometry>;
47
48 using GridView = typename GridGeometry::GridView;
49 using Element = typename GridView::template Codim<0>::Entity;
50
51 static constexpr int dim = GridView::dimension;
52 static constexpr int dimWorld = GridView::dimensionworld;
53 static_assert(dim == dimWorld, "EffectiveStressLaw not implemented for network/surface grids");
54 static_assert(StressType::discMethod == DiscretizationMethods::box, "The provided stress type must be specialized for the box scheme");
55
56public:
58 using Scalar = typename StressType::Scalar;
60 using StressTensor = typename StressType::StressTensor;
62 using ForceVector = typename StressType::ForceVector;
64
66 // state the discretization method this implementation belongs to
67 static constexpr DiscretizationMethod discMethod{};
68
72 template<class Problem, class ElementVolumeVariables, class ElementFluxVarsCache>
73 static ForceVector force(const Problem& problem,
74 const Element& element,
75 const FVElementGeometry& fvGeometry,
76 const ElementVolumeVariables& elemVolVars,
77 const SubControlVolumeFace& scvf,
78 const ElementFluxVarsCache& elemFluxVarCache)
79 {
80 const auto sigma = stressTensor(problem, element, fvGeometry, elemVolVars, elemFluxVarCache[scvf]);
81
82 ForceVector scvfForce(0.0);
83 sigma.mv(scvf.unitOuterNormal(), scvfForce);
84 scvfForce *= Extrusion::area(fvGeometry, scvf);
85
86 return scvfForce;
87 }
88
90 template<class Problem, class ElementVolumeVariables, class FluxVarsCache>
91 static StressTensor stressTensor(const Problem& problem,
92 const Element& element,
93 const FVElementGeometry& fvGeometry,
94 const ElementVolumeVariables& elemVolVars,
95 const FluxVarsCache& fluxVarsCache)
96 {
97 // compute the purely mechanical stress
98 auto sigma = StressType::stressTensor(problem, element, fvGeometry, elemVolVars, fluxVarsCache);
99
100 // obtain biot coefficient and effective pore pressure
101 const auto biotCoeff = problem.spatialParams().biotCoefficient(element, fvGeometry, elemVolVars, fluxVarsCache);
102 const auto effPress = problem.spatialParams().effectivePorePressure(element, fvGeometry, elemVolVars, fluxVarsCache);
103
104 // subtract pore pressure from the diagonal entries
105 const auto bcp = biotCoeff*effPress;
106 for (int i = 0; i < dim; ++i)
107 sigma[i][i] -= bcp;
108
109 return sigma;
110 }
111
113 template<class Problem, class ElementVolumeVariables, class FluxVarsCache>
114 static StressTensor effectiveStressTensor(const Problem& problem,
115 const Element& element,
116 const FVElementGeometry& fvGeometry,
117 const ElementVolumeVariables& elemVolVars,
118 const FluxVarsCache& fluxVarsCache)
119 { return StressType::stressTensor(problem, element, fvGeometry, elemVolVars, fluxVarsCache); }
120};
121
122} // end namespace Dumux
123
124#endif
Helper classes to compute the integration elements.
The available discretization methods in Dumux.
Effective stress are used to describe the actual stresses acting on the grains/matrix in the soil....
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:251
constexpr Box box
Definition: method.hh:136
CVFE< CVFEMethods::PQ1 > Box
Definition: method.hh:83
Definition: method.hh:58
typename StressType::ForceVector ForceVector
export the type used for force vectors
Definition: box/effectivestresslaw.hh:62
static StressTensor stressTensor(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const FluxVarsCache &fluxVarsCache)
assembles the (total) stress tensor of the porous medium at a given integration point
Definition: box/effectivestresslaw.hh:91
typename StressType::Scalar Scalar
export the type used for scalar values
Definition: box/effectivestresslaw.hh:58
static StressTensor effectiveStressTensor(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const FluxVarsCache &fluxVarsCache)
assembles the (effective) stress tensor of the solid skeleton at a given integration point
Definition: box/effectivestresslaw.hh:114
static ForceVector force(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const ElementFluxVarsCache &elemFluxVarCache)
Computes the force (in Newton) acting on a sub-control volume face.
Definition: box/effectivestresslaw.hh:73
typename StressType::StressTensor StressTensor
export the type used for the stress tensor
Definition: box/effectivestresslaw.hh:60
This computes the stress tensor and surface forces resulting from poro-mechanical deformation.
Definition: effectivestresslaw_fwd.hh:39