Skip to content
Snippets Groups Projects
Commit 9c9d58f0 authored by Beatrix Becker's avatar Beatrix Becker
Browse files

Merge branch 'fix/fix-exercises' into 'master'

[exercise] fix small errors due to update to dumux 3.0

See merge request !68
parents 19d514ea e1420887
No related branches found
No related tags found
1 merge request!68[exercise] fix small errors due to update to dumux 3.0
Pipeline #872 passed
...@@ -95,4 +95,4 @@ make exercise_basic_2pni # builds new executable ...@@ -95,4 +95,4 @@ make exercise_basic_2pni # builds new executable
<img src="https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/exercises/extradoc/exercise1_nonisothermal.png" width="800"> <img src="https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/exercises/extradoc/exercise1_nonisothermal.png" width="800">
The non-isothermal model requires additional parameters like the thermal conductivity of the solid component. They are already implemented and set in `exercise_basic.input`, you just need to _uncomment_ them. The non-isothermal model requires additional parameters like the thermal conductivity of the solid component. They are already implemented and set in `params.input`, you just need to _uncomment_ them.
...@@ -31,19 +31,19 @@ The following command will configure your new module ...@@ -31,19 +31,19 @@ The following command will configure your new module
./dune-common/bin/dunecontrol --opts=<opts file> --only=dumux-example all ./dune-common/bin/dunecontrol --opts=<opts file> --only=dumux-example all
``` ```
You need to run this command in the folder with content dumux, dumux-course, dune-common, dune-geometry, dune-grid, dune-istl, etc. `<opts file>` needs to be replaced (please replace the angle brackets also) by an options file, e.g. by `./dumux/cmake.opts`. Have a look at the comments in this file to see how you can adapt it to your needs. You need to run this command in the folder with content dumux, dumux-course, dune-common, dune-geometry, dune-grid, dune-istl, etc. `<opts file>` needs to be replaced (please replace the angle brackets also) by an options file, e.g., by `./dumux/cmake.opts`. Have a look at the comments in this file to see how you can adapt it to your needs.
<hr><br><br> <hr><br><br>
### Task 3: Create a new test case within your new DuMuX module ### Task 3: Create a new test case within your new DuMuX module
<hr> <hr>
* Create a new folder (in your module folder), e.g. `appl` * Create a new folder (in your module folder), e.g., `appl`
```bash ```bash
mkdir appl mkdir appl
``` ```
* Copy some test case from the dumux module, e.g. test_1p from test/porousmediumflow/1p/implicit/compressible/stationary * Copy some test case from the dumux module, e.g., test_1p from test/porousmediumflow/1p/implicit/compressible/stationary in your new folder (e.g., `appl`)
* Copy the problem, spatialparams, cc source file, input file * Copy the problem, spatialparams, cc source file, input file
* Adjust the CMakeLists.txt file within the dumux-example (or your module name)-folder to include your new subdirectory * Adjust the CMakeLists.txt file within the dumux-example (or your module name)-folder to include your new subdirectory
...@@ -74,7 +74,7 @@ cmake build-cmake ...@@ -74,7 +74,7 @@ cmake build-cmake
cd build-cmake cd build-cmake
make build_tests make build_tests
cd appl cd appl
./test_1p_compressible_tpfa test_1p.input ./test_1p_compressible_stationary_tpfa params.input
``` ```
<hr><br><br> <hr><br><br>
......
...@@ -63,7 +63,7 @@ int main(int argc, char** argv) try ...@@ -63,7 +63,7 @@ int main(int argc, char** argv) try
// define the type tag for this problem // define the type tag for this problem
// TYPETAG is set in CMakeLists.txt as compile time definition // TYPETAG is set in CMakeLists.txt as compile time definition
// alternatively you could write `using TypeTag = Properties::TTag::ExerciseFluidsystemBoxTwoP;` // alternatively you could write `using TypeTag = Properties::TTag::ExerciseFluidsystemBoxTwoP;`
// then, for the 2p2c problem you have to change this line to `using TypeTag = Properties::TTag::ExerciseFluidsystemBoxTwoP;` // then, for the 2p2c problem you have to change this line to `using TypeTag = Properties::TTag::ExerciseFluidsystemBoxTwoPTwoC;`
// and recompile the executable // and recompile the executable
using TypeTag = Properties::TTag::TYPETAG; using TypeTag = Properties::TTag::TYPETAG;
......
...@@ -105,7 +105,7 @@ int main(int argc, char** argv) try ...@@ -105,7 +105,7 @@ int main(int argc, char** argv) try
using IOFields = GetPropType<TypeTag, Properties::IOFields>; using IOFields = GetPropType<TypeTag, Properties::IOFields>;
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.write(0.0); vtkWriter.write(0.0);
Dune::Timer timer; Dune::Timer timer;
// TODO: dumux-course-task // TODO: dumux-course-task
......
...@@ -53,7 +53,7 @@ class MyLocalResidual : public GetPropType<TypeTag, Properties::BaseLocalResidua ...@@ -53,7 +53,7 @@ class MyLocalResidual : public GetPropType<TypeTag, Properties::BaseLocalResidua
using EnergyLocalResidual = GetPropType<TypeTag, Properties::EnergyLocalResidual>; using EnergyLocalResidual = GetPropType<TypeTag, Properties::EnergyLocalResidual>;
using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>; using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>;
static constexpr int numPhases = ModelTraits::numPhases(); static constexpr int numPhases = ModelTraits::numFluidPhases();
static constexpr int conti0EqIdx = ModelTraits::Indices::conti0EqIdx; //!< first index for the mass balance static constexpr int conti0EqIdx = ModelTraits::Indices::conti0EqIdx; //!< first index for the mass balance
public: public:
......
...@@ -51,7 +51,7 @@ int main(int argc, char** argv) try ...@@ -51,7 +51,7 @@ int main(int argc, char** argv) try
using namespace Dumux; using namespace Dumux;
// define the type tag for this problem // define the type tag for this problem
using TypeTag = Properties::TTag::TYPETAG; using TypeTag = Properties::TTag::OnePIncompressible;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
......
# Compile and runs a simple # Compile and runs a simple
# one-phase ground water flow example # one-phase ground water flow example
# and visualizes the result using paraview. # and visualizes the result using paraview.
cd dumux/build-cmake/test/porousmediumflow/1p/implicit cd dumux/build-cmake/test/porousmediumflow/1p/implicit/incompressible
echo "Compiling a one-phase test using a cell-centered TPFA discretization (might take a while)..." echo "Compiling a one-phase test using a cell-centered TPFA discretization (might take a while)..."
make -B test_1pcctpfa make -B test_1p_incompressible_tpfa_anadiff
echo "Running simulation..." echo "Running simulation..."
./test_1pcctpfa test_1pfv.input -Grid.Cells "100 100" ./test_1p_incompressible_tpfa_anadiff params.input -Grid.Cells "100 100"
paraview *pvd paraview *pvd
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