Commit 0c626ffb authored by Gabi Seitz's avatar Gabi Seitz
Browse files

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

parent a9f21b6a
# the immiscible two-phase simulation program
dune_add_test(NAME exercise_basic_2p
SOURCES exercisebasic2p.cc)
SOURCES 2pmain.cc)
# the compositional two-phase two-component simulation program
dune_add_test(NAME exercise_basic_2p2c
SOURCES exercisebasic2p2c.cc)
SOURCES 2p2cmain.cc)
# 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
<hr>
Locate all the files you will need for this exercise
* The __main file__ for the __2p__ problem : `exercisebasic2p.cc`
* The __main file__ for the __2p2c__ problem : `exercisebasic2p2c.cc`
* The __main file__ for the __2p__ problem : `2pmain.cc`
* The __main file__ for the __2p2c__ problem : `2p2cmain.cc`
* The __problem file__ for the __2p__ problem: `injection2pproblem.hh`
* The __problem file__ for the __2p2c__ problem: `injection2p2cproblem.hh`
* The shared __spatial parameters file__: `injection2pspatialparams.hh`
......@@ -58,15 +58,15 @@ paraview injection-2p2c.pvd
### Task 3: Setting up a new executable (for a non-isothermal simulation)
<hr>
* Copy the main file `exercise_basic_2p.cc` and rename it to `exercise_basic_2pni.cc`
* In `exercise_basic_2pni.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;`
* Copy the main file `2pmain.cc` and rename it to `2pnimain.cc`
* In `2pnimain.cc`, include the header `injection2pniproblem.hh` instead of `injection2pproblem.hh`.
* 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
```cmake
# the two-phase non-isothermal simulation program
dune_add_test(NAME exercise_basic_2pni
SOURCES exercise_basic_2pni.cc)
SOURCES 2pnimain.cc)
```
* Test that everything compiles without error
......
......@@ -31,7 +31,7 @@
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include "injection2pspatialparams.hh"
#include "spatialparams.hh"
namespace Dumux {
......@@ -69,7 +69,7 @@ public:
template<class TypeTag>
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>
struct UseMoles<TypeTag, TTag::Injection2p2c> { static constexpr bool value = true; };
} // end namespace Properties
......@@ -83,15 +83,15 @@ struct UseMoles<TypeTag, TTag::Injection2p2c> { static constexpr bool value = tr
*
* The domain is sized 60 m times 40 m.
*
* 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
* 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
* apply on the left boundary.
*
* 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.
*
* 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.
*/
......@@ -192,7 +192,7 @@ public:
}
/*!
* \brief Evaluate the boundary conditions for a neumann
* \brief Evaluate the boundary conditions for a Neumann
* boundary segment.
*
* \param globalPos The position of the integration point of the boundary segment.
......
......@@ -32,13 +32,13 @@
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include "injection2pspatialparams.hh"
#include "spatialparams.hh"
namespace Dumux {
// forward declare problem
template <class TypeTag>
class InjectionProblem2PNI;
class Injection2PNIProblem;
namespace Properties
{
......@@ -58,7 +58,7 @@ struct Grid<TypeTag, TTag::Injection2pNITypeTag> { using type = Dune::YaspGrid<2
// Set the problem property
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
template<class TypeTag>
......@@ -89,20 +89,20 @@ struct FluidSystem<TypeTag, TTag::Injection2pNITypeTag>
*
* The domain is sized 60 m times 40 m.
*
* 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
* 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
* apply on the left boundary.
*
* 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.
*
* 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.
*/
template<class TypeTag>
class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag>
class Injection2PNIProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
......@@ -120,7 +120,7 @@ class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag>
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
public:
InjectionProblem2PNI(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
Injection2PNIProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry)
{
// initialize the tables of the fluid system
......@@ -190,7 +190,7 @@ public:
}
/*!
* \brief Evaluate the boundary conditions for a neumann
* \brief Evaluate the boundary conditions for a Neumann
* boundary segment.
*
* \param globalPos The position of the integration point of the boundary segment.
......
......@@ -32,13 +32,13 @@
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include "injection2pspatialparams.hh"
#include "spatialparams.hh"
namespace Dumux {
// forward declare problem
template <class TypeTag>
class InjectionProblem2P;
class Injection2PProblem;
namespace Properties {
// 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>; };
// Set the problem property
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
template<class TypeTag>
......@@ -94,7 +94,7 @@ struct FluidSystem<TypeTag, TTag::Injection2p> { using type = FluidSystems::H2ON
* This problem uses the \ref TwoPModel model.
*/
template<class TypeTag>
class InjectionProblem2P : public PorousMediumFlowProblem<TypeTag>
class Injection2PProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
......@@ -112,7 +112,7 @@ class InjectionProblem2P : public PorousMediumFlowProblem<TypeTag>
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
public:
InjectionProblem2P(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
Injection2PProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry)
{
// initialize the tables of the fluid system
......
# the two-phase non-isothermal simulation program
dune_add_test(NAME exercise_basic_2pni_solution
SOURCES exercisebasic2pni.cc)
SOURCES 2pnimain.cc)
# add exercise to the common target
......
......@@ -32,13 +32,13 @@
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include "injection2pspatialparams.hh"
#include "spatialparams.hh"
namespace Dumux {
// forward declare problem
template <class TypeTag>
class InjectionProblem2PNI;
class Injection2PNIProblem;
namespace Properties {
// Create new type tags
......@@ -53,7 +53,7 @@ struct Grid<TypeTag, TTag::Injection2pNITypeTag> { using type = Dune::YaspGrid<2
// Set the problem property
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
template<class TypeTag>
......@@ -84,20 +84,20 @@ struct FluidSystem<TypeTag, TTag::Injection2pNITypeTag>
*
* The domain is sized 60 m times 40 m.
*
* 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
* 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
* apply on the left boundary.
*
* 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.
*
* 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.
*/
template<class TypeTag>
class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag>
class Injection2PNIProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
......@@ -115,7 +115,7 @@ class InjectionProblem2PNI : public PorousMediumFlowProblem<TypeTag>
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
public:
InjectionProblem2PNI(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
Injection2PNIProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry)
{
// initialize the tables of the fluid system
......@@ -185,7 +185,7 @@ public:
}
/*!
* \brief Evaluate the boundary conditions for a neumann
* \brief Evaluate the boundary conditions for a Neumann
* boundary segment.
*
* \param globalPos The position of the integration point of the boundary segment.
......
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