25#ifndef DUMUX_FRACTURE_PROBLEM_HH
26#define DUMUX_FRACTURE_PROBLEM_HH
28#include <dune/foamgrid/foamgrid.hh>
45template <
class TypeTag>
class FractureProblem;
55template<
class TypeTag>
56struct Grid<TypeTag, TTag::Fracture> {
using type = Dune::FoamGrid<2, 3>; };
58template<
class TypeTag>
60template<
class TypeTag>
62template<
class TypeTag>
64template<
class TypeTag>
66template<
class TypeTag>
68template<
class TypeTag>
72template<
class TypeTag>
76template<
class TypeTag>
84template<
class TypeTag>
88template<
class TypeTag>
100template <
class TypeTag>
111 using GridView =
typename GridGeometry::GridView;
112 using FVElementGeometry =
typename GridGeometry::LocalView;
113 using SubControlVolume =
typename GridGeometry::SubControlVolume;
116 using Element =
typename GridView::template Codim<0>::Entity;
117 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
123 std::shared_ptr<typename ParentType::SpatialParams>
spatialParams,
130 name_ = getParam<std::string>(
"Vtk.OutputName") +
"_" + getParamFromGroup<std::string>(this->
paramGroup(),
"Problem.Name");
139 template<
class ElementSolution>
141 const SubControlVolume &scv,
142 const ElementSolution& elemSol)
const
144 static const Scalar aperture = getParamFromGroup<Scalar>(
"Fracture",
"SpatialParams.Aperture");
158 const std::string&
name()
const
166 {
return 273.15 + 37.0; }
182 BoundaryTypes values;
183 values.setAllNeumann();
184 if (globalPos[0] < this->
gridGeometry().bBoxMin()[0] + eps_)
185 values.setAllDirichlet();
186 else if (globalPos[0] > this->
gridGeometry().bBoxMax()[0] - eps_)
187 values.setAllDirichlet();
200 if (globalPos[0] < this->
gridGeometry().bBoxMin()[0] + eps_)
201 return PrimaryVariables(2e5);
203 return PrimaryVariables(1e5);
244 template<
class ElementVolumeVariables>
246 const Element &element,
247 const FVElementGeometry& fvGeometry,
248 const ElementVolumeVariables& elemVolVars,
249 const SubControlVolume &scv)
const
252 const Scalar pressure3D = this->
couplingManager().bulkPriVars(source.id())[Indices::pressureIdx];
253 const Scalar pressure1D = this->
couplingManager().lowDimPriVars(source.id())[Indices::pressureIdx];
256 const Scalar meanDistance = this->
couplingManager().averageDistance(source.id());
257 static const Scalar matrixPerm = getParamFromGroup<Scalar>(
"Matrix",
"SpatialParams.Permeability");
258 static const Scalar rho = getParam<Scalar>(
"Component.LiquidDensity");
259 static const Scalar mu = getParam<Scalar>(
"Component.LiquidKinematicViscosity")*rho;
260 const Scalar sourceValue = rho*(pressure3D - pressure1D)/meanDistance*matrixPerm/mu;
273 {
return PrimaryVariables(1e5); }
282 for (
const auto& element : elements(this->
gridGeometry().gridView()))
285 fvGeometry.bindElement(element);
287 auto elemVolVars =
localView(gridVars.curGridVolVars());
288 elemVolVars.bindElement(element, fvGeometry, sol);
290 for (
auto&& scv : scvs(fvGeometry))
292 auto pointSources = this->
scvPointSources(element, fvGeometry, elemVolVars, scv);
293 pointSources *= scv.volume()*elemVolVars[scv].extrusionFactor();
298 std::cout <<
"Global integrated source (1D): " <<
source <<
'\n';
303 {
return *couplingManager_; }
307 static constexpr Scalar eps_ = 1.5e-7;
310 std::shared_ptr<CouplingManager> couplingManager_;
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Properties for all models using cell-centered finite volume scheme with TPFA.
Setting constant fluid properties via the input file.
A liquid phase consisting of a single component.
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition: localview.hh:38
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
Class to specify the type of a boundary.
Definition: common/boundarytypes.hh:38
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:50
NumEqVector scvPointSources(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Adds contribution of point sources for a specific sub control volume to the values....
Definition: common/fvproblem.hh:435
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition: common/fvproblem.hh:592
NumEqVector source(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Evaluate the source term for all phases within a given sub-control-volume.
Definition: common/fvproblem.hh:327
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:588
A point source base class.
Definition: pointsource.hh:49
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
Definition: common/properties.hh:91
Definition: common/properties.hh:169
If disabled, the volume variables are not stored (reduces memory, but is slower)
Definition: common/properties.hh:178
specifies if data on flux vars should be saved (faster, but more memory consuming)
Definition: common/properties.hh:188
specifies if the parameters for the advective fluxes depend on the solution
Definition: common/properties.hh:210
specifies if the parameters for the diffusive fluxes depend on the solution
Definition: common/properties.hh:214
specifies if the parameters for the heat conduction fluxes depend on the solution
Definition: common/properties.hh:218
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
Element-wise calculation of the residual and its derivatives for a single-phase, incompressible,...
Definition: 1p/incompressiblelocalresidual.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
Exact solution 1D-3D.
Definition: test/porousmediumflow/2p/implicit/fracture/problem.hh:109
void pointSource(PointSource &source, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Evaluates the point sources (added by addPointSources) for all phases within a given sub-control volu...
Definition: problem_fracture.hh:245
void addPointSources(std::vector< PointSource > &pointSources) const
Applies a vector of point sources which are possibly solution dependent.
Definition: problem_fracture.hh:223
FractureProblem(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< typename ParentType::SpatialParams > spatialParams, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="Fracture")
Definition: problem_fracture.hh:122
Scalar temperature() const
Returns the temperature within the domain in [K].
Definition: problem_fracture.hh:165
const std::string & name() const
The problem name.
Definition: problem_fracture.hh:158
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet control volume.
Definition: problem_fracture.hh:198
void computeSourceIntegral(const SolutionVector &sol, const GridVariables &gridVars)
Definition: problem_fracture.hh:279
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_fracture.hh:180
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition: problem_fracture.hh:272
Scalar extrusionFactor(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns how much the domain is extruded at a given sub-control volume.
Definition: problem_fracture.hh:140
const CouplingManager & couplingManager() const
Get the coupling manager.
Definition: problem_fracture.hh:302
Definition: problem_fracture.hh:51
std::tuple< OneP, CCTpfaModel > InheritsFrom
Definition: problem_fracture.hh:51
Dune::FoamGrid< 2, 3 > type
Definition: problem_fracture.hh:56
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: problem_fracture.hh:79
Definition of the spatial parameters for the matrix and fracture problem.
Definition: multidomain/embedded/2d3d/1p_1p/spatialparams.hh:39
Declares all properties used in Dumux.
A single-phase, isothermal flow model using the fully implicit scheme.
Base class for all porous media problems.
Element-wise calculation of the residual and its derivatives for a single-phase, incompressible,...
Definition of the spatial parameters for the MaxwellStefan problem.