From 4a9c1db88fe6c3e196f285e70f09c5783bfe8f2e Mon Sep 17 00:00:00 2001 From: Anna Mareike Kostelecky <anmako96@web.de> Date: Tue, 16 Jul 2024 13:58:06 +0000 Subject: [PATCH] Fix/exercise coupling ffpm --- .../exercise-coupling-ff-pm.patch | 48 +++++++++---------- exercises/exercise-coupling-ff-pm/README.md | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.patches/exercise-coupling-ff-pm/exercise-coupling-ff-pm.patch b/.patches/exercise-coupling-ff-pm/exercise-coupling-ff-pm.patch index 4dc2abd2..5673f633 100644 --- a/.patches/exercise-coupling-ff-pm/exercise-coupling-ff-pm.patch +++ b/.patches/exercise-coupling-ff-pm/exercise-coupling-ff-pm.patch @@ -33,8 +33,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/CMakeLists.txt exercises/s # add a symlink for each input file add_input_file_links() diff -ruN exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh exercises/solution/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh ---- exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2024-07-15 10:49:12.269896347 +0200 -+++ exercises/solution/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2024-07-15 10:49:12.273896458 +0200 +--- exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2024-07-15 14:35:29.171027826 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2024-07-15 14:35:29.171027826 +0200 @@ -83,8 +83,7 @@ const auto& globalPos = scvf.dofPosition(); @@ -132,8 +132,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh exer } diff -ruN exercises/exercise-coupling-ff-pm/interface/main.cc exercises/solution/exercise-coupling-ff-pm/interface/main.cc ---- exercises/exercise-coupling-ff-pm/interface/main.cc 2024-07-15 10:49:12.269896347 +0200 -+++ exercises/solution/exercise-coupling-ff-pm/interface/main.cc 2024-07-15 10:49:12.273896458 +0200 +--- exercises/exercise-coupling-ff-pm/interface/main.cc 2024-07-15 14:35:29.171027826 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/interface/main.cc 2024-07-15 14:35:29.171027826 +0200 @@ -64,10 +64,8 @@ using FreeflowTypeTag = Properties::TTag::FreeflowOneP; using PorousMediumTypeTag = Properties::TTag::PorousMediumFlowOneP; @@ -262,8 +262,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/main.cc exercises/solution using PorousMediumSolutionVector = GetPropType<PorousMediumTypeTag, Properties::SolutionVector>; VtkOutputModule<PorousMediumGridVariables, PorousMediumSolutionVector> porousMediumVtkWriter(*porousMediumGridVariables, diff -ruN exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh exercises/solution/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh ---- exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2024-07-15 10:49:12.269896347 +0200 -+++ exercises/solution/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2024-07-15 10:49:12.273896458 +0200 +--- exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2024-07-15 14:35:29.171027826 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2024-07-15 14:35:29.171027826 +0200 @@ -80,13 +80,13 @@ // set Neumann BCs to all boundaries first values.setAllNeumann(); @@ -284,8 +284,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh return values; } diff -ruN exercises/exercise-coupling-ff-pm/interface/properties.hh exercises/solution/exercise-coupling-ff-pm/interface/properties.hh ---- exercises/exercise-coupling-ff-pm/interface/properties.hh 2024-07-15 10:49:12.269896347 +0200 -+++ exercises/solution/exercise-coupling-ff-pm/interface/properties.hh 2024-07-15 10:49:12.273896458 +0200 +--- exercises/exercise-coupling-ff-pm/interface/properties.hh 2024-07-15 14:35:29.171027826 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/interface/properties.hh 2024-07-15 14:35:29.171027826 +0200 @@ -28,9 +28,9 @@ #include <dumux/multidomain/staggeredtraits.hh> #include <dumux/multidomain/boundary/stokesdarcy/couplingmanager.hh> @@ -338,7 +338,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/properties.hh exercises/so template<class TypeTag> diff -ruN exercises/exercise-coupling-ff-pm/interface/readme.md exercises/solution/exercise-coupling-ff-pm/interface/readme.md ---- exercises/exercise-coupling-ff-pm/interface/readme.md 2024-07-15 10:52:11.058859896 +0200 +--- exercises/exercise-coupling-ff-pm/interface/readme.md 2024-07-15 14:35:29.171027826 +0200 +++ exercises/solution/exercise-coupling-ff-pm/interface/readme.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,169 +0,0 @@ -## 1. Changing the interface @@ -512,8 +512,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/readme.md exercises/soluti -Hint: A relation between velocity and position is used for the vertical velocity component in the original form of the `dirichletAtPos` method. \ No newline at end of file diff -ruN exercises/exercise-coupling-ff-pm/models/CMakeLists.txt exercises/solution/exercise-coupling-ff-pm/models/CMakeLists.txt ---- exercises/exercise-coupling-ff-pm/models/CMakeLists.txt 2024-07-15 10:49:12.269896347 +0200 -+++ exercises/solution/exercise-coupling-ff-pm/models/CMakeLists.txt 2024-07-15 10:49:12.273896458 +0200 +--- exercises/exercise-coupling-ff-pm/models/CMakeLists.txt 2024-07-15 14:35:29.171027826 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/models/CMakeLists.txt 2024-07-15 14:35:29.171027826 +0200 @@ -1,6 +1,29 @@ -# executables for exercise_models_coupling_ff-pm -dumux_add_test(NAME exercise_models_coupling_ff-pm @@ -572,7 +572,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/main.cc exercises/solution/ex GetPropType<FreeflowTypeTag, Properties::IOFields>::initOutputModule(freeflowVtkWriter); diff -ruN exercises/exercise-coupling-ff-pm/models/params_b_c.input exercises/solution/exercise-coupling-ff-pm/models/params_b_c.input --- exercises/exercise-coupling-ff-pm/models/params_b_c.input 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/params_b_c.input 2024-07-15 10:49:12.273896458 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/models/params_b_c.input 2024-07-15 14:35:29.171027826 +0200 @@ -0,0 +1,57 @@ +[TimeLoop] +DtInitial = 100 # s @@ -632,7 +632,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/params_b_c.input exercises/so +[Assembly] +NumericDifference.BaseEpsilon = 1e-8 diff -ruN exercises/exercise-coupling-ff-pm/models/params.input exercises/solution/exercise-coupling-ff-pm/models/params.input ---- exercises/exercise-coupling-ff-pm/models/params.input 2024-07-15 10:49:12.269896347 +0200 +--- exercises/exercise-coupling-ff-pm/models/params.input 2024-07-15 14:35:29.171027826 +0200 +++ exercises/solution/exercise-coupling-ff-pm/models/params.input 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +0,0 @@ -[TimeLoop] @@ -695,7 +695,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/params.input exercises/soluti -NumericDifference.BaseEpsilon = 1e-8 diff -ruN exercises/exercise-coupling-ff-pm/models/params_orig_a.input exercises/solution/exercise-coupling-ff-pm/models/params_orig_a.input --- exercises/exercise-coupling-ff-pm/models/params_orig_a.input 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/params_orig_a.input 2024-07-15 10:49:12.273896458 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/models/params_orig_a.input 2024-07-15 14:35:29.171027826 +0200 @@ -0,0 +1,56 @@ +[TimeLoop] +DtInitial = 100 # s @@ -754,7 +754,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/params_orig_a.input exercises +[Assembly] +NumericDifference.BaseEpsilon = 1e-8 diff -ruN exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh exercises/solution/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh ---- exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh 2024-07-15 10:49:12.269896347 +0200 +--- exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh 2024-07-15 14:35:29.171027826 +0200 +++ exercises/solution/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh 2024-01-03 15:09:59.465499101 +0100 @@ -64,10 +64,15 @@ // primary variable indices @@ -972,7 +972,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/properties.hh exercises/solut template<class TypeTag> struct EnableGridGeometryCache<TypeTag, TTag::FreeflowNC> { static constexpr bool value = true; }; diff -ruN exercises/exercise-coupling-ff-pm/models/readme.md exercises/solution/exercise-coupling-ff-pm/models/readme.md ---- exercises/exercise-coupling-ff-pm/models/readme.md 2024-07-15 10:52:11.058859896 +0200 +--- exercises/exercise-coupling-ff-pm/models/readme.md 2024-07-15 14:35:29.171027826 +0200 +++ exercises/solution/exercise-coupling-ff-pm/models/readme.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,118 +0,0 @@ -## 2. Changing the porous medium model @@ -1095,7 +1095,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/readme.md exercises/solution/ -Now you are able to simulate a complete drying of the porous medium. Have a look the resulting liquid saturation distribution within the porous medium (with using paraview). \ No newline at end of file diff -ruN exercises/exercise-coupling-ff-pm/README.md exercises/solution/exercise-coupling-ff-pm/README.md ---- exercises/exercise-coupling-ff-pm/README.md 2024-07-15 10:49:12.269896347 +0200 +--- exercises/exercise-coupling-ff-pm/README.md 2024-07-16 15:52:28.110423506 +0200 +++ exercises/solution/exercise-coupling-ff-pm/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,125 +0,0 @@ -# Exercise Coupling free flow/porous medium flow (DuMuX Course) @@ -1126,7 +1126,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/README.md exercises/solution/exercis -Moreover all the exercises share -* the __spatial parameters files__ (`1pspatialparams.hh` and `2pspatialparams.hh`) - --In the [Exercise Mainfiles](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/-/blob/feature/updateCouplingFFPMExercise/exercises/exercise-mainfile/README.md) the overall structure of a main-file was already introduced. For the coupled setup we need now to define properties related to one subproblem (free-flow or porous medium flow) for each of the subproblems. +-In the [Exercise Mainfiles](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/-/blob/master/exercises/exercise-coupling-ff-pm/interface/main.cc) the overall structure of a main-file was already introduced. For the coupled setup we need now to define properties related to one subproblem (free-flow or porous medium flow) for each of the subproblems. -E.g. in the main file, `TypeTags` for both submodels are defined, `FreeflowTypeTag` and `PorousMediumTypeTag`. These `TypeTags` collect all of the properties associated with each subproblem. -```c++ - // Define the sub problem type tags @@ -1226,7 +1226,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/README.md exercises/solution/exercis \ No newline at end of file diff -ruN exercises/exercise-coupling-ff-pm/turbulence/CMakeLists.txt exercises/solution/exercise-coupling-ff-pm/turbulence/CMakeLists.txt --- exercises/exercise-coupling-ff-pm/turbulence/CMakeLists.txt 2023-04-04 12:15:36.845203367 +0200 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/CMakeLists.txt 2024-07-15 10:49:12.273896458 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/CMakeLists.txt 2024-07-15 14:35:29.171027826 +0200 @@ -1,7 +1,30 @@ -# executables for ex_interface_coupling_ff-pm -dumux_add_test(NAME exercise_turbulence_coupling_ff-pm @@ -1515,7 +1515,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/main.cc exercises/solutio porousMediumProblem->postTimeStep(sol[porousMediumIdx], *porousMediumGridVariables, timeLoop->timeStepSize()); diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params_b.input exercises/solution/exercise-coupling-ff-pm/turbulence/params_b.input --- exercises/exercise-coupling-ff-pm/turbulence/params_b.input 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/params_b.input 2024-07-15 10:49:12.273896458 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/params_b.input 2024-07-15 14:35:29.171027826 +0200 @@ -0,0 +1,72 @@ +[TimeLoop] +DtInitial = 1e-1 # [s] @@ -1591,7 +1591,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params_b.input exercises/ +IsFlatWallBounded = True diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params_c_d.input exercises/solution/exercise-coupling-ff-pm/turbulence/params_c_d.input --- exercises/exercise-coupling-ff-pm/turbulence/params_c_d.input 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/params_c_d.input 2024-07-15 10:49:12.273896458 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/params_c_d.input 2024-07-15 14:35:29.171027826 +0200 @@ -0,0 +1,72 @@ +[TimeLoop] +DtInitial = 1e-1 # [s] @@ -1666,7 +1666,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params_c_d.input exercise +[RANS] +IsFlatWallBounded = True diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params.input exercises/solution/exercise-coupling-ff-pm/turbulence/params.input ---- exercises/exercise-coupling-ff-pm/turbulence/params.input 2024-07-15 10:49:12.273896458 +0200 +--- exercises/exercise-coupling-ff-pm/turbulence/params.input 2024-07-15 14:35:29.171027826 +0200 +++ exercises/solution/exercise-coupling-ff-pm/turbulence/params.input 1970-01-01 01:00:00.000000000 +0100 @@ -1,73 +0,0 @@ -[TimeLoop] @@ -1744,7 +1744,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params.input exercises/so -SolidHeatCapacity = 790 diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params_orig_a.input exercises/solution/exercise-coupling-ff-pm/turbulence/params_orig_a.input --- exercises/exercise-coupling-ff-pm/turbulence/params_orig_a.input 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/params_orig_a.input 2024-07-15 10:49:12.273896458 +0200 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/params_orig_a.input 2024-07-15 14:35:29.171027826 +0200 @@ -0,0 +1,72 @@ +[TimeLoop] +DtInitial = 1e-1 # [s] @@ -1862,7 +1862,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/properties.hh exercises/s // Set the coupling manager diff -ruN exercises/exercise-coupling-ff-pm/turbulence/readme.md exercises/solution/exercise-coupling-ff-pm/turbulence/readme.md ---- exercises/exercise-coupling-ff-pm/turbulence/readme.md 2024-07-15 10:49:12.273896458 +0200 +--- exercises/exercise-coupling-ff-pm/turbulence/readme.md 2024-07-15 14:35:29.171027826 +0200 +++ exercises/solution/exercise-coupling-ff-pm/turbulence/readme.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,126 +0,0 @@ -## 3. Use a turbulence model in the free flow domain diff --git a/exercises/exercise-coupling-ff-pm/README.md b/exercises/exercise-coupling-ff-pm/README.md index 7cc5a61d..edb1b10f 100644 --- a/exercises/exercise-coupling-ff-pm/README.md +++ b/exercises/exercise-coupling-ff-pm/README.md @@ -26,7 +26,7 @@ The folders of the three exercises contain the following files: Moreover all the exercises share * the __spatial parameters files__ (`1pspatialparams.hh` and `2pspatialparams.hh`) -In the [Exercise Mainfiles](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/-/blob/feature/updateCouplingFFPMExercise/exercises/exercise-mainfile/README.md) the overall structure of a main-file was already introduced. For the coupled setup we need now to define properties related to one subproblem (free-flow or porous medium flow) for each of the subproblems. +In the [Exercise Mainfiles](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/-/blob/master/exercises/exercise-coupling-ff-pm/interface/main.cc) the overall structure of a main-file was already introduced. For the coupled setup we need now to define properties related to one subproblem (free-flow or porous medium flow) for each of the subproblems. E.g. in the main file, `TypeTags` for both submodels are defined, `FreeflowTypeTag` and `PorousMediumTypeTag`. These `TypeTags` collect all of the properties associated with each subproblem. ```c++ // Define the sub problem type tags -- GitLab