25#ifndef DUMUX_DARCY_SUBPROBLEM_HH
26#define DUMUX_DARCY_SUBPROBLEM_HH
28#include <dune/grid/yaspgrid.hh>
41template <
class TypeTag>
51template<
class TypeTag>
55template<
class TypeTag>
63template<
class TypeTag>
64struct Grid<TypeTag,
TTag::DarcyOneP> {
using type = Dune::YaspGrid<2>; };
66template<
class TypeTag>
75template <
class TypeTag>
86 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
87 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
92 using Element =
typename GridView::template Codim<0>::Entity;
93 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
105 verticalFlow_ = problemName_.find(
"vertical") != std::string::npos;
111 const std::string&
name()
const
126 {
return 273.15 + 10; }
141 BoundaryTypes
boundaryTypes(
const Element &element,
const SubControlVolumeFace &scvf)
const
143 BoundaryTypes values;
144 values.setAllNeumann();
146 if (
couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf))
147 values.setAllCouplingNeumann();
151 if (onLowerBoundary_(scvf.center()))
152 values.setAllDirichlet();
166 PrimaryVariables
dirichlet(
const Element &element,
const SubControlVolumeFace &scvf)
const
182 template<
class ElementVolumeVariables,
class ElementFluxVarsCache>
184 const FVElementGeometry& fvGeometry,
185 const ElementVolumeVariables& elemVolVars,
186 const ElementFluxVarsCache& elemFluxVarsCache,
187 const SubControlVolumeFace& scvf)
const
189 NumEqVector values(0.0);
191 if (
couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf))
192 values[Indices::conti0EqIdx] =
couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf);
212 template<
class ElementVolumeVariables>
213 NumEqVector
source(
const Element &element,
214 const FVElementGeometry& fvGeometry,
215 const ElementVolumeVariables& elemVolVars,
216 const SubControlVolume &scv)
const
217 {
return NumEqVector(0.0); }
229 PrimaryVariables
initial(
const Element &element)
const
231 return PrimaryVariables(0.0);
238 {
return *couplingManager_; }
242 bool onLowerBoundary_(
const GlobalPosition &globalPos)
const
243 {
return globalPos[1] < this->
gridGeometry().bBoxMin()[1] + eps_; }
246 std::shared_ptr<CouplingManager> couplingManager_;
247 std::string problemName_;
Properties for all models using cell-centered finite volume scheme with TPFA.
A much simpler (and thus potentially less buggy) version of pure water.
A liquid phase consisting of a single component.
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition parameters.hh:438
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition parameters.hh:428
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
Definition common/properties.hh:47
Type tag for numeric models.
Definition grid.hh:35
Class to specify the type of a boundary.
Definition common/boundarytypes.hh:38
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
A liquid phase consisting of a single component.
Definition 1pliquid.hh:46
Definition multidomain/couplingmanager.hh:46
Base class for all fully implicit porous media problems.
Definition dumux/porousmediumflow/problem.hh:39
Definition 1p_2p/problem_darcy.hh:79
const CouplingManager & couplingManager() const
Get the coupling manager.
Definition 1p2c_1p2c/diffusionlawcomparison/problem_darcy.hh:266
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_1p/problem_darcy.hh:98
NumEqVector neumann(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVarsCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
Evaluates the boundary conditions for a Neumann control volume.
Definition 1p_1p/problem_darcy.hh:183
PrimaryVariables dirichlet(const Element &element, const SubControlVolumeFace &scvf) const
Evaluates the boundary conditions for a Dirichlet control volume.
Definition 1p_1p/problem_darcy.hh:166
Scalar temperature() const
Returns the temperature within the domain in [K].
Definition 1p_1p/problem_darcy.hh:125
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 cont...
Definition 1p_1p/problem_darcy.hh:141
const std::string & name() const
The problem name.
Definition 1p_1p/problem_darcy.hh:111
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_1p/problem_darcy.hh:213
The spatial parameters class for the test problem using the 1p cc model.
Definition multidomain/boundary/stokesdarcy/1p2c_1p2c/spatialparams.hh:41
Definition 1p_1p/problem_darcy.hh:47
std::tuple< OneP, CCTpfaModel > InheritsFrom
Definition 1p_1p/problem_darcy.hh:47
Dumux::DarcySubProblem< TypeTag > type
Definition 1p_1p/problem_darcy.hh:52
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition 1p_1p/problem_darcy.hh:58
FluidSystems::OnePLiquid< Scalar, Dumux::Components::SimpleH2O< Scalar > > type
Definition 1p_1p/problem_darcy.hh:59
Dune::YaspGrid< 2 > type
Definition 1p_1p/problem_darcy.hh:64
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition 1p_1p/problem_darcy.hh:69
OnePSpatialParams< GridGeometry, Scalar > type
Definition 1p_1p/problem_darcy.hh:71
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition 1p_1p/problem_darcy.hh:70
A single-phase, isothermal flow model using the fully implicit scheme.
Base class for all porous media problems.
The spatial parameters class for the test problem using the 1p cc model.