26#ifndef DUMUX_COLUMNXYLOLPROBLEM_HH
27#define DUMUX_COLUMNXYLOLPROBLEM_HH
29#include <dune/grid/yaspgrid.hh>
51template <
class TypeTag>
63template<
class TypeTag>
64struct Grid<TypeTag, TTag::Column> {
using type = Dune::YaspGrid<2>; };
67template<
class TypeTag>
71template<
class TypeTag>
75template<
class TypeTag>
84template<
class TypeTag>
95template<
class TypeTag>
129template <
class TypeTag >
143 pressureIdx = Indices::pressureIdx,
144 switch1Idx = Indices::switch1Idx,
145 switch2Idx = Indices::switch2Idx,
146 temperatureIdx = Indices::temperatureIdx,
149 energyEqIdx = Indices::energyEqIdx,
150 contiWEqIdx = Indices::conti0EqIdx + FluidSystem::wCompIdx,
151 contiGEqIdx = Indices::conti0EqIdx + FluidSystem::gCompIdx,
152 contiNEqIdx = Indices::conti0EqIdx + FluidSystem::nCompIdx,
155 threePhases = Indices::threePhases
161 using Element =
typename GridView::template Codim<0>::Entity;
162 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
166 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
173 name_ = getParam<std::string>(
"Problem.Name");
204 BoundaryTypes bcTypes;
205 if (globalPos[1] < eps_)
206 bcTypes.setAllDirichlet();
208 bcTypes.setAllNeumann();
221 return initial_(globalPos);
234 NumEqVector values(0.0);
237 if (globalPos[1] > this->
gridGeometry().bBoxMax()[1] - eps_)
239 values[contiWEqIdx] = -0.395710;
240 values[contiGEqIdx] = -0.000001;
241 values[contiNEqIdx] = -0.00;
242 values[energyEqIdx] = -17452.97;
260 return initial_(globalPos);
271 template<
class VTKWriter>
275 Kxx_.resize(gg.numDofs());
276 vtk.addField(Kxx_,
"permeability");
278 for (
const auto& element : elements(this->gridView()))
281 fvGeometry.bindElement(element);
283 for (
const auto& scv : scvs(fvGeometry))
284 Kxx_[scv.dofIndex()] = this->
spatialParams().intrinsicPermeabilityAtPos(scv.dofPosition());
291 PrimaryVariables initial_(
const GlobalPosition &globalPos)
const
293 PrimaryVariables values;
294 values.setState(threePhases);
295 const auto y = globalPos[1];
298 values[temperatureIdx] = 296.15;
299 values[pressureIdx] = 1.e5;
300 values[switch1Idx] = 0.005;
303 values[switch2Idx] = 0.112;
304 else if (y > yMax - 0.0148 - eps_)
305 values[switch2Idx] = 0 + ((yMax - y)/0.0148)*0.112;
306 else if (y > yMax - 0.0296 - eps_)
307 values[switch2Idx] = 0.112 + (((yMax - y) - 0.0148)/0.0148)*(0.120 - 0.112);
308 else if (y > yMax - 0.0444 - eps_)
309 values[switch2Idx] = 0.120 + (((yMax - y) - 0.0296)/0.0148)*(0.125 - 0.120);
310 else if (y > yMax - 0.0592 - eps_)
311 values[switch2Idx] = 0.125 + (((yMax - y) - 0.0444)/0.0148)*(0.137 - 0.125);
312 else if (y > yMax - 0.0740 - eps_)
313 values[switch2Idx] = 0.137 + (((yMax - y) - 0.0592)/0.0148)*(0.150 - 0.137);
314 else if (y > yMax - 0.0888 - eps_)
315 values[switch2Idx] = 0.150 + (((yMax - y) - 0.0740)/0.0148)*(0.165 - 0.150);
316 else if (y > yMax - 0.1036 - eps_)
317 values[switch2Idx] = 0.165 + (((yMax - y) - 0.0888)/0.0148)*(0.182 - 0.165);
318 else if (y > yMax - 0.1184 - eps_)
319 values[switch2Idx] = 0.182 + (((yMax - y) - 0.1036)/0.0148)*(0.202 - 0.182);
320 else if (y > yMax - 0.1332 - eps_)
321 values[switch2Idx] = 0.202 + (((yMax - y) - 0.1184)/0.0148)*(0.226 - 0.202);
322 else if (y > yMax - 0.1480 - eps_)
323 values[switch2Idx] = 0.226 + (((yMax - y) - 0.1332)/0.0148)*(0.257 - 0.226);
324 else if (y > yMax - 0.1628 - eps_)
325 values[switch2Idx] = 0.257 + (((yMax - y) - 0.1480)/0.0148)*(0.297 - 0.257);
326 else if (y > yMax - 0.1776 - eps_)
327 values[switch2Idx] = 0.297 + (((yMax - y) - 0.1628)/0.0148)*(0.352 - 0.297);
328 else if (y > yMax - 0.1924 - eps_)
329 values[switch2Idx] = 0.352 + (((yMax - y) - 0.1776)/0.0148)*(0.426 - 0.352);
330 else if (y > yMax - 0.2072 - eps_)
331 values[switch2Idx] = 0.426 + (((yMax - y) - 0.1924)/0.0148)*(0.522 - 0.426);
332 else if (y > yMax - 0.2220 - eps_)
333 values[switch2Idx] = 0.522 + (((yMax - y) - 0.2072)/0.0148)*(0.640 - 0.522);
334 else if (y > yMax - 0.2368 - eps_)
335 values[switch2Idx] = 0.640 + (((yMax - y) - 0.2220)/0.0148)*(0.767 - 0.640);
336 else if (y > yMax - 0.2516 - eps_)
337 values[switch2Idx] = 0.767 + (((yMax - y) - 0.2368)/0.0148)*(0.878 - 0.767);
338 else if (y > yMax - 0.2664 - eps_)
339 values[switch2Idx] = 0.878 + (((yMax - y) - 0.2516)/0.0148)*(0.953 - 0.878);
340 else if (y > yMax - 0.2812 - eps_)
341 values[switch2Idx] = 0.953 + (((yMax - y) - 0.2664)/0.0148)*(0.988 - 0.953);
342 else if (y > yMax - 0.3000 - eps_)
343 values[switch2Idx] = 0.988;
345 values[switch2Idx] = 1.e-4;
349 static constexpr Scalar eps_ = 1e-6;
351 std::vector<Scalar> Kxx_;
Defines a type tag and some properties for models using the box scheme.
Properties for all models using cell-centered finite volume scheme with TPFA.
Setting constant fluid properties via the input file.
A three-phase fluid system featuring gas, NAPL and water as phases and distilled water and air (Pseu...
Represents all relevant thermodynamic quantities of a inert solid system.
A solid phase consisting of a single inert solid 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
Property tag Indices
Definition: porousmediumflow/sequential/properties.hh:59
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:50
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:588
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
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
The type of the solid system to use.
Definition: common/properties.hh:227
The type of the solid state to use.
Definition: common/properties.hh:229
A component which returns run time specified values for all fluid properties.
Definition: constant.hh:58
A three-phase fluid system featuring gas, NAPL and water as phases and distilled water and air (Pseu...
Definition: h2oairxylene.hh:56
Represents all relevant thermodynamic quantities of a inert solid system.
Definition: inertsolidstate.hh:35
A solid phase consisting of a single inert solid component.
Definition: inertsolidphase.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
Non-isothermal injection problem where water is injected into a sand column with a NAPL contamination...
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:131
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet boundary segment.
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:219
ColumnProblem(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:169
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:258
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:202
void addVtkFields(VTKWriter &vtk)
Appends all quantities of interest which can be derived from the solution of the current time step to...
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:272
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Neumann boundary segment.
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:232
const std::string name() const
The problem name.
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:186
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:57
std::tuple< ThreePThreeCNI > InheritsFrom
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:57
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:58
std::tuple< Column, BoxModel > InheritsFrom
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:58
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:59
std::tuple< Column, CCTpfaModel > InheritsFrom
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:59
Dune::YaspGrid< 2 > type
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:64
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:78
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:98
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: test/porousmediumflow/3p3c/implicit/columnxylol/problem.hh:99
Definition of the spatial parameters for the column problem.
Definition: porousmediumflow/3p3c/implicit/columnxylol/spatialparams.hh:43
Adaption of the fully implicit scheme to the three-phase three-component flow model.
Base class for all porous media problems.
Definition of the spatial parameters for the MaxwellStefan problem.