27#ifndef DUMUX_COMBUSTION_SPATIALPARAMS_HH
28#define DUMUX_COMBUSTION_SPATIALPARAMS_HH
30#include <dune/common/parametertreeparser.hh>
45template<
class Gr
idGeometry,
class Scalar>
48 CombustionSpatialParams<GridGeometry, Scalar>>
50 using GridView =
typename GridGeometry::GridView;
51 using FVElementGeometry =
typename GridGeometry::LocalView;
52 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
53 using Element =
typename GridView::template Codim<0>::Entity;
57 enum {dimWorld = GridView::dimensionworld};
58 using GlobalPosition =
typename SubControlVolume::GlobalPosition;
73 porosity_ = getParam<Scalar>(
"SpatialParams.PorousMedium.porosity");
74 intrinsicPermeabilityOutFlow_ = getParam<Scalar>(
"SpatialParams.Outflow.permeabilityOutFlow");
75 porosityOutFlow_ = getParam<Scalar>(
"SpatialParams.Outflow.porosityOutFlow");
76 interfacialTension_ = getParam<Scalar>(
"Constants.interfacialTension");
78 Swr_ = getParam<Scalar>(
"SpatialParams.soil.Swr");
79 Snr_ = getParam<Scalar>(
"SpatialParams.soil.Snr");
81 characteristicLength_ =getParam<Scalar>(
"SpatialParams.PorousMedium.meanPoreSize");
84 intrinsicPermeability_ = (pow(characteristicLength_,2.0) * pow(porosity_, 3.0)) / (150.0 * pow((1.0-porosity_),2.0));
86 factorEnergyTransfer_ = getParam<Scalar>(
"SpatialParams.PorousMedium.factorEnergyTransfer");
87 lengthPM_ = getParam<Scalar>(
"Grid.lengthPM");
90 materialParams_.setSwr(Swr_) ;
91 materialParams_.setSnr(Snr_) ;
94 materialParams_.setP0(sqrt(porosity_/intrinsicPermeability_));
95 materialParams_.setGamma(interfacialTension_);
98 template<
class ElementSolution>
100 const SubControlVolume& scv,
101 const ElementSolution& elemSol)
const
103 const auto& globalPos = scv.dofPosition();
105 return intrinsicPermeabilityOutFlow_ ;
107 return intrinsicPermeability_ ;
118 template<
class ElementSolution>
120 const SubControlVolume& scv,
121 const ElementSolution& elemSol)
const
124 return porosityOutFlow_;
138 template<
class Sol
idSystem,
class ElementSolution>
140 const SubControlVolume& scv,
141 const ElementSolution& elemSol,
144 if (compIdx == SolidSystem::comp0Idx)
147 return 1.0-porosityOutFlow_;
156 return 1.0-porosity_;
166 template<
class Flu
idSystem>
169 return FluidSystem::phase0Idx;
177 {
return materialParams_ ; }
184 {
return characteristicLength_ ; }
191 {
return factorEnergyTransfer_; }
194 bool inOutFlow(
const GlobalPosition & globalPos)
const {
return globalPos[0] > (lengthPM_ - eps_) ; }
201 static constexpr Scalar eps_ = 1e-6;
204 Scalar intrinsicPermeability_ ;
206 Scalar factorEnergyTransfer_ ;
207 Scalar characteristicLength_ ;
211 Scalar intrinsicPermeabilityOutFlow_ ;
212 Scalar porosityOutFlow_ ;
215 Scalar interfacialTension_ ;
Description of a interfacial area between solid and fluid phase.
Implementation of the capillary pressure <-> saturation relation for the heatpipe problem.
Linear capillary pressure and relative permeability <-> saturation relations.
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
Base class for spatial parameters dealing with thermal and chemical non-equilibrium.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Description of a interfacial area between solid and fluid phase.
Definition: fluidsolidinterfacialareashiwang.hh:35
This material law takes a material law defined for effective saturations and converts it to a materia...
Definition: 2p/efftoabslaw.hh:60
AbsParamsT Params
Definition: 2p/efftoabslaw.hh:64
Implementation of the capillary pressure <-> saturation relation for the heatpipe problem.
Definition: heatpipelaw.hh:49
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fv1p.hh:334
Definition of the spatial parameters for non-equilibrium.
Definition: fvnonequilibrium.hh:39
Definition of the spatial parameters for the one component combustion problem.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:49
Scalar porosity(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the porosity which is possibly solution dependent.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:119
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:99
Scalar interfacialTension() const
Returns the interfacial tension.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:198
bool inOutFlow(const GlobalPosition &globalPos) const
Returns if the tested position is at the right end of the porous medium.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:194
const Scalar characteristicLengthAtPos(const GlobalPosition &globalPos) const
Returns the characteristic length for the mass transfer.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:183
Scalar PermeabilityType
Export the type used for the permeability.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:64
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:67
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:167
Scalar inertVolumeFraction(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, int compIdx) const
Function for defining the porosity which is possibly solution dependent.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:139
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Returns a reference to the material parameters of the material law.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:176
const Scalar factorEnergyTransferAtPos(const GlobalPosition &globalPos) const
Returns the pre factor the the energy transfer.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:190
Scalar lengthPM() const
Returns the length of the porous medium domain.
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:196
CombustionSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/mpnc/implicit/thermalnonequilibrium/spatialparams.hh:70
Defines a type tag and some properties for models using the box scheme.
This material law takes a material law defined for effective saturations and converts it to a materia...