25#ifndef DUMUX_TEST_TPFAFACETCOUPLING_TRACER_BULK_PROBLEM_HH
26#define DUMUX_TEST_TPFAFACETCOUPLING_TRACER_BULK_PROBLEM_HH
28#include <dune/alugrid/grid.hh>
45template <
class TypeTag>
46class TracerBulkProblem;
60template<
class TypeTag>
61struct Grid<TypeTag, TTag::TracerTestBulk> {
using type = Dune::ALUGrid<2, 2, Dune::simplex, Dune::conforming>; };
64template<
class TypeTag>
66template<
class TypeTag>
70template<
class TypeTag>
74template<
class TypeTag>
83template<
class TypeTag>
84struct UseMoles<TypeTag, TTag::TracerTestBulk> {
static constexpr bool value =
false; };
87template<
class TypeTag>
97template<
class TypeTag>
106template <
class TypeTag>
115 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
116 using FVElementGeometry =
typename GridGeometry::LocalView;
124 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
126 using Element =
typename GridGeometry::GridView::template Codim<0>::Entity;
127 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
141 const auto problemName = getParamFromGroup<std::string>(this->
paramGroup(),
"Problem.Name");
142 std::cout<<
"problem " << problemName <<
" uses " << (useMoles ?
"mole" :
"mass") <<
" fractions" <<
'\n';
143 problemName_ = getParamFromGroup<std::string>(this->
paramGroup(),
"Vtk.OutputName") +
"_" + problemName;
147 const std::string&
name()
const
148 {
return problemName_; }
158 BoundaryTypes values;
159 values.setAllNeumann();
166 BoundaryTypes values;
167 values.setAllNeumann();
178 if (isInContaminatedRegion_(globalPos))
179 return PrimaryVariables(initialMassFraction_);
180 return PrimaryVariables(0.0);
195 template<
class ElementVolumeVariables,
class ElementFluxVarsCache>
197 const FVElementGeometry& fvGeometry,
198 const ElementVolumeVariables& elemVolVars,
199 const ElementFluxVarsCache& elemFluxVarsCache,
200 const SubControlVolumeFace& scvf)
const
203 const auto flux = this->
spatialParams().volumeFlux(element, fvGeometry, elemVolVars, scvf);
206 const auto& insideVolVars = elemVolVars[fvGeometry.scv(scvf.insideScvIdx())];
207 const auto tracerFlux = insideVolVars.massFraction(0, 0)*flux;
208 return NumEqVector(tracerFlux);
211 return NumEqVector(0.0);
216 {
return *couplingManagerPtr_; }
219 bool isInContaminatedRegion_(
const GlobalPosition& globalPos)
const
221 return globalPos[0] > 0.75 && globalPos[0] < 1.3
222 && globalPos[1] > 5.3 && globalPos[1] < 5.8;
225 std::shared_ptr<CouplingManager> couplingManagerPtr_;
226 Scalar initialMassFraction_;
227 std::string problemName_;
Fluid system for the tracer facet coupling test.
The model traits used in the tracer facet coupling test.
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition: parameters.hh:438
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
Traits class encapsulating model specifications.
Definition: common/properties.hh:65
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 for the calculation the advective fluxes.
Definition: common/properties.hh:208
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
Evaluates a user given velocity field.
Definition: stationaryvelocityfield.hh:41
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
GetPropType< TypeTag, Properties::SpatialParams > SpatialParams
Export spatial parameter type.
Definition: dumux/porousmediumflow/problem.hh:58
The problem for the bulk domain of the tracer facet coupling test.
Definition: problem_tracer_bulk.hh:108
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: problem_tracer_bulk.hh:196
const CouplingManager & couplingManager() const
Returns reference to the coupling manager.
Definition: problem_tracer_bulk.hh:215
const std::string & name() const
The problem name.
Definition: problem_tracer_bulk.hh:147
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition: problem_tracer_bulk.hh:156
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition: problem_tracer_bulk.hh:176
TracerBulkProblem(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< SpatialParams > spatialParams, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="")
Definition: problem_tracer_bulk.hh:132
BoundaryTypes interiorBoundaryTypes(const Element &element, const SubControlVolumeFace &scvf) const
Specifies the type of interior boundary condition at a given position.
Definition: problem_tracer_bulk.hh:164
Definition: problem_tracer_bulk.hh:51
std::tuple< Tracer > InheritsFrom
Definition: problem_tracer_bulk.hh:51
Definition: problem_tracer_bulk.hh:54
std::tuple< CCTpfaFacetCouplingModel, TracerTestBulk > InheritsFrom
Definition: problem_tracer_bulk.hh:54
Definition: problem_tracer_bulk.hh:55
std::tuple< CCMpfaFacetCouplingModel, TracerTestBulk > InheritsFrom
Definition: problem_tracer_bulk.hh:55
Definition: problem_tracer_bulk.hh:56
std::tuple< BoxFacetCouplingModel, TracerTestBulk > InheritsFrom
Definition: problem_tracer_bulk.hh:56
Dune::ALUGrid< 2, 2, Dune::simplex, Dune::conforming > type
Definition: problem_tracer_bulk.hh:61
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: problem_tracer_bulk.hh:78
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition: problem_tracer_bulk.hh:77
Definition of the spatial parameters for the tracer problem.
Definition: multidomain/facet/tracer_tracer/spatialparams_tracer.hh:41
Custom model traits disabling diffusion.
Definition: tracermodeltraits.hh:35
A simple fluid system with one tracer component.
Definition: 1ptracer/problem_tracer.hh:89
Properties (and default properties) for all models using the box scheme together with coupling across...
Properties (and default properties) for all models using cell-centered finite volume scheme with MPFA...
Properties (and default properties) for all models using cell-centered finite volume scheme with TPFA...
Adaption of the fully implicit scheme to the tracer transport model.
Base class for all porous media problems.
Definition of the spatial parameters for the tracer problem.