Commit 2b87c983 authored by Beatrix Becker's avatar Beatrix Becker
Browse files

[exercise-fluidsystem] no "three" in TypeTags

parent 7cdbea00
......@@ -21,8 +21,8 @@
*
* \brief Tutorial problem for a fully coupled two phase-two component box model.
*/
#ifndef DUMUX_EXERCISE_THREE_B_PROBLEM_HH
#define DUMUX_EXERCISE_THREE_B_PROBLEM_HH
#ifndef DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH
#define DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH
// The numerical model
#include <dumux/porousmediumflow/2p2c/model.hh>
......@@ -41,31 +41,31 @@
namespace Dumux{
// Forward declaration of the problem class
template <class TypeTag> class ExerciseThreeProblemTwoPTwoC;
template <class TypeTag> class ExerciseFluidsystemProblemTwoPTwoC;
namespace Properties {
// Create a new type tag for the problem
NEW_TYPE_TAG(ExerciseThreeTwoPTwoCTypeTag, INHERITS_FROM(TwoPTwoC, BoxModel));
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTwoCTypeTag, INHERITS_FROM(TwoPTwoC, BoxModel));
// Set the "Problem" property
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, Problem, ExerciseThreeProblemTwoPTwoC<TypeTag>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, Problem, ExerciseFluidsystemProblemTwoPTwoC<TypeTag>);
// Set the spatial parameters
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, SpatialParams,
ExerciseThreeSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, SpatialParams,
ExerciseFluidsystemSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar)>);
// Set grid and the grid creator to be used
#if HAVE_DUNE_ALUGRID
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, Grid, Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, Grid, Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>);
#elif HAVE_UG
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, Grid, Dune::UGGrid<2>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, Grid, Dune::YaspGrid<2>);
#endif // HAVE_DUNE_ALUGRID
// The fluid system property
SET_PROP(ExerciseThreeTwoPTwoCTypeTag, FluidSystem)
SET_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
......@@ -81,7 +81,7 @@ public:
* \brief Tutorial problem for a fully coupled two phase-two component box model.
*/
template <class TypeTag>
class ExerciseThreeProblemTwoPTwoC : public PorousMediumFlowProblem<TypeTag>
class ExerciseFluidsystemProblemTwoPTwoC : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
......@@ -103,7 +103,7 @@ class ExerciseThreeProblemTwoPTwoC : public PorousMediumFlowProblem<TypeTag>
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
ExerciseThreeProblemTwoPTwoC(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
ExerciseFluidsystemProblemTwoPTwoC(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry)
, eps_(3e-6)
{
......
......@@ -21,8 +21,8 @@
*
* \brief Tutorial problem for a fully coupled twophase box model.
*/
#ifndef DUMUX_EXERCISE_THREE_A_PROBLEM_HH
#define DUMUX_EXERCISE_THREE_A_PROBLEM_HH
#ifndef DUMUX_EXERCISE_FLUIDSYSTEM_A_PROBLEM_HH
#define DUMUX_EXERCISE_FLUIDSYSTEM_A_PROBLEM_HH
// The numerical model
#include <dumux/porousmediumflow/2p/model.hh>
......@@ -61,31 +61,31 @@
namespace Dumux{
// Forward declaration of the problem class
template <class TypeTag> class ExerciseThreeProblemTwoP;
template <class TypeTag> class ExerciseFluidsystemProblemTwoP;
namespace Properties {
// Create a new type tag for the problem
NEW_TYPE_TAG(ExerciseThreeTwoPTypeTag, INHERITS_FROM(TwoP, BoxModel));
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTypeTag, INHERITS_FROM(TwoP, BoxModel));
// Set the "Problem" property
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, Problem, ExerciseThreeProblemTwoP<TypeTag>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, Problem, ExerciseFluidsystemProblemTwoP<TypeTag>);
// Set the spatial parameters
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, SpatialParams,
ExerciseThreeSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, SpatialParams,
ExerciseFluidsystemSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar)>);
// Set grid to be used
#if HAVE_DUNE_ALUGRID
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, Grid, Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, Grid, Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>);
#elif HAVE_UG
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, Grid, Dune::UGGrid<2>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, Grid, Dune::YaspGrid<2>);
#endif // HAVE_DUNE_ALUGRID
// we use the immiscible fluid system here
SET_PROP(ExerciseThreeTwoPTypeTag, FluidSystem)
SET_PROP(ExerciseFluidsystemTwoPTypeTag, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
......@@ -109,7 +109,7 @@ public:
* \brief Tutorial problem for a fully coupled twophase box model.
*/
template <class TypeTag>
class ExerciseThreeProblemTwoP : public PorousMediumFlowProblem<TypeTag>
class ExerciseFluidsystemProblemTwoP : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
......@@ -138,7 +138,7 @@ class ExerciseThreeProblemTwoP : public PorousMediumFlowProblem<TypeTag>
};
public:
ExerciseThreeProblemTwoP(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
ExerciseFluidsystemProblemTwoP(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry)
, eps_(3e-6)
{
......
......@@ -2,14 +2,14 @@
#part a: 2pproblem
dune_add_test(NAME exercise-fluidsystem_a
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseThreeTwoPTypeTag
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemTwoPTypeTag
COMPILE_ONLY # for testing purposes, ignore for the exercise
CMD_ARGS exercise-fluidsystem_a.input)
#part b: 2p2cproblem
dune_add_test(NAME exercise-fluidsystem_b
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseThreeTwoPTwoCTypeTag
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemTwoPTwoCTypeTag
COMPILE_ONLY # for testing purposes, ignore for the exercise
CMD_ARGS exercise-fluidsystem_b.input)
......
# Exercise #3 (DuMuX course)
# Exercise Fluidsystem
The aim of this exercise is to get familiar with the _DuMuX_ way of implementing new components (fluids) and fluid systems (mixtures). In the scope of this exercise, a new fictitious component is implemented (exercise _3a_) as well as its mixture with water (exercise _3b_).
The aim of this exercise is to get familiar with the _DuMuX_ way of implementing new components (fluids) and fluid systems (mixtures). In the scope of this exercise, a new fictitious component is implemented
(exercise-fluidsystem a) as well as its mixture with water (exercise-fluidsystem b).
## Problem set-up
......@@ -34,11 +35,11 @@ To see more components, fluidsystems and binarycoefficients implementations, hav
In the following, the basic steps required to set the desired fluid system are outlined. Here, this is done in the __problem file__, i.e. for this part of the exercise the code shown below is taken from the `2pproblem.hh` file.
In this part of the exercise we will consider a system consisting of two immiscible phases. Therefore, the _TypeTag_ for this problem (`ExerciseThreeTwoPTypeTag`) derives from
In this part of the exercise we will consider a system consisting of two immiscible phases. Therefore, the _TypeTag_ for this problem (`ExerciseFluidsystemTwoPTypeTag`) derives from
the `TwoP` _TypeTag_ (immiscible two-phase model properties) and the `BoxModel` _TypeTag_ (specifies properties of the discretization scheme).
```c++
NEW_TYPE_TAG(ExerciseThreeTwoPTypeTag, INHERITS_FROM(TwoP, BoxModel));
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTypeTag, INHERITS_FROM(TwoP, BoxModel));
```
In order to be able to derive from these _TypeTags_, the declarations of the `TwoP` _TypeTag_ and `BoxModel` _TypeTag_ have to be included.
......@@ -94,7 +95,7 @@ the other phase is liquid as well and consists of the incompressible fictitious
```c++
// we use the immiscible fluid system here
SET_PROP(ExerciseThreeTwoPTypeTag, FluidSystem)
SET_PROP(ExerciseFluidsystemTwoPTypeTag, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
......@@ -135,8 +136,8 @@ Implement an incompressible component into the file `myincompressiblecomponent.h
| Parameter | unit | value |
| -----| --------| -------- |
| $`M`$ | $`Kg/mol`$ | $`131.39 \cdot 10^{-3}`$ |
| $`\rho_{liquid}`$ | $`Kg/m^3`$ | $`1460`$ |
| $`M`$ | $`kg/mol`$ | $`131.39 \cdot 10^{-3}`$ |
| $`\rho_{liquid}`$ | $`kg/m^3`$ | $`1460`$ |
| $`\mu_{liquid}`$ | $`Pa \cdot s`$ | $`5.7 \cdot 10^{-4}`$ |
In order to do so, have a look at the files `dumux/material/components/base.hh` and `dumux/material/components/liquid.hh` to see how the interfaces are defined and overload them accordingly.
......@@ -165,7 +166,7 @@ where $`p`$ is the pressure and $`\rho_{min} = 1440 `$, $`\rho_{max} = 1480 `$ a
### 3. Implement a new fluid system
The problem file for this part of the exercise is `2p2cproblem.hh`. We now want to implement a new fluid system consisting of two liquid phases, which are water and the previously implemented compressible component. We will consider compositional effects, which is why we now have to derive our _TypeTag_ (`ExerciseThreeTwoPTwoCTypeTag`) from a _TypeTag_ (`TwoPTwoC`) that holds the miscible two-phase
The problem file for this part of the exercise is `2p2cproblem.hh`. We now want to implement a new fluid system consisting of two liquid phases, which are water and the previously implemented compressible component. We will consider compositional effects, which is why we now have to derive our _TypeTag_ (`ExerciseFluidsystemTwoPTwoCTypeTag`) from a _TypeTag_ (`TwoPTwoC`) that holds the miscible two-phase
two-component model properties:
```c++
......@@ -175,7 +176,7 @@ two-component model properties:
```c++
// Create a new type tag for the problem
NEW_TYPE_TAG(ExerciseThreeTwoPTwoCTypeTag, INHERITS_FROM(TwoPTwoC, BoxModel));
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTwoCTypeTag, INHERITS_FROM(TwoPTwoC, BoxModel));
```
The new fluid system is to be implemented in the file `fluidsystems/h2omycompressiblecomponent.hh`. This is already included in the problem and the fluid system property is set accordingly.
......@@ -187,7 +188,7 @@ The new fluid system is to be implemented in the file `fluidsystems/h2omycompres
```c++
// The fluid system property
SET_PROP(ExerciseThreeTwoPTwoCTypeTag, FluidSystem)
SET_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
......@@ -199,7 +200,7 @@ public:
In the `fluidsystems/h2omycompressiblecomponent.hh` file, your implemented compressible component and the binary coefficient files are already included.
```c++
// the ficitious component that was created in exercise 3a
// the ficitious component that was created in exercise-fluidsystem a
#include <exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh>
// the binary coefficients corresponding to this fluid system
......
......@@ -61,8 +61,8 @@ int main(int argc, char** argv) try
// define the type tag for this problem
// TYPETAG is set in CMakeLists.txt as compile time definition
// alternatively you could write `using TypeTag = TTAG(ExerciseThreeBoxTwoPTypeTag);`
// then, for the 2p2c problem you have to change this line to `using TypeTag = TTAG(ExerciseThreeBoxTwoPTypeTag);`
// alternatively you could write `using TypeTag = TTAG(ExerciseFluidsystemBoxTwoPTypeTag);`
// then, for the 2p2c problem you have to change this line to `using TypeTag = TTAG(ExerciseFluidsystemBoxTwoPTypeTag);`
// and recompile the executable
using TypeTag = TTAG(TYPETAG);
......
......@@ -22,8 +22,8 @@
* \brief The spatial parameters for the exercise-fluidsystem problem
* which uses the two-phase and two-phase two-component box model.
*/
#ifndef DUMUX_EXERCISE_THREE_SPATIAL_PARAMS_HH
#define DUMUX_EXERCISE_THREE_SPATIAL_PARAMS_HH
#ifndef DUMUX_EXERCISE_FLUIDSYSTEM_SPATIAL_PARAMS_HH
#define DUMUX_EXERCISE_FLUIDSYSTEM_SPATIAL_PARAMS_HH
// include parent spatialparameters
#include <dumux/material/spatialparams/fv.hh>
......@@ -42,10 +42,10 @@ namespace Dumux {
* which uses the two-phase and two-phase two-component box model.
*/
template<class FVGridGeometry, class Scalar>
class ExerciseThreeSpatialParams
: public FVSpatialParams<FVGridGeometry, Scalar, ExerciseThreeSpatialParams<FVGridGeometry, Scalar>>
class ExerciseFluidsystemSpatialParams
: public FVSpatialParams<FVGridGeometry, Scalar, ExerciseFluidsystemSpatialParams<FVGridGeometry, Scalar>>
{
using ThisType = ExerciseThreeSpatialParams<FVGridGeometry, Scalar>;
using ThisType = ExerciseFluidsystemSpatialParams<FVGridGeometry, Scalar>;
using ParentType = FVSpatialParams<FVGridGeometry, Scalar, ThisType>;
using GridView = typename FVGridGeometry::GridView;
......@@ -66,7 +66,7 @@ public:
*
* \param fvGridGeometry The finite volume grid geometry
*/
ExerciseThreeSpatialParams(std::shared_ptr<const FVGridGeometry>& fvGridGeometry)
ExerciseFluidsystemSpatialParams(std::shared_ptr<const FVGridGeometry>& fvGridGeometry)
: ParentType(fvGridGeometry)
, K_(0)
, KLens_(0)
......
......@@ -21,8 +21,8 @@
*
* \brief Tutorial problem for a fully coupled two phase-two component box model.
*/
#ifndef DUMUX_EXERCISE_THREE_B_PROBLEM_HH
#define DUMUX_EXERCISE_THREE_B_PROBLEM_HH
#ifndef DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH
#define DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH
// The numerical model
#include <dumux/porousmediumflow/2p2c/model.hh>
......@@ -41,32 +41,32 @@
namespace Dumux{
// Forward declaration of the problem class
template <class TypeTag> class ExerciseThreeProblemTwoPTwoC;
template <class TypeTag> class ExerciseFluidsystemProblemTwoPTwoC;
namespace Properties {
// Create a new type tag for the problem
NEW_TYPE_TAG(ExerciseThreeTwoPTwoCTypeTag, INHERITS_FROM(TwoPTwoC));
NEW_TYPE_TAG(ExerciseThreeBoxTwoPTwoCTypeTag, INHERITS_FROM(BoxModel, ExerciseThreeTwoPTwoCTypeTag));
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTwoCTypeTag, INHERITS_FROM(TwoPTwoC));
NEW_TYPE_TAG(ExerciseFluidsystemBoxTwoPTwoCTypeTag, INHERITS_FROM(BoxModel, ExerciseFluidsystemTwoPTwoCTypeTag));
// Set the "Problem" property
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, Problem, ExerciseThreeProblemTwoPTwoC<TypeTag>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, Problem, ExerciseFluidsystemProblemTwoPTwoC<TypeTag>);
// Set the spatial parameters
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, SpatialParams,
ExerciseThreeSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, SpatialParams,
ExerciseFluidsystemSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar)>);
// Set grid and the grid creator to be used
#if HAVE_DUNE_ALUGRID
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, Grid, Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, Grid, Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>);
#elif HAVE_UG
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, Grid, Dune::UGGrid<2>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(ExerciseThreeTwoPTwoCTypeTag, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, Grid, Dune::YaspGrid<2>);
#endif // HAVE_DUNE_ALUGRID
// The fluid system property
SET_PROP(ExerciseThreeTwoPTwoCTypeTag, FluidSystem)
SET_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
......@@ -82,7 +82,7 @@ public:
* \brief Tutorial problem for a fully coupled two phase-two component box model.
*/
template <class TypeTag>
class ExerciseThreeProblemTwoPTwoC : public PorousMediumFlowProblem<TypeTag>
class ExerciseFluidsystemProblemTwoPTwoC : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
......@@ -104,7 +104,7 @@ class ExerciseThreeProblemTwoPTwoC : public PorousMediumFlowProblem<TypeTag>
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
ExerciseThreeProblemTwoPTwoC(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
ExerciseFluidsystemProblemTwoPTwoC(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry)
, eps_(3e-6)
{
......
......@@ -21,8 +21,8 @@
*
* \brief Tutorial problem for a fully coupled twophase box model.
*/
#ifndef DUMUX_EXERCISE_THREE_A_PROBLEM_HH
#define DUMUX_EXERCISE_THREE_A_PROBLEM_HH
#ifndef DUMUX_EXERCISE_FLUIDSYSTEM_A_PROBLEM_HH
#define DUMUX_EXERCISE_FLUIDSYSTEM_A_PROBLEM_HH
// The numerical model
#include <dumux/porousmediumflow/2p/model.hh>
......@@ -61,32 +61,32 @@
namespace Dumux{
// Forward declaration of the problem class
template <class TypeTag> class ExerciseThreeProblemTwoP;
template <class TypeTag> class ExerciseFluidsystemProblemTwoP;
namespace Properties {
// Create a new type tag for the problem
NEW_TYPE_TAG(ExerciseThreeTwoPTypeTag, INHERITS_FROM(TwoP));
NEW_TYPE_TAG(ExerciseThreeBoxTwoPTypeTag, INHERITS_FROM(BoxModel, ExerciseThreeTwoPTypeTag));
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTypeTag, INHERITS_FROM(TwoP));
NEW_TYPE_TAG(ExerciseFluidsystemBoxTwoPTypeTag, INHERITS_FROM(BoxModel, ExerciseFluidsystemTwoPTypeTag));
// Set the "Problem" property
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, Problem, ExerciseThreeProblemTwoP<TypeTag>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, Problem, ExerciseFluidsystemProblemTwoP<TypeTag>);
// Set the spatial parameters
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, SpatialParams,
ExerciseThreeSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, SpatialParams,
ExerciseFluidsystemSpatialParams<typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar)>);
// Set grid to be used
#if HAVE_DUNE_ALUGRID
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, Grid, Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, Grid, Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>);
#elif HAVE_UG
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, Grid, Dune::UGGrid<2>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(ExerciseThreeTwoPTypeTag, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, Grid, Dune::YaspGrid<2>);
#endif // HAVE_DUNE_ALUGRID
// we use the immiscible fluid system here
SET_PROP(ExerciseThreeTwoPTypeTag, FluidSystem)
SET_PROP(ExerciseFluidsystemTwoPTypeTag, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
......@@ -110,7 +110,7 @@ public:
* \brief Tutorial problem for a fully coupled twophase box model.
*/
template <class TypeTag>
class ExerciseThreeProblemTwoP : public PorousMediumFlowProblem<TypeTag>
class ExerciseFluidsystemProblemTwoP : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
......@@ -139,7 +139,7 @@ class ExerciseThreeProblemTwoP : public PorousMediumFlowProblem<TypeTag>
};
public:
ExerciseThreeProblemTwoP(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
ExerciseFluidsystemProblemTwoP(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry)
, eps_(3e-6)
{
......
......@@ -2,13 +2,13 @@
#part a: 2pproblem
dune_add_test(NAME exercise-fluidsystem_a_solution
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseThreeBoxTwoPTypeTag
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemBoxTwoPTypeTag
CMD_ARGS exercise-fluidsystem_a.input)
#part b: 2p2cproblem
dune_add_test(NAME exercise-fluidsystem_b_solution
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseThreeBoxTwoPTwoCTypeTag
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemBoxTwoPTwoCTypeTag
CMD_ARGS exercise-fluidsystem_b.input)
# add exercises to the common target
......
......@@ -61,8 +61,8 @@ int main(int argc, char** argv) try
// define the type tag for this problem
// TYPETAG is set in CMakeLists.txt as compile time definition
// alternatively you could write `using TypeTag = TTAG(ExerciseThreeBoxTwoPTypeTag);`
// then, for the 2p2c problem you have to change this line to `using TypeTag = TTAG(ExerciseThreeBoxTwoPTypeTag);`
// alternatively you could write `using TypeTag = TTAG(ExerciseFluidsystemBoxTwoPTypeTag);`
// then, for the 2p2c problem you have to change this line to `using TypeTag = TTAG(ExerciseFluidsystemBoxTwoPTwoCTypeTag);`
// and recompile the executable
using TypeTag = TTAG(TYPETAG);
......
......@@ -22,8 +22,8 @@
* \brief The spatial parameters for the exercise-fluidsystem problem
* which uses the two-phase and two-phase two-component box model.
*/
#ifndef DUMUX_EXERCISE_THREE_SPATIAL_PARAMS_HH
#define DUMUX_EXERCISE_THREE_SPATIAL_PARAMS_HH
#ifndef DUMUX_EXERCISE_FLUIDSYSTEM_SPATIAL_PARAMS_HH
#define DUMUX_EXERCISE_FLUIDSYSTEM_SPATIAL_PARAMS_HH
// include parent spatialparameters
#include <dumux/material/spatialparams/fv.hh>
......@@ -42,10 +42,10 @@ namespace Dumux {
* which uses the two-phase and two-phase two-component box model.
*/
template<class FVGridGeometry, class Scalar>
class ExerciseThreeSpatialParams
: public FVSpatialParams<FVGridGeometry, Scalar, ExerciseThreeSpatialParams<FVGridGeometry, Scalar>>
class ExerciseFluidsystemSpatialParams
: public FVSpatialParams<FVGridGeometry, Scalar, ExerciseFluidsystemSpatialParams<FVGridGeometry, Scalar>>
{
using ThisType = ExerciseThreeSpatialParams<FVGridGeometry, Scalar>;
using ThisType = ExerciseFluidsystemSpatialParams<FVGridGeometry, Scalar>;
using ParentType = FVSpatialParams<FVGridGeometry, Scalar, ThisType>;
using GridView = typename FVGridGeometry::GridView;
......@@ -66,7 +66,7 @@ public:
*
* \param fvGridGeometry The finite volume grid geometry
*/
ExerciseThreeSpatialParams(std::shared_ptr<const FVGridGeometry>& fvGridGeometry)
ExerciseFluidsystemSpatialParams(std::shared_ptr<const FVGridGeometry>& fvGridGeometry)
: ParentType(fvGridGeometry)
, K_(0)
, KLens_(0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment