Skip to content
Snippets Groups Projects
Commit 0c626ffb authored by Gabi Seitz's avatar Gabi Seitz
Browse files

[exercise-basic] naming conventions and remove a few typos

parent a9f21b6a
No related branches found
No related tags found
1 merge request!77Towards a more consistent DUMUX course for version 3.1
Showing
with 41 additions and 41 deletions
# the immiscible two-phase simulation program # the immiscible two-phase simulation program
dune_add_test(NAME exercise_basic_2p dune_add_test(NAME exercise_basic_2p
SOURCES exercisebasic2p.cc) SOURCES 2pmain.cc)
# the compositional two-phase two-component simulation program # the compositional two-phase two-component simulation program
dune_add_test(NAME exercise_basic_2p2c dune_add_test(NAME exercise_basic_2p2c
SOURCES exercisebasic2p2c.cc) SOURCES 2p2cmain.cc)
# here, add the two-phase non-isothermal simulation program # here, add the two-phase non-isothermal simulation program
......
...@@ -18,8 +18,8 @@ This exercise deals with two problems: a two-phase immiscible problem (__2p__) a ...@@ -18,8 +18,8 @@ This exercise deals with two problems: a two-phase immiscible problem (__2p__) a
<hr> <hr>
Locate all the files you will need for this exercise Locate all the files you will need for this exercise
* The __main file__ for the __2p__ problem : `exercisebasic2p.cc` * The __main file__ for the __2p__ problem : `2pmain.cc`
* The __main file__ for the __2p2c__ problem : `exercisebasic2p2c.cc` * The __main file__ for the __2p2c__ problem : `2p2cmain.cc`
* The __problem file__ for the __2p__ problem: `injection2pproblem.hh` * The __problem file__ for the __2p__ problem: `injection2pproblem.hh`
* The __problem file__ for the __2p2c__ problem: `injection2p2cproblem.hh` * The __problem file__ for the __2p2c__ problem: `injection2p2cproblem.hh`
* The shared __spatial parameters file__: `injection2pspatialparams.hh` * The shared __spatial parameters file__: `injection2pspatialparams.hh`
...@@ -58,15 +58,15 @@ paraview injection-2p2c.pvd ...@@ -58,15 +58,15 @@ paraview injection-2p2c.pvd
### Task 3: Setting up a new executable (for a non-isothermal simulation) ### Task 3: Setting up a new executable (for a non-isothermal simulation)
<hr> <hr>
* Copy the main file `exercise_basic_2p.cc` and rename it to `exercise_basic_2pni.cc` * Copy the main file `2pmain.cc` and rename it to `2pnimain.cc`
* In `exercise_basic_2pni.cc`, include the header `injection2pniproblem.hh` instead of `injection2pproblem.hh`. * In `2pnimain.cc`, include the header `injection2pniproblem.hh` instead of `injection2pproblem.hh`.
* In `exercise_basic_2pni.cc`, change `Injection2pCC` to `Injection2pNICC` in the line `using TypeTag = Properties::TTag::Injection2pNICC;` * In `2pnimain.cc`, change `Injection2pCC` to `Injection2pNICC` in the line `using TypeTag = Properties::TTag::Injection2pNICC;`
* Add a new executable in `CMakeLists.txt` by adding the lines * Add a new executable in `CMakeLists.txt` by adding the lines
```cmake ```cmake
# the two-phase non-isothermal simulation program # the two-phase non-isothermal simulation program
dune_add_test(NAME exercise_basic_2pni dune_add_test(NAME exercise_basic_2pni
SOURCES exercise_basic_2pni.cc) SOURCES 2pnimain.cc)
``` ```
* Test that everything compiles without error * Test that everything compiles without error
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <dumux/porousmediumflow/problem.hh> #include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh> #include <dumux/material/fluidsystems/h2on2.hh>
#include "injection2pspatialparams.hh" #include "spatialparams.hh"
namespace Dumux { namespace Dumux {
...@@ -69,7 +69,7 @@ public: ...@@ -69,7 +69,7 @@ public:
template<class TypeTag> template<class TypeTag>
struct FluidSystem<TypeTag, TTag::Injection2p2c> { using type = FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>; }; struct FluidSystem<TypeTag, TTag::Injection2p2c> { using type = FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>; };
// Define whether mole(true) or mass (false) fractions are used // Define whether mole (true) or mass (false) fractions are used
template<class TypeTag> template<class TypeTag>
struct UseMoles<TypeTag, TTag::Injection2p2c> { static constexpr bool value = true; }; struct UseMoles<TypeTag, TTag::Injection2p2c> { static constexpr bool value = true; };
} // end namespace Properties } // end namespace Properties
...@@ -83,15 +83,15 @@ struct UseMoles<TypeTag, TTag::Injection2p2c> { static constexpr bool value = tr ...@@ -83,15 +83,15 @@ struct UseMoles<TypeTag, TTag::Injection2p2c> { static constexpr bool value = tr
* *
* The domain is sized 60 m times 40 m. * The domain is sized 60 m times 40 m.
* *
* For the mass conservation equation neumann boundary conditions are used on * For the mass conservation equation Neumann boundary conditions are used on
* the top, on the bottom and on the right of the domain, while dirichlet conditions * the top, on the bottom and on the right of the domain, while Dirichlet conditions
* apply on the left boundary. * apply on the left boundary.
* *
* Gas is injected at the right boundary from 7 m to 15 m at a rate of * Gas is injected at the right boundary from 7 m to 15 m at a rate of
* 0.001 kg/(s m), the remaining neumann boundaries are no-flow * 0.001 kg/(s m), the remaining Neumann boundaries are no-flow
* boundaries. * boundaries.
* *
* At the dirichlet boundaries a hydrostatic pressure and a gas saturation of zero a * At the Dirichlet boundaries a hydrostatic pressure and a gas saturation of zero a
* *
* This problem uses the \ref TwoPModel model. * This problem uses the \ref TwoPModel model.
*/ */
...@@ -192,7 +192,7 @@ public: ...@@ -192,7 +192,7 @@ public:
} }
/*! /*!
* \brief Evaluate the boundary conditions for a neumann * \brief Evaluate the boundary conditions for a Neumann
* boundary segment. * boundary segment.
* *
* \param globalPos The position of the integration point of the boundary segment. * \param globalPos The position of the integration point of the boundary segment.
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
#include <dumux/porousmediumflow/problem.hh> #include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh> #include <dumux/material/fluidsystems/h2on2.hh>
#include "injection2pspatialparams.hh" #include "spatialparams.hh"
namespace Dumux { namespace Dumux {
// forward declare problem // forward declare problem
template <class TypeTag> template <class TypeTag>
class InjectionProblem2PNI; class Injection2PNIProblem;
namespace Properties namespace Properties
{ {
...@@ -58,7 +58,7 @@ struct Grid<TypeTag, TTag::Injection2pNITypeTag> { using type = Dune::YaspGrid<2 ...@@ -58,7 +58,7 @@ struct Grid<TypeTag, TTag::Injection2pNITypeTag> { using type = Dune::YaspGrid<2
// Set the problem property // Set the problem property
template<class TypeTag> template<class TypeTag>
struct Problem<TypeTag, TTag::Injection2pNITypeTag> { using type = InjectionProblem2PNI<TypeTag>; }; struct Problem<TypeTag, TTag::Injection2pNITypeTag> { using type = Injection2PNIProblem<TypeTag>; };
// Set the spatial parameters // Set the spatial parameters
template<class TypeTag> template<class TypeTag>
...@@ -89,20 +89,20 @@ struct FluidSystem<TypeTag, TTag::Injection2pNITypeTag> ...@@ -89,20 +89,20 @@ struct FluidSystem<TypeTag, TTag::Injection2pNITypeTag>
* *
* The domain is sized 60 m times 40 m. * The domain is sized 60 m times 40 m.
* *
* For the mass conservation equation neumann boundary conditions are used on * For the mass conservation equation Neumann boundary conditions are used on
* the top, on the bottom and on the right of the domain, while dirichlet conditions * the top, on the bottom and on the right of the domain, while Dirichlet conditions
* apply on the left boundary. * apply on the left boundary.
* *
* Gas is injected at the right boundary from 7 m to 15 m at a rate of * Gas is injected at the right boundary from 7 m to 15 m at a rate of
* 0.001 kg/(s m), the remaining neumann boundaries are no-flow * 0.001 kg/(s m), the remaining Neumann boundaries are no-flow
* boundaries. * boundaries.
* *
* At the dirichlet boundaries a hydrostatic pressure and a gas saturation of zero a * At the Dirichlet boundaries a hydrostatic pressure and a gas saturation of zero a
* *
* This problem uses the \ref TwoPModel model. * This problem uses the \ref TwoPModel model.
*/ */
template<class TypeTag> template<class TypeTag>
class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag> class Injection2PNIProblem : public PorousMediumFlowProblem<TypeTag>
{ {
using ParentType = PorousMediumFlowProblem<TypeTag>; using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>; using GridView = GetPropType<TypeTag, Properties::GridView>;
...@@ -120,7 +120,7 @@ class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag> ...@@ -120,7 +120,7 @@ class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag>
using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
public: public:
InjectionProblem2PNI(std::shared_ptr<const FVGridGeometry> fvGridGeometry) Injection2PNIProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry) : ParentType(fvGridGeometry)
{ {
// initialize the tables of the fluid system // initialize the tables of the fluid system
...@@ -190,7 +190,7 @@ public: ...@@ -190,7 +190,7 @@ public:
} }
/*! /*!
* \brief Evaluate the boundary conditions for a neumann * \brief Evaluate the boundary conditions for a Neumann
* boundary segment. * boundary segment.
* *
* \param globalPos The position of the integration point of the boundary segment. * \param globalPos The position of the integration point of the boundary segment.
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
#include <dumux/porousmediumflow/problem.hh> #include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh> #include <dumux/material/fluidsystems/h2on2.hh>
#include "injection2pspatialparams.hh" #include "spatialparams.hh"
namespace Dumux { namespace Dumux {
// forward declare problem // forward declare problem
template <class TypeTag> template <class TypeTag>
class InjectionProblem2P; class Injection2PProblem;
namespace Properties { namespace Properties {
// define the TypeTag for this problem with a cell-centered two-point flux approximation spatial discretization. // define the TypeTag for this problem with a cell-centered two-point flux approximation spatial discretization.
...@@ -54,7 +54,7 @@ struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2>; }; ...@@ -54,7 +54,7 @@ struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2>; };
// Set the problem property // Set the problem property
template<class TypeTag> template<class TypeTag>
struct Problem<TypeTag, TTag::Injection2p> { using type = InjectionProblem2P<TypeTag>; }; struct Problem<TypeTag, TTag::Injection2p> { using type = Injection2PProblem<TypeTag>; };
// Set the spatial parameters // Set the spatial parameters
template<class TypeTag> template<class TypeTag>
...@@ -94,7 +94,7 @@ struct FluidSystem<TypeTag, TTag::Injection2p> { using type = FluidSystems::H2ON ...@@ -94,7 +94,7 @@ struct FluidSystem<TypeTag, TTag::Injection2p> { using type = FluidSystems::H2ON
* This problem uses the \ref TwoPModel model. * This problem uses the \ref TwoPModel model.
*/ */
template<class TypeTag> template<class TypeTag>
class InjectionProblem2P : public PorousMediumFlowProblem<TypeTag> class Injection2PProblem : public PorousMediumFlowProblem<TypeTag>
{ {
using ParentType = PorousMediumFlowProblem<TypeTag>; using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>; using GridView = GetPropType<TypeTag, Properties::GridView>;
...@@ -112,7 +112,7 @@ class InjectionProblem2P : public PorousMediumFlowProblem<TypeTag> ...@@ -112,7 +112,7 @@ class InjectionProblem2P : public PorousMediumFlowProblem<TypeTag>
using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
public: public:
InjectionProblem2P(std::shared_ptr<const FVGridGeometry> fvGridGeometry) Injection2PProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry) : ParentType(fvGridGeometry)
{ {
// initialize the tables of the fluid system // initialize the tables of the fluid system
......
# the two-phase non-isothermal simulation program # the two-phase non-isothermal simulation program
dune_add_test(NAME exercise_basic_2pni_solution dune_add_test(NAME exercise_basic_2pni_solution
SOURCES exercisebasic2pni.cc) SOURCES 2pnimain.cc)
# add exercise to the common target # add exercise to the common target
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
#include <dumux/porousmediumflow/problem.hh> #include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh> #include <dumux/material/fluidsystems/h2on2.hh>
#include "injection2pspatialparams.hh" #include "spatialparams.hh"
namespace Dumux { namespace Dumux {
// forward declare problem // forward declare problem
template <class TypeTag> template <class TypeTag>
class InjectionProblem2PNI; class Injection2PNIProblem;
namespace Properties { namespace Properties {
// Create new type tags // Create new type tags
...@@ -53,7 +53,7 @@ struct Grid<TypeTag, TTag::Injection2pNITypeTag> { using type = Dune::YaspGrid<2 ...@@ -53,7 +53,7 @@ struct Grid<TypeTag, TTag::Injection2pNITypeTag> { using type = Dune::YaspGrid<2
// Set the problem property // Set the problem property
template<class TypeTag> template<class TypeTag>
struct Problem<TypeTag, TTag::Injection2pNITypeTag> { using type = InjectionProblem2PNI<TypeTag>; }; struct Problem<TypeTag, TTag::Injection2pNITypeTag> { using type = Injection2PNIProblem<TypeTag>; };
// Set the spatial parameters // Set the spatial parameters
template<class TypeTag> template<class TypeTag>
...@@ -84,20 +84,20 @@ struct FluidSystem<TypeTag, TTag::Injection2pNITypeTag> ...@@ -84,20 +84,20 @@ struct FluidSystem<TypeTag, TTag::Injection2pNITypeTag>
* *
* The domain is sized 60 m times 40 m. * The domain is sized 60 m times 40 m.
* *
* For the mass conservation equation neumann boundary conditions are used on * For the mass conservation equation Neumann boundary conditions are used on
* the top, on the bottom and on the right of the domain, while dirichlet conditions * the top, on the bottom and on the right of the domain, while Dirichlet conditions
* apply on the left boundary. * apply on the left boundary.
* *
* Gas is injected at the right boundary from 7 m to 15 m at a rate of * Gas is injected at the right boundary from 7 m to 15 m at a rate of
* 0.001 kg/(s m), the remaining neumann boundaries are no-flow * 0.001 kg/(s m), the remaining Neumann boundaries are no-flow
* boundaries. * boundaries.
* *
* At the dirichlet boundaries a hydrostatic pressure and a gas saturation of zero a * At the Dirichlet boundaries a hydrostatic pressure and a gas saturation of zero a
* *
* This problem uses the \ref TwoPModel model. * This problem uses the \ref TwoPModel model.
*/ */
template<class TypeTag> template<class TypeTag>
class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag> class Injection2PNIProblem : public PorousMediumFlowProblem<TypeTag>
{ {
using ParentType = PorousMediumFlowProblem<TypeTag>; using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>; using GridView = GetPropType<TypeTag, Properties::GridView>;
...@@ -115,7 +115,7 @@ class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag> ...@@ -115,7 +115,7 @@ class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag>
using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
public: public:
InjectionProblem2PNI(std::shared_ptr<const FVGridGeometry> fvGridGeometry) Injection2PNIProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry) : ParentType(fvGridGeometry)
{ {
// initialize the tables of the fluid system // initialize the tables of the fluid system
...@@ -185,7 +185,7 @@ public: ...@@ -185,7 +185,7 @@ public:
} }
/*! /*!
* \brief Evaluate the boundary conditions for a neumann * \brief Evaluate the boundary conditions for a Neumann
* boundary segment. * boundary segment.
* *
* \param globalPos The position of the integration point of the boundary segment. * \param globalPos The position of the integration point of the boundary segment.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment