25#ifndef DUMUX_DARCY_SUBPROBLEM_HH
26#define DUMUX_DARCY_SUBPROBLEM_HH
28#include <dune/grid/yaspgrid.hh>
38template <
class TypeTag>
48template<
class TypeTag>
53template<
class TypeTag>
54struct Grid<TypeTag, TTag::DarcyTwoP> {
using type = Dune::YaspGrid<3>; };
56template<
class TypeTag>
57struct Grid<TypeTag, TTag::DarcyTwoP> {
using type = Dune::YaspGrid<2>; };
60template<
class TypeTag>
61struct UseMoles<TypeTag, TTag::DarcyTwoP> {
static constexpr bool value =
false; };
63template<
class TypeTag>
72template<
class TypeTag>
77template <
class TypeTag>
87 using ElementVolumeVariables =
typename GridVariables::GridVolumeVariables::LocalView;
88 using ElementFluxVariablesCache =
typename GridVariables::GridFluxVariablesCache::LocalView;
89 using VolumeVariables =
typename GridVariables::GridVolumeVariables::VolumeVariables;
92 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
93 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
102 conti0EqIdx = Indices::conti0EqIdx,
103 pressureIdx = Indices::pressureIdx,
104 saturationIdx = Indices::saturationIdx,
107 using Element =
typename GridView::template Codim<0>::Entity;
108 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
117 pressure_ = getParamFromGroup<Scalar>(this->
paramGroup(),
"Problem.Pressure");
118 saturation_ = getParamFromGroup<Scalar>(this->
paramGroup(),
"Problem.Saturation");
119 temperature_ = getParamFromGroup<Scalar>(this->
paramGroup(),
"Problem.Temperature");
120 problemName_ = getParam<std::string>(
"Vtk.OutputName") +
"_" + getParamFromGroup<std::string>(this->
paramGroup(),
"Problem.Name");
126 const std::string&
name()
const
156 {
return temperature_; }
172 const SubControlVolumeFace& scvf)
const
174 BoundaryTypes values;
176 values.setAllNeumann();
178 if(onLowerBoundary_(scvf.center()))
179 values.setAllDirichlet();
182 values.setAllCouplingNeumann();
195 PrimaryVariables
dirichlet(
const Element &element,
const SubControlVolumeFace &scvf)
const
197 PrimaryVariables values(0.0);
215 const FVElementGeometry& fvGeometry,
216 const ElementVolumeVariables& elemVolVars,
217 const ElementFluxVariablesCache& elemFluxVarsCache,
218 const SubControlVolumeFace& scvf)
const
220 NumEqVector values(0.0);
223 values =
couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf);
248 NumEqVector
source(
const Element &element,
249 const FVElementGeometry& fvGeometry,
250 const ElementVolumeVariables& elemVolVars,
251 const SubControlVolume &scv)
const
252 {
return NumEqVector(0.0); }
264 PrimaryVariables
initial(
const Element &element)
const
266 PrimaryVariables values(0.0);
267 values[pressureIdx] = pressure_;
268 values[saturationIdx] = saturation_;
279 {
return *couplingManager_; }
282 bool onLeftBoundary_(
const GlobalPosition &globalPos)
const
283 {
return globalPos[0] < this->
gridGeometry().bBoxMin()[0] + eps_; }
285 bool onRightBoundary_(
const GlobalPosition &globalPos)
const
286 {
return globalPos[0] > this->
gridGeometry().bBoxMax()[0] - eps_; }
288 bool onLowerBoundary_(
const GlobalPosition &globalPos)
const
289 {
return globalPos[1] < this->
gridGeometry().bBoxMin()[1] + eps_; }
291 bool onUpperBoundary_(
const GlobalPosition &globalPos)
const
292 {
return globalPos[1] > this->
gridGeometry().bBoxMax()[1] - eps_; }
298 std::string problemName_;
299 std::shared_ptr<CouplingManager> couplingManager_;
Properties for all models using cell-centered finite volume scheme with TPFA.
@ p1s0
first phase saturation and second phase pressure as primary variables
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
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:50
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
UndefinedProperty type
Definition: common/properties.hh:57
Property to specify the type of a problem which has to be solved.
Definition: common/properties.hh:69
Property whether to use moles or kg as amount unit for balance equations.
Definition: common/properties.hh:102
The type of the spatial parameters object.
Definition: common/properties.hh:221
The formulation of the model.
Definition: common/properties.hh:237
Base class for all fully implicit porous media problems.
Definition: dumux/porousmediumflow/problem.hh:39
Definition: 1p_2p/problem_darcy.hh:79
bool shouldWriteOutput() const
Definition: 1p_2p/problem_darcy.hh:147
const CouplingManager & couplingManager() const
Get the coupling manager.
Definition: 1p2c_1p2c/diffusionlawcomparison/problem_darcy.hh:266
bool shouldWriteRestartFile() const
Returns true if a restart file should be written to disk.
Definition: 1p_2p/problem_darcy.hh:139
PrimaryVariables initial(const Element &element) const
Evaluates the initial value for a control volume.
Definition: 1p2c_1p2c/diffusionlawcomparison/problem_darcy.hh:254
DarcySubProblem(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManager)
Definition: 1p_2p/problem_darcy.hh:113
PrimaryVariables dirichlet(const Element &element, const SubControlVolumeFace &scvf) const
Evaluates the boundary conditions for a Dirichlet control volume.
Definition: 1p_2p/problem_darcy.hh:195
NumEqVector neumann(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
Evaluates the boundary conditions for a Neumann control volume.
Definition: 1p_2p/problem_darcy.hh:214
Scalar temperature() const
Returns the temperature within the domain in [K].
Definition: 1p_2p/problem_darcy.hh:155
BoundaryTypes boundaryTypes(const Element &element, const SubControlVolumeFace &scvf) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition: 1p_2p/problem_darcy.hh:171
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: 1p_2p/problem_darcy.hh:248
const std::string & name() const
The problem name.
Definition: 1p_2p/problem_darcy.hh:126
Definition: 1p_2p/problem_darcy.hh:44
std::tuple< TwoP, CCTpfaModel > InheritsFrom
Definition: 1p_2p/problem_darcy.hh:44
Dune::YaspGrid< 2 > type
Definition: 1p_2p/problem_darcy.hh:57
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition: 1p_2p/problem_darcy.hh:66
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: 1p_2p/problem_darcy.hh:67
The spatial parameters class for the test problem using the 1p cc model.
Definition: multidomain/boundary/stokesdarcy/1p_2p/spatialparams.hh:45
Adaption of the fully implicit scheme to the two-phase flow model.
Base class for all porous media problems.
Definition of the spatial parameters for the MaxwellStefan problem.