// In this file, we generate the random permeability field in the constructor of the `OnePTestSpatialParams` class. Thereafter, spatial properties of the porous medium such as the permeability and the porosity are defined in various functions for the 1p problem.
// In this file, we generate a random permeability field in the constructor of the `OnePTestSpatialParams` class.
// We want to generate a random permeability field. For this, we use a random number generation of the C++ standard library.
// For this, we use the random number generation facilities provided by the C++ standard library.
#include <random>
#include <random>
// In the file `properties.hh` all properties are declared.
// We use the properties for porous medium flow models, declared in the file `properties.hh`.
#include <dumux/porousmediumflow/properties.hh>
#include <dumux/porousmediumflow/properties.hh>
// We include the spatial parameters for single-phase, finite volumes from which we will inherit.
// We include the spatial parameters class for single-phase models discretized by finite volume schemes.
// The spatial parameters defined for this example will inherit from those.
#include <dumux/material/spatialparams/fv1p.hh>
#include <dumux/material/spatialparams/fv1p.hh>
namespaceDumux{
namespaceDumux{
// In the `OnePTestSpatialParams` class, we define all functions needed to describe the porous matrix, e.g. porosity and permeability for the 1p_problem.
// In the `OnePTestSpatialParams` class, we define all functions needed to describe the porous medium, e.g. porosity and permeability for the 1p_problem.
template<classGridGeometry,classScalar>
template<classGridGeometry,classScalar>
classOnePTestSpatialParams
classOnePTestSpatialParams
:publicFVSpatialParamsOneP<GridGeometry,Scalar,
:publicFVSpatialParamsOneP<GridGeometry,Scalar,
OnePTestSpatialParams<GridGeometry,Scalar>>
OnePTestSpatialParams<GridGeometry,Scalar>>
{
{
// We introduce `using` declarations that are derived from the property system, which we need in this class.
// We declare aliases for types that we are going to need in this class.
// We generate random fields for the permeability using a lognormal distribution, with the `permeability_` as mean value and 10 % of it as standard deviation. A seperate distribution is used for the lens using `permeabilityLens_`.
// We generate random fields for the permeability using lognormal distributions, with `permeability_` as mean value and 10 % of it as standard deviation.
// A separate distribution is used for the lens using `permeabilityLens_`. A permeability value is created for each element of the grid and is stored in the vector `K_`.
// We define the (intrinsic) permeability $`[m^2]`$ using the generated random permeability field. In this test, we use element-wise distributed permeabilities.
// This function returns the permeability $`[m^2]`$ to be used within a sub-control volume (`scv`) inside the element `element`.
// One can define the permeability as function of the primary variables on the element, which are given in the provided `ElementSolution`.
// Here, we use element-wise distributed permeabilities that were randomly generated in the constructor (see above).