25#ifndef DUMUX_POROELASTIC_PROBLEM_HH
26#define DUMUX_POROELASTIC_PROBLEM_HH
28#include <dune/common/fmatrix.hh>
29#include <dune/grid/yaspgrid.hh>
42template <
class TypeTag>
43class PoroElasticProblem;
51template<
class TypeTag>
52struct Grid<TypeTag, TTag::TestPoroElastic> {
using type = Dune::YaspGrid<2>; };
54template<
class TypeTag>
57template<
class TypeTag>
64template<
class TypeTag>
76template<
class TypeTag>
89 using FVElementGeometry =
typename GridGeometry::LocalView;
90 using SubControlVolume =
typename GridGeometry::SubControlVolume;
91 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
94 using Element =
typename GridView::template Codim<0>::Entity;
95 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
97 static constexpr Scalar pi = M_PI;
98 static constexpr int dim = GridView::dimension;
99 static constexpr int dimWorld = GridView::dimensionworld;
100 using GradU = Dune::FieldMatrix<Scalar, dim, dimWorld>;
113 {
return PrimaryVariables(0.0); }
117 {
return PrimaryVariables(0.0); }
151 BoundaryTypes values;
152 values.setAllDirichlet();
160 NumEqVector
source(
const Element& element,
161 const FVElementGeometry& fvGeometry,
162 const ElementVolumeVariables& elemVolVars,
163 const SubControlVolume& scv)
const
168 const auto ipGlobal = scv.center();
169 const auto x = ipGlobal[0];
170 const auto y = ipGlobal[1];
173 const auto& lameParams = this->
spatialParams().lameParamsAtPos(scv.center());
174 const auto lambda = lameParams.lambda();
175 const auto mu = lameParams.mu();
178 const Scalar pi_2 = 2.0*pi;
179 const Scalar pi_2_square = pi_2*pi_2;
180 const Scalar cos_2pix = cos(pi_2*x);
181 const Scalar sin_2pix = sin(pi_2*x);
182 const Scalar cos_2piy = cos(pi_2*y);
183 const Scalar sin_2piy = sin(pi_2*y);
185 const Scalar dE11_dx = -2.0*sin_2piy;
186 const Scalar dE22_dx = pi_2_square*cos_2pix*cos_2piy;
187 const Scalar dE11_dy = pi_2*(1.0-2.0*x)*cos_2piy;
188 const Scalar dE22_dy = -1.0*pi_2_square*sin_2pix*sin_2piy;
189 const Scalar dE12_dy = 0.5*pi_2_square*(cos_2pix*cos_2piy - (x-x*x)*sin_2piy);
190 const Scalar dE21_dx = 0.5*((1.0-2*x)*pi_2*cos_2piy - pi_2_square*sin_2pix*sin_2piy);
193 PrimaryVariables divSigma(0.0);
194 divSigma[Indices::momentum(0)] = lambda*(dE11_dx + dE22_dx) + 2*mu*(dE11_dx + dE12_dy);
195 divSigma[Indices::momentum(1)] = lambda*(dE11_dy + dE22_dy) + 2*mu*(dE21_dx + dE22_dy);
206 const auto x = globalPos[0];
207 const auto y = globalPos[1];
209 PrimaryVariables exact(0.0);
210 exact[Indices::momentum(0)] = (x-x*x)*sin(2*pi*y);
211 exact[Indices::momentum(1)] = sin(2*pi*x)*sin(2*pi*y);
223 const auto x = globalPos[0];
224 const auto y = globalPos[1];
226 static constexpr int xIdx = Indices::momentum(0);
227 static constexpr int yIdx = Indices::momentum(1);
229 GradU exactGrad(0.0);
230 exactGrad[xIdx][xIdx] = (1-2*x)*sin(2*pi*y);
231 exactGrad[xIdx][yIdx] = (x - x*x)*2*pi*cos(2*pi*y);
232 exactGrad[yIdx][xIdx] = 2*pi*cos(2*pi*x)*sin(2*pi*y);
233 exactGrad[yIdx][yIdx] = 2*pi*sin(2*pi*x)*cos(2*pi*y);
238 static constexpr Scalar eps_ = 3e-6;
Defines a type tag and some properties for models using the box scheme.
Setting constant fluid properties via the input file.
A liquid phase consisting of a single component.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
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:149
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:588
The DUNE grid type.
Definition: common/properties.hh:57
Property to specify the type of a problem which has to be solved.
Definition: common/properties.hh:69
The type of the spatial parameters object.
Definition: common/properties.hh:221
The type of the fluid system to use.
Definition: common/properties.hh:223
Base class for all geomechanical problems.
Definition: geomechanics/fvproblem.hh:68
A component which returns run time specified values for all fluid properties.
Definition: constant.hh:58
A liquid phase consisting of a single component.
Definition: 1pliquid.hh:46
Base class for all fully implicit porous media problems.
Definition: dumux/porousmediumflow/problem.hh:39
SpatialParams & spatialParams()
Returns the spatial parameters object.
Definition: dumux/porousmediumflow/problem.hh:146
Problem definition for the deformation of a poro-elastic body.
Definition: test/geomechanics/poroelastic/problem.hh:78
GradU exactGradient(const GlobalPosition &globalPos) const
Evaluates the exact displacement gradient to this problem at a given position.
Definition: test/geomechanics/poroelastic/problem.hh:218
Scalar effectivePorePressureAtPos(const GlobalPosition &globalPos) const
Returns the effective pore pressure.
Definition: test/geomechanics/poroelastic/problem.hh:140
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition: test/geomechanics/poroelastic/problem.hh:149
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet boundary segment.
Definition: test/geomechanics/poroelastic/problem.hh:116
Scalar effectiveFluidDensityAtPos(const GlobalPosition &globalPos) const
Returns the effective fluid density.
Definition: test/geomechanics/poroelastic/problem.hh:124
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition: test/geomechanics/poroelastic/problem.hh:112
NumEqVector source(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Evaluates the source term for all phases within a given sub-control volume.
Definition: test/geomechanics/poroelastic/problem.hh:160
PoroElasticProblem(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: test/geomechanics/poroelastic/problem.hh:103
static constexpr Scalar temperature()
Returns the temperature in the domain.
Definition: test/geomechanics/poroelastic/problem.hh:108
PrimaryVariables exactSolution(const GlobalPosition &globalPos) const
Evaluates the exact displacement to this problem at a given position.
Definition: test/geomechanics/poroelastic/problem.hh:202
Definition: test/geomechanics/poroelastic/problem.hh:48
std::tuple< PoroElastic, BoxModel > InheritsFrom
Definition: test/geomechanics/poroelastic/problem.hh:48
Dune::YaspGrid< 2 > type
Definition: test/geomechanics/poroelastic/problem.hh:52
Definition of the spatial parameters for the poro-elastic problem.
Definition: geomechanics/poroelastic/spatialparams.hh:42
Base class for all geomechanical problems.
Defines a type tag and some properties for the poroelastic geomechanical model.
Definition of the spatial parameters for the MaxwellStefan problem.