24#ifndef DUMUX_WATER_AIR_SPATIAL_PARAMS_HH
25#define DUMUX_WATER_AIR_SPATIAL_PARAMS_HH
42template<
class Gr
idGeometry,
class Scalar>
45 WaterAirSpatialParams<GridGeometry, Scalar>>
47 using GridView =
typename GridGeometry::GridView;
48 using FVElementGeometry =
typename GridGeometry::LocalView;
49 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
50 using Element =
typename GridView::template Codim<0>::Entity;
54 static constexpr int dimWorld = GridView::dimensionworld;
58 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
77 coarsePorosity_ = 0.3;
80 fineMaterialParams_.setSwr(0.2);
81 fineMaterialParams_.setSnr(0.0);
82 coarseMaterialParams_.setSwr(0.2);
83 coarseMaterialParams_.setSnr(0.0);
86 fineMaterialParams_.setPe(1e4);
87 coarseMaterialParams_.setPe(1e4);
88 fineMaterialParams_.setLambda(2.0);
89 coarseMaterialParams_.setLambda(2.0);
91 plotFluidMatrixInteractions_ = getParam<bool>(
"Output.PlotFluidMatrixInteractions");
103 plotMaterialLaw.addpcswcurve(gnuplot, fineMaterialParams_, 0.2, 1.0,
"fine",
"w lp");
104 plotMaterialLaw.addpcswcurve(gnuplot, coarseMaterialParams_, 0.2, 1.0,
"coarse",
"w l");
106 gnuplot.
setOption(
"set label \"residual\\nsaturation\" at 0.1,100000 center");
107 gnuplot.
plot(
"pc-Sw");
110 plotMaterialLaw.addkrcurves(gnuplot, fineMaterialParams_, 0.2, 1.0,
"fine");
111 plotMaterialLaw.addkrcurves(gnuplot, coarseMaterialParams_, 0.2, 1.0,
"coarse");
123 if (isFineMaterial_(globalPos))
135 if (isFineMaterial_(globalPos))
136 return finePorosity_;
138 return coarsePorosity_;
150 if (isFineMaterial_(globalPos))
151 return fineMaterialParams_;
153 return coarseMaterialParams_;
162 template<
class Flu
idSystem>
164 {
return FluidSystem::H2OIdx; }
167 bool isFineMaterial_(
const GlobalPosition &globalPos)
const
168 {
return globalPos[dimWorld-1] > layerBottom_; }
174 Scalar finePorosity_;
175 Scalar coarsePorosity_;
180 bool plotFluidMatrixInteractions_;
Interface for passing data sets to a file and plotting them, if gnuplot is installed.
Interface for plotting the multi-component-matrix-interaction laws.
Interface for plotting the two-phase fluid-matrix-interaction laws.
Interface for plotting the non-isothermal two-phase fluid-matrix-interaction laws.
Implementation of a regularized version of the Brooks-Corey capillary pressure / relative permeabilit...
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Interface for passing data sets to a file and plotting them, if gnuplot is installed.
Definition: gnuplotinterface.hh:57
void plot(const std::string &filename="")
Plots the files for a specific window number, writes a gnuplot and png file.
Definition: gnuplotinterface.hh:89
void resetAll(const bool persist=true)
Resets all gnuplot parameters.
Definition: gnuplotinterface.hh:164
void setOption(const std::string &option)
Sets additional user-defined options.
Definition: gnuplotinterface.hh:325
void setOpenPlotWindow(bool openPlotWindow)
Define whether the gnuplot window should be opened.
Definition: gnuplotinterface.hh:335
Interface for plotting the two-phase fluid-matrix-interaction laws.
Definition: plotmateriallaw.hh:42
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 regularized Brooks-Corey capillary pressure / relative permeability <-> saturat...
Definition: regularizedbrookscorey.hh:62
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
Definition: fv.hh:57
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fv1p.hh:334
Definition of the spatial parameters for the water-air problem.
Definition: porousmediumflow/2p2c/implicit/waterair/spatialparams.hh:46
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Defines the porosity of the spatial parameters.
Definition: porousmediumflow/2p2c/implicit/waterair/spatialparams.hh:133
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Returns the parameter object for the Brooks-Corey material law which depends on the position.
Definition: porousmediumflow/2p2c/implicit/waterair/spatialparams.hh:148
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/2p2c/implicit/waterair/spatialparams.hh:163
Scalar permeabilityAtPos(const GlobalPosition &globalPos) const
Applies the intrinsic permeability tensor to a pressure potential gradient.
Definition: porousmediumflow/2p2c/implicit/waterair/spatialparams.hh:121
Scalar PermeabilityType
Export the type used for the permeability.
Definition: porousmediumflow/2p2c/implicit/waterair/spatialparams.hh:62
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/2p2c/implicit/waterair/spatialparams.hh:65
void plotMaterialLaw()
This is called from the problem and creates a gnuplot output of e.g the pc-Sw curve.
Definition: porousmediumflow/2p2c/implicit/waterair/spatialparams.hh:98
WaterAirSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/2p2c/implicit/waterair/spatialparams.hh:67
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...