25#ifndef DUMUX_ONEP_SUB_TEST_PROBLEM_HH
26#define DUMUX_ONEP_SUB_TEST_PROBLEM_HH
28#include <dune/common/indices.hh>
43template<
class TypeTag, std::
size_t tag>
50 using FVElementGeometry =
typename GridGeometry::LocalView;
51 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
52 using GridView =
typename GridGeometry::GridView;
53 using Element =
typename GridView::template Codim<0>::Entity;
57 using Indices =
typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
60 static constexpr int dimWorld = GridView::dimensionworld;
61 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
62 static constexpr auto domainIdx = Dune::index_constant<tag>{};
66 std::shared_ptr<CouplingManager> couplingManager,
69 , couplingManager_(couplingManager)
78 const std::string&
name()
const
91 const SubControlVolumeFace &scvf)
const
94 values.setAllDirichlet();
96 if (couplingManager_->isCoupled(domainIdx, scvf))
97 values.setAllCouplingNeumann();
117 template<
class ElementVolumeVariables,
class ElementFluxVarsCache>
119 const FVElementGeometry& fvGeometry,
120 const ElementVolumeVariables& elemVolVars,
121 const ElementFluxVarsCache& elemFluxVarsCache,
122 const SubControlVolumeFace& scvf)
const
124 NumEqVector values(0.0);
126 if (bcTypes.hasCouplingNeumann())
127 values[Indices::conti0EqIdx] = couplingManager_->advectiveFluxCoupling(domainIdx, element, fvGeometry, elemVolVars, scvf, FluidSystem::phase0Idx);
141 PrimaryVariables values(0.0);
142 values[Indices::pressureIdx] = 1.0e6;
143 if (NumEqVector::dimension > 1)
144 values[Indices::pressureIdx + 1] = 1e-10;
160 template<
class Po
intSource>
163 NumEqVector values(0.0);
165 if (NumEqVector::dimension > 1)
166 values[Indices::conti0EqIdx + 1] = injectionRate_;
167 pointSources.emplace_back(GlobalPosition(0.0), values);
192 Scalar injectionRate_;
193 std::shared_ptr<CouplingManager> couplingManager_;
194 static constexpr Scalar eps_ = 1e-7;
195 std::string problemName_;
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
const std::string & paramGroup() const
Definition common/fvproblem.hh:592
const GridGeometry & gridGeometry() const
Definition common/fvproblem.hh:588
Base class for all fully implicit porous media problems.
Definition dumux/porousmediumflow/problem.hh:39
PorousMediumFlowProblem(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< SpatialParams > spatialParams, const std::string ¶mGroup="")
Constructor, passing the spatial parameters.
Definition dumux/porousmediumflow/problem.hh:67
Multidomain test problem for the incompressible one-phase model.
Definition test/multidomain/boundary/darcydarcy/1p_1p/problem.hh:45
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 test/multidomain/boundary/darcydarcy/1p_2p/problem.hh:90
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet control volume.
Definition test/multidomain/boundary/darcydarcy/1p_2p/problem.hh:139
void addPointSources(std::vector< PointSource > &pointSources) const
Applies a vector of point sources which are possibly solution dependent.
Definition test/multidomain/boundary/darcydarcy/1p_2p/problem.hh:161
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition test/multidomain/boundary/darcydarcy/1p_2p/problem.hh:187
Scalar temperature() const
Returns the temperature for an isothermal problem.
Definition test/multidomain/boundary/darcydarcy/1p_2p/problem.hh:177
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 boundary segment.
Definition test/multidomain/boundary/darcydarcy/1p_2p/problem.hh:118
const std::string & name() const
The problem name.
Definition test/multidomain/boundary/darcydarcy/1p_2p/problem.hh:78
OnePTestProblem(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="")
Definition test/multidomain/boundary/darcydarcy/1p_2p/problem.hh:65
Base class for all porous media problems.
The spatial parameters for the incompressible test.