24#ifndef DUMUX_POROELASTIC_SUBPROBLEM_HH
25#define DUMUX_POROELASTIC_SUBPROBLEM_HH
27#include <dune/grid/yaspgrid.hh>
28#include <dune/common/fmatrix.hh>
42template <
class TypeTag>
43class PoroElasticSubProblem;
52template<
class TypeTag>
53struct Grid<TypeTag, TTag::PoroElasticSub> {
using type = Dune::YaspGrid<3>; };
55template<
class TypeTag>
59template<
class TypeTag>
67template<
class TypeTag>
79template<
class TypeTag>
93 using FVElementGeometry =
typename GridGeometry::LocalView;
94 using SubControlVolume =
typename GridGeometry::SubControlVolume;
97 using Element =
typename GridView::template Codim<0>::Entity;
98 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
100 static constexpr int dim = GridView::dimension;
101 static constexpr int dimWorld = GridView::dimensionworld;
102 using GradU = Dune::FieldMatrix<Scalar, dim, dimWorld>;
106 std::shared_ptr<CouplingManager> couplingManagerPtr,
107 const std::string&
paramGroup =
"PoroElastic")
109 , couplingManagerPtr_(couplingManagerPtr)
111 problemName_ = getParam<std::string>(
"Vtk.OutputName") +
"_" + getParamFromGroup<std::string>(this->
paramGroup(),
"Problem.Name");
117 const std::string&
name()
const
128 {
return PrimaryVariables(0.0); }
132 {
return PrimaryVariables(0.0); }
136 {
return PrimaryVariables(0.0); }
144 const auto pmFlowVolVars =
couplingManager().getPMFlowVolVars(element);
146 Scalar wPhaseDensity = pmFlowVolVars.density(FluidSystem::phase0Idx);
147 Scalar nPhaseDensity = pmFlowVolVars.density(FluidSystem::phase1Idx);
148 Scalar Sw = pmFlowVolVars.saturation(FluidSystem::phase0Idx);
149 Scalar Sn = pmFlowVolVars.saturation(FluidSystem::phase1Idx);
150 return (wPhaseDensity * Sw + nPhaseDensity * Sn);
156 template<
class FluxVarsCache >
158 const FVElementGeometry& fvGeometry,
159 const ElementVolumeVariables& elemVolVars,
160 const FluxVarsCache& fluxVarsCache)
const
163 const auto pmFlowVolVars =
couplingManager().getPMFlowVolVars(element);
165 Scalar pw = pmFlowVolVars.pressure(FluidSystem::phase0Idx);
166 Scalar pn = pmFlowVolVars.pressure(FluidSystem::phase1Idx);
167 Scalar Sw = pmFlowVolVars.saturation(FluidSystem::phase0Idx);
168 Scalar Sn = pmFlowVolVars.saturation(FluidSystem::phase1Idx);
169 return (pw * Sw + pn * Sn);
180 BoundaryTypes values;
181 values.setAllDirichlet();
189 PrimaryVariables
source(
const Element& element,
190 const FVElementGeometry& fvGeometry,
191 const ElementVolumeVariables& elemVolVars,
192 const SubControlVolume& scv)
const
193 {
return PrimaryVariables(0.0); }
197 {
return *couplingManagerPtr_; }
200 std::shared_ptr<const CouplingManager> couplingManagerPtr_;
201 static constexpr Scalar eps_ = 3e-6;
202 std::string problemName_;
Defines a type tag and some properties for models using the box scheme.
A compositional fluid with brine (H2O & NaCl) and carbon dioxide as components in both the liquid and...
Provides the class with the tabulated values of CO2.
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
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition: common/fvproblem.hh:592
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 liquid phase consisting of a single component.
Definition: 1pliquid.hh:46
A compositional fluid with brine (H2O & NaCl) and carbon dioxide as components in both the liquid and...
Definition: brineco2.hh:119
Base class for all fully implicit porous media problems.
Definition: dumux/porousmediumflow/problem.hh:39
Definition of the spatial parameters for the poro-elastic problem.
Definition: geomechanics/poroelastic/spatialparams.hh:42
The poro-elastic sub-problem in the el1p coupled problem.
Definition: el2p/problem_poroelastic.hh:81
static constexpr Scalar temperature()
Returns the temperature in the domain.
Definition: el2p/problem_poroelastic.hh:123
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition: el2p/problem_poroelastic.hh:127
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Neumann boundary segment.
Definition: el2p/problem_poroelastic.hh:135
PrimaryVariables 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: el2p/problem_poroelastic.hh:189
PoroElasticSubProblem(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManagerPtr, const std::string ¶mGroup="PoroElastic")
Definition: el2p/problem_poroelastic.hh:105
Scalar effectivePorePressure(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const FluxVarsCache &fluxVarsCache) const
Returns the effective pore pressure.
Definition: el2p/problem_poroelastic.hh:157
const CouplingManager & couplingManager() const
Returns reference to the coupling manager.
Definition: el1p/problem_poroelastic.hh:185
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet boundary segment.
Definition: el2p/problem_poroelastic.hh:131
const std::string & name() const
The problem name.
Definition: el2p/problem_poroelastic.hh:117
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition: el2p/problem_poroelastic.hh:178
Scalar effectiveFluidDensity(const Element &element, const SubControlVolume &scv) const
Returns the effective fluid density.
Definition: el2p/problem_poroelastic.hh:141
Definition: el1p/problem_poroelastic.hh:50
std::tuple< PoroElastic, BoxModel > InheritsFrom
Definition: el1p/problem_poroelastic.hh:50
Dune::YaspGrid< 2 > type
Definition: el1p/problem_poroelastic.hh:54
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: el2p/problem_poroelastic.hh:62
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 poro-elastic problem.