From 9f337e1571ddec8567e072af7d2a0cdd4b27bde2 Mon Sep 17 00:00:00 2001 From: VivienL <vivien.langhans@iws.uni-stuttgart.de> Date: Tue, 4 Mar 2025 10:34:54 +0100 Subject: [PATCH 1/4] TODOs checked for consistency and updated --- exercises/exercise-basic/2pmain.cc | 10 +++++++++- exercises/exercise-basic/CMakeLists.txt | 2 +- exercises/exercise-basic/params.input | 2 +- exercises/exercise-biomineralization/biominproblem.hh | 8 ++++---- .../chemistry/simplebiominreactions.hh | 8 ++++---- .../fluidmatrixinteractions/permeabilitypowerlaw.hh | 4 ++-- exercises/exercise-biomineralization/params.input | 4 +++- exercises/exercise-biomineralization/properties.hh | 4 ++-- .../interface/freeflowsubproblem.hh | 9 +++++---- .../exercise-coupling-ff-pm/interface/params.input | 2 ++ .../interface/porousmediumsubproblem.hh | 2 ++ exercises/exercise-coupling-ff-pm/models/params.input | 2 ++ exercises/exercise-fluidsystem/aparams.input | 1 + exercises/exercise-fractures/fracturespatialparams.hh | 6 +++--- exercises/exercise-fractures/matrixproblem.hh | 5 ++++- exercises/exercise-fractures/params.input | 2 ++ exercises/exercise-mainfile/exercise_mainfile_a.input | 1 + exercises/exercise-model/main.cc | 6 ++++-- exercises/exercise-runtimeparams/params.input | 1 + 19 files changed, 53 insertions(+), 26 deletions(-) diff --git a/exercises/exercise-basic/2pmain.cc b/exercises/exercise-basic/2pmain.cc index 52c0a075..1919f07c 100644 --- a/exercises/exercise-basic/2pmain.cc +++ b/exercises/exercise-basic/2pmain.cc @@ -27,6 +27,10 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager_yasp.hh> +/*! + * TODO:dumux-course-task 3: + * In 2pnimain.cc include the correct properties headerfile + */ // The properties file, where the compile time options are defined #include "properties2p.hh" @@ -36,7 +40,11 @@ int main(int argc, char** argv) { using namespace Dumux; - + + /*! + * TODO:dumux-course-task 3: + * In 2pnimain.cc change the type tag for the new injection problem + */ // define the type tag for this problem using TypeTag = Properties::TTag::Injection2pCC; diff --git a/exercises/exercise-basic/CMakeLists.txt b/exercises/exercise-basic/CMakeLists.txt index 372ebb49..5530e76f 100644 --- a/exercises/exercise-basic/CMakeLists.txt +++ b/exercises/exercise-basic/CMakeLists.txt @@ -5,7 +5,7 @@ dumux_add_test(NAME exercise_basic_2p SOURCES 2pmain.cc) -# here, add the two-phase non-isothermal simulation program +# TODO: add the two-phase non-isothermal simulation program # add a symlink for each input file diff --git a/exercises/exercise-basic/params.input b/exercises/exercise-basic/params.input index abd2b743..7f69d7b8 100644 --- a/exercises/exercise-basic/params.input +++ b/exercises/exercise-basic/params.input @@ -23,7 +23,7 @@ Aquifer.BrooksCoreyLambda = 2.0 Aquifer.Swr = 0.2 Aquifer.Snr = 0.0 -# these parameters are only used in the nonisothermal model. Uncomment them for that +# TODO: these parameters are only used in the nonisothermal model. Uncomment them for that #[Component] #SolidDensity = 2700 # solid density of granite #SolidThermalConductivity = 2.8 # solid thermal conducitivity of granite diff --git a/exercises/exercise-biomineralization/biominproblem.hh b/exercises/exercise-biomineralization/biominproblem.hh index 7d8248a7..2dae53af 100644 --- a/exercises/exercise-biomineralization/biominproblem.hh +++ b/exercises/exercise-biomineralization/biominproblem.hh @@ -17,7 +17,7 @@ #include <dumux/common/numeqvector.hh> #include <dumux/porousmediumflow/problem.hh> -// TODO: dumux-course-task +// TODO: dumux-course-task 3 // include chemistry file here namespace Dumux { @@ -51,7 +51,7 @@ class BioMinProblem : public PorousMediumFlowProblem<TypeTag> using Element = typename GridView::template Codim<0>::Entity; using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using SubControlVolume = typename FVElementGeometry::SubControlVolume; - // TODO: dumux-course-task + // TODO: dumux-course-task 3 // set the chemistry TypeTag static constexpr int numComponents = FluidSystem::numComponents; @@ -183,7 +183,7 @@ public: values[conti0EqIdx + CaIdx] = - waterFlux * concCa_ / FluidSystem::molarMass(CaIdx); values[conti0EqIdx + UreaIdx] = - waterFlux * concUrea_ / FluidSystem::molarMass(UreaIdx); } - // TODO: dumux-course-task + // TODO: dumux-course-task 5 // Set CO2 injection below aquitard after the injBioTime return values; @@ -245,7 +245,7 @@ public: { NumEqVector source(0.0); - // TODO: dumux-course-task + // TODO: dumux-course-task 3 // set Chemistry // Chemistry chemistry; // set VolumeVariables diff --git a/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh b/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh index f8345090..78d9886b 100644 --- a/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh +++ b/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh @@ -76,24 +76,24 @@ public: using std::max; const Scalar volFracBiofilm = max(volVars.solidVolumeFraction(BiofilmPhaseIdx),0.0); - // TODO: dumux-course-task + // TODO: dumux-course-task 2 // implement mass of biofilm const Scalar massBiofilm = 0.0; const Scalar molalityUrea = moleFracToMolality(volVars.moleFraction(liquidPhaseIdx,UreaIdx), xwCa, volVars.moleFraction(liquidPhaseIdx,CO2Idx)); // [mol_urea/kg_H2O] - // TODO: dumux-course-task + // TODO: dumux-course-task 2 // compute rate of ureolysis by implementing Zub and rurea const Scalar Zub = 0.0; const Scalar rurea = 0.0; - // TODO: dumux-course-task + // TODO: dumux-course-task 2 // compute/set dissolution and precipitation rate of calcite const Scalar rprec = 0.0; // set source terms - // TODO: dumux-course-task + // TODO: dumux-course-task 2 // set the source terms using the reaction rates defined above and signs based on the stoichiometry of the reactions. // Hint: Ammonium occurs in the reaction equation, but is not accounted for in this simplified setup. // Additionally, the consumption of water by the reaction may be neglected, as water is present in excess. diff --git a/exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh b/exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh index 619e003a..b6307897 100644 --- a/exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh +++ b/exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh @@ -39,10 +39,10 @@ public: PermeabilityType evaluatePermeability(PermeabilityType refPerm, Scalar refPoro, Scalar poro) const { using std::pow; - // TODO: dumux-course-task + // TODO: dumux-course-task 6 // read the exponent for the power law from the input file - // TODO: dumux-course-task + // TODO: dumux-course-task 6 // return the updated permeability according to K=K_0*(poro/refPoro)^exponent return refPerm; } diff --git a/exercises/exercise-biomineralization/params.input b/exercises/exercise-biomineralization/params.input index edc94eed..e8a0e917 100644 --- a/exercises/exercise-biomineralization/params.input +++ b/exercises/exercise-biomineralization/params.input @@ -10,6 +10,8 @@ Name = biomin UpperRight = 20 15 # x-/y-coordinates of the upper-right corner of the grid [m] Cells = 20 15 # x-/y-resolution of the grid +# TODO: dumux-course-task 4 +# vary parameters InjBioTime, InitBiofilm, InjVolumeflux, ConcUrea and ConcCa [Initial] InitDensityW = 997 # [kg/m³] initial wetting density InitPressure = 1e5 # [Pa] initial pressure @@ -47,5 +49,5 @@ KUrea = 0.355 # [mol/kgH2O] Lauchnor et al. 2014 [Brine] Salinity = 0.1 -#TODO: dumux-course-task +#TODO: dumux-course-task 6 # add the power law's exponent parameter PowerLaw.Exponent = 5.0 diff --git a/exercises/exercise-biomineralization/properties.hh b/exercises/exercise-biomineralization/properties.hh index ae77e56d..187ea5e8 100644 --- a/exercises/exercise-biomineralization/properties.hh +++ b/exercises/exercise-biomineralization/properties.hh @@ -19,7 +19,7 @@ #include <dumux/porousmediumflow/2pncmin/model.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/material/components/simpleco2.hh> //!< Simplified CO2 component based on ideal gas law -// TODO: dumux-course-task +// TODO: dumux-course-task 7 // include the CO2 component and tabulated values from DuMux #include "solidsystems/biominsolidphase.hh" // The biomineralization solid system @@ -52,7 +52,7 @@ struct FluidSystem<TypeTag, TTag::ExerciseBioMin> { private: using Scalar = GetPropType<TypeTag, Properties::Scalar>; - // TODO: dumux-course-task + // TODO: dumux-course-task 7 // use the CO2 component with tabulated values using CO2Impl = Components::SimpleCO2<Scalar>; using H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>; diff --git a/exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh b/exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh index 6808e498..ce45a7e0 100644 --- a/exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh +++ b/exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh @@ -89,16 +89,15 @@ public: // coupling interface if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf)) { + // TODO: dumux-course-task 1.C + // set the Beaver-Joseph-Saffman slip condition for the tangential momentum balance equation, + // consider orientation of face automatically values.setCouplingNeumann(Indices::conti0EqIdx); values.setCouplingNeumann(Indices::momentumYBalanceIdx); // TODO: dumux-course-task 1.B // Replace Dirichlet BC with Beavers-Joseph-Saffman slip condition for the tangential momentum balance values.setDirichlet(Indices::velocityXIdx); // assume no slip on interface - // TODO: dumux-course-task 1.C - // set the Beaver-Joseph-Saffman slip condition for the tangential momentum balance equation, - // consider orientation of face automatically - } return values; @@ -112,6 +111,8 @@ public: PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const { PrimaryVariables values(0.0); + // TODO: dumux-course-task 1.A + // set a no-slip, no-flow condition at the top values[Indices::velocityYIdx] = -1e-6 * globalPos[0] * (this->gridGeometry().bBoxMax()[0] - globalPos[0]); // TODO: dumux-course-task 1.A // set fixed pressures on the left and right boundary diff --git a/exercises/exercise-coupling-ff-pm/interface/params.input b/exercises/exercise-coupling-ff-pm/interface/params.input index ed2bfc3c..c5e2ac08 100644 --- a/exercises/exercise-coupling-ff-pm/interface/params.input +++ b/exercises/exercise-coupling-ff-pm/interface/params.input @@ -10,6 +10,7 @@ #Offset = 0.5 # [m] #Scaling = 0.2 #[m] +# TODO: dumux-course-task 1.B: change the grid resolution and examine the effects on the velocity profile # TODO: dumux-course-task 1.C: comment or delete the group [Freeflow.Grid] [Freeflow.Grid] Verbosity = true @@ -19,6 +20,7 @@ Cells0 = 20 Cells1 = 100 Grading1 = 1 +# TODO: dumux-course-task 1.B: change the grid resolution and examine the effects on the velocity profile # TODO: dumux-course-task 1.C: comment or delete the group [PorousMedium.Grid] [PorousMedium.Grid] Verbosity = true diff --git a/exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh b/exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh index 9b1c3b34..f30588e7 100644 --- a/exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh +++ b/exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh @@ -65,6 +65,8 @@ public: { BoundaryTypes values; + // TODO: dumux-course-task 1.A + // Set for all boundaries Neumann no-flow and keep the coupling conditions // set Neumann BCs to all boundaries first values.setAllNeumann(); diff --git a/exercises/exercise-coupling-ff-pm/models/params.input b/exercises/exercise-coupling-ff-pm/models/params.input index 69c4ec15..ce49ae41 100644 --- a/exercises/exercise-coupling-ff-pm/models/params.input +++ b/exercises/exercise-coupling-ff-pm/models/params.input @@ -42,6 +42,8 @@ Temperature = 293.15 [Problem] Name = models_coupling +# TODO: dumux-course-task 2.B: enable ExportStorage for .csv output file, +# enable plotting for gnuplot, enable ExportFluxes to export to .json file ExportStorage = false PlotStorage = false ExportFluxes = false diff --git a/exercises/exercise-fluidsystem/aparams.input b/exercises/exercise-fluidsystem/aparams.input index 8969d5d5..775a986e 100644 --- a/exercises/exercise-fluidsystem/aparams.input +++ b/exercises/exercise-fluidsystem/aparams.input @@ -20,4 +20,5 @@ UpperRight = 60 60 # x-/y-coordinates of the upper-right corner of the grid [m] Cells = 60 60 # x-/y-resolution of the grid [Output] +# TODO Task 2.2: Set the plot density to true PlotDensity = false # plot density over pressure for your component diff --git a/exercises/exercise-fractures/fracturespatialparams.hh b/exercises/exercise-fractures/fracturespatialparams.hh index 011df000..1f7518f9 100644 --- a/exercises/exercise-fractures/fracturespatialparams.hh +++ b/exercises/exercise-fractures/fracturespatialparams.hh @@ -73,7 +73,7 @@ public: const SubControlVolume& scv, const ElementSolution& elemSol) const { - // TODO dumux-course-task B + // TODO dumux-course-task B/C // Change fracture properties return permeability_; } @@ -84,7 +84,7 @@ public: const SubControlVolume& scv, const ElementSolution& elemSol) const { - // TODO dumux-course-task B + // TODO dumux-course-task B/C // Change fracture properties return porosity_; } @@ -101,7 +101,7 @@ public: const SubControlVolume& scv, const ElementSolution& elemSol) const { - // TODO dumux-course-task B + // TODO dumux-course-task B/C // Change fracture properties return makeFluidMatrixInteraction(pcKrSwCurve_); } diff --git a/exercises/exercise-fractures/matrixproblem.hh b/exercises/exercise-fractures/matrixproblem.hh index f2da3856..a52381a7 100644 --- a/exercises/exercise-fractures/matrixproblem.hh +++ b/exercises/exercise-fractures/matrixproblem.hh @@ -107,10 +107,13 @@ public: // the interior boundary conditions to Dirichlet. // IMPORTANT: Note that you will never be asked to set any values at the interior boundaries! // This simply chooses a different interface condition! - // TODO dumux-course-task C + // TODO dumux-course-task B // Change coupling conditions! values.setAllDirichlet(); + // TODO dumux-course-task additional task + // Set interior boundary condition depending on the domain marker of the fracture domain elements! + return values; } diff --git a/exercises/exercise-fractures/params.input b/exercises/exercise-fractures/params.input index 2c3bd5db..588e2294 100644 --- a/exercises/exercise-fractures/params.input +++ b/exercises/exercise-fractures/params.input @@ -4,6 +4,7 @@ DtInitial = 10 # [s] MaxTimeStepSize = 2500 # [s] [Problem] +# TODO dumux-course-task A: switch off gravity EnableGravity = true [Grid] @@ -28,6 +29,7 @@ SpatialParams.Permeability = 1e-7 SpatialParams.PermeabilityBarrier = 1e-16 SpatialParams.Porosity = 0.85 SpatialParams.PorosityBarrier = 0.05 +# TODO: set the VGAlpha parameter e.g. to 1e.5 and examine the nitrogen saturation in the fracture tips (then reset to 1e-1 again) SpatialParams.VanGenuchtenAlpha = 1e-1 SpatialParams.VanGenuchtenN = 2 SpatialParams.Swr = 0.0 diff --git a/exercises/exercise-mainfile/exercise_mainfile_a.input b/exercises/exercise-mainfile/exercise_mainfile_a.input index f621fa49..9dadca19 100644 --- a/exercises/exercise-mainfile/exercise_mainfile_a.input +++ b/exercises/exercise-mainfile/exercise_mainfile_a.input @@ -15,4 +15,5 @@ PermeabilityLens = 1e-12 # [m^2] [Assembly.NumericDifference] PriVarMagnitude = 1e5 +# TODO: Task 3: Change BaseEpsilon to a smaller value 1e-15 BaseEpsilon = 1e-10 diff --git a/exercises/exercise-model/main.cc b/exercises/exercise-model/main.cc index 8e408c2a..ee698d91 100644 --- a/exercises/exercise-model/main.cc +++ b/exercises/exercise-model/main.cc @@ -29,6 +29,8 @@ #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/assembly/fvassembler.hh> +// TODO Task 3.1: Include the header model.hh + /*! * \ingroup NonlinearDiffusion * \brief Test problem for image denoising using a nonlinear diffusion model @@ -77,7 +79,7 @@ namespace Dumux::Properties::TTag { struct NonlinearDiffusionTest { - // TODO: We need to set our model by replacing ModelTypeTag + // TODO Task 3.1: We need to set our model by replacing ModelTypeTag using InheritsFrom = std::tuple</*ModelTypeTag,*/BoxModel>; using Scalar = double; @@ -136,7 +138,7 @@ int main(int argc, char** argv) // the problem for the boundary conditions, a solution vector and a grid variables instance. auto gridGeometry = std::make_shared<GridGeometry>(gridManager.grid().leafGridView()); - // TODO: Uncomment when the model is implemented + // TODO Task 3.2: Uncomment when the model is implemented // using Scalar = GetPropType<TypeTag, Properties::Scalar>; // using Problem = GetPropType<TypeTag, Properties::Problem>; // using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; diff --git a/exercises/exercise-runtimeparams/params.input b/exercises/exercise-runtimeparams/params.input index 7ec66fe2..184e347b 100644 --- a/exercises/exercise-runtimeparams/params.input +++ b/exercises/exercise-runtimeparams/params.input @@ -12,6 +12,7 @@ OnlyPlotMaterialLaws = true AquiferDepth = 2700.0 # m InjectionDuration = 2.628e6 # in seconds, i.e. one month # TODO: Task 2: Create a parameter called "TotalAreaSpecificInflow" +# TODO: Task 3: Run the case with and without a provided value in the input file for "TotalAreaSpecificInflow" [SpatialParams] PermeabilityAquitard = 1e-15 # m^2 -- GitLab From 515fe7d0d13a131ab04e8680b5524b1d2b44cc8a Mon Sep 17 00:00:00 2001 From: VivienL <vivien.langhans@iws.uni-stuttgart.de> Date: Tue, 4 Mar 2025 10:57:01 +0100 Subject: [PATCH 2/4] merge conflict solved, add patches --- .patches/exercise-basic/exercise-basic.patch | 46 ++++--- .../exercise-biomineralization.patch | 123 +++++++++++------- .../exercise-coupling-ff-pm.patch | 112 +++++++++------- .../exercise-dunemodule.patch | 2 +- .../exercise-fluidsystem.patch | 47 +++---- .../exercise-fractures.patch | 68 +++++----- .patches/exercise-grids/exercise-grids.patch | 22 ++-- .../exercise-mainfile/exercise-mainfile.patch | 29 +++-- .patches/exercise-model/exercise-model.patch | 28 ++-- .../exercise-properties.patch | 18 +-- .../exercise-runtimeparams.patch | 25 ++-- 11 files changed, 292 insertions(+), 228 deletions(-) diff --git a/.patches/exercise-basic/exercise-basic.patch b/.patches/exercise-basic/exercise-basic.patch index e38d3644..26e8cd0d 100644 --- a/.patches/exercise-basic/exercise-basic.patch +++ b/.patches/exercise-basic/exercise-basic.patch @@ -1,7 +1,7 @@ diff -ruN exercises/exercise-basic/2pmain.cc exercises/solution/exercise-basic/2pmain.cc ---- exercises/exercise-basic/2pmain.cc 2025-03-04 21:00:57.445082578 +0100 +--- exercises/exercise-basic/2pmain.cc 2025-02-26 11:57:52.812342780 +0100 +++ exercises/solution/exercise-basic/2pmain.cc 1970-01-01 01:00:00.000000000 +0100 -@@ -1,145 +0,0 @@ +@@ -1,153 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -// @@ -31,6 +31,10 @@ diff -ruN exercises/exercise-basic/2pmain.cc exercises/solution/exercise-basic/2 -#include <dumux/io/vtkoutputmodule.hh> -#include <dumux/io/grid/gridmanager_yasp.hh> - +-/*! +- * TODO:dumux-course-task 3: +- * In 2pnimain.cc include the correct properties headerfile +- */ -// The properties file, where the compile time options are defined -#include "properties2p.hh" - @@ -40,7 +44,11 @@ diff -ruN exercises/exercise-basic/2pmain.cc exercises/solution/exercise-basic/2 -int main(int argc, char** argv) -{ - using namespace Dumux; -- +- +- /*! +- * TODO:dumux-course-task 3: +- * In 2pnimain.cc change the type tag for the new injection problem +- */ - // define the type tag for this problem - using TypeTag = Properties::TTag::Injection2pCC; - @@ -149,7 +157,7 @@ diff -ruN exercises/exercise-basic/2pmain.cc exercises/solution/exercise-basic/2 -} // end main diff -ruN exercises/exercise-basic/2pnimain.cc exercises/solution/exercise-basic/2pnimain.cc --- exercises/exercise-basic/2pnimain.cc 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-basic/2pnimain.cc 2025-03-04 21:00:57.449082471 +0100 ++++ exercises/solution/exercise-basic/2pnimain.cc 2025-02-26 11:38:46.841816361 +0100 @@ -0,0 +1,138 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: @@ -290,8 +298,8 @@ diff -ruN exercises/exercise-basic/2pnimain.cc exercises/solution/exercise-basic + return 0; +} // end main diff -ruN exercises/exercise-basic/CMakeLists.txt exercises/solution/exercise-basic/CMakeLists.txt ---- exercises/exercise-basic/CMakeLists.txt 2025-03-04 21:00:57.445082578 +0100 -+++ exercises/solution/exercise-basic/CMakeLists.txt 2025-03-04 21:00:57.449082471 +0100 +--- exercises/exercise-basic/CMakeLists.txt 2025-02-26 12:06:05.764771983 +0100 ++++ exercises/solution/exercise-basic/CMakeLists.txt 2025-02-26 11:38:46.841816361 +0100 @@ -1,12 +1,9 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -300,7 +308,7 @@ diff -ruN exercises/exercise-basic/CMakeLists.txt exercises/solution/exercise-ba -dumux_add_test(NAME exercise_basic_2p - SOURCES 2pmain.cc) - --# here, add the two-phase non-isothermal simulation program +-# TODO: add the two-phase non-isothermal simulation program - +# the two-phase non-isothermal simulation program +dumux_add_test(NAME exercise_basic_2pni_solution @@ -309,8 +317,8 @@ diff -ruN exercises/exercise-basic/CMakeLists.txt exercises/solution/exercise-ba # add a symlink for each input file add_input_file_links() diff -ruN exercises/exercise-basic/injection2pniproblem.hh exercises/solution/exercise-basic/injection2pniproblem.hh ---- exercises/exercise-basic/injection2pniproblem.hh 2025-03-04 21:00:57.445082578 +0100 -+++ exercises/solution/exercise-basic/injection2pniproblem.hh 2025-03-04 21:00:57.449082471 +0100 +--- exercises/exercise-basic/injection2pniproblem.hh 2025-02-26 11:38:46.801818192 +0100 ++++ exercises/solution/exercise-basic/injection2pniproblem.hh 2025-02-26 11:38:46.841816361 +0100 @@ -7,7 +7,7 @@ /*! * \file @@ -401,7 +409,7 @@ diff -ruN exercises/exercise-basic/injection2pniproblem.hh exercises/solution/ex } diff -ruN exercises/exercise-basic/injection2pproblem.hh exercises/solution/exercise-basic/injection2pproblem.hh ---- exercises/exercise-basic/injection2pproblem.hh 2025-03-04 21:00:57.446082551 +0100 +--- exercises/exercise-basic/injection2pproblem.hh 2025-02-26 11:38:46.801818192 +0100 +++ exercises/solution/exercise-basic/injection2pproblem.hh 1970-01-01 01:00:00.000000000 +0100 @@ -1,211 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -616,22 +624,24 @@ diff -ruN exercises/exercise-basic/injection2pproblem.hh exercises/solution/exer - -#endif diff -ruN exercises/exercise-basic/params.input exercises/solution/exercise-basic/params.input ---- exercises/exercise-basic/params.input 2024-07-11 13:35:11.644137283 +0200 -+++ exercises/solution/exercise-basic/params.input 2025-03-03 15:23:33.246567644 +0100 -@@ -24,7 +24,7 @@ +--- exercises/exercise-basic/params.input 2025-02-26 12:13:01.057757112 +0100 ++++ exercises/solution/exercise-basic/params.input 2025-02-26 11:38:46.841816361 +0100 +@@ -23,8 +23,8 @@ + Aquifer.Swr = 0.2 Aquifer.Snr = 0.0 - # these parameters are only used in the nonisothermal model. Uncomment them for that +-# TODO: these parameters are only used in the nonisothermal model. Uncomment them for that -#[Component] -#SolidDensity = 2700 # solid density of granite -#SolidThermalConductivity = 2.8 # solid thermal conducitivity of granite -#SolidHeatCapacity = 790 # solid heat capacity of granite ++# these parameters are only used in the nonisothermal model. Uncomment them for that +[Component] +SolidDensity = 2700 # solid density of granite +SolidThermalConductivity = 2.8 # solid thermal conducitivity of granite +SolidHeatCapacity = 790 # solid heat capacity of granite diff -ruN exercises/exercise-basic/properties2p.hh exercises/solution/exercise-basic/properties2p.hh ---- exercises/exercise-basic/properties2p.hh 2025-03-04 21:00:57.446082551 +0100 +--- exercises/exercise-basic/properties2p.hh 2025-02-26 11:38:46.801818192 +0100 +++ exercises/solution/exercise-basic/properties2p.hh 1970-01-01 01:00:00.000000000 +0100 @@ -1,63 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -698,8 +708,8 @@ diff -ruN exercises/exercise-basic/properties2p.hh exercises/solution/exercise-b - -#endif diff -ruN exercises/exercise-basic/properties2pni.hh exercises/solution/exercise-basic/properties2pni.hh ---- exercises/exercise-basic/properties2pni.hh 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-basic/properties2pni.hh 2025-03-04 21:00:57.449082471 +0100 +--- exercises/exercise-basic/properties2pni.hh 2025-02-26 11:38:46.801818192 +0100 ++++ exercises/solution/exercise-basic/properties2pni.hh 2025-02-26 11:38:46.841816361 +0100 @@ -24,13 +24,9 @@ namespace Dumux::Properties { @@ -716,7 +726,7 @@ diff -ruN exercises/exercise-basic/properties2pni.hh exercises/solution/exercise } // end namespace TTag diff -ruN exercises/exercise-basic/README.md exercises/solution/exercise-basic/README.md ---- exercises/exercise-basic/README.md 2025-03-03 15:23:33.239567801 +0100 +--- exercises/exercise-basic/README.md 2025-03-04 10:55:49.676212309 +0100 +++ exercises/solution/exercise-basic/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,94 +0,0 @@ -# Exercise Basics (DuMuX course) diff --git a/.patches/exercise-biomineralization/exercise-biomineralization.patch b/.patches/exercise-biomineralization/exercise-biomineralization.patch index 65eb7920..7a2f6aae 100644 --- a/.patches/exercise-biomineralization/exercise-biomineralization.patch +++ b/.patches/exercise-biomineralization/exercise-biomineralization.patch @@ -1,9 +1,12 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/solution/exercise-biomineralization/biominproblem.hh ---- exercises/exercise-biomineralization/biominproblem.hh 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-biomineralization/biominproblem.hh 2025-03-04 21:00:57.449082471 +0100 -@@ -19,10 +19,12 @@ +--- exercises/exercise-biomineralization/biominproblem.hh 2025-03-03 11:34:18.218509920 +0100 ++++ exercises/solution/exercise-biomineralization/biominproblem.hh 2025-02-26 11:38:46.841816361 +0100 +@@ -17,12 +17,14 @@ + #include <dumux/common/numeqvector.hh> + #include <dumux/porousmediumflow/problem.hh> - // TODO: dumux-course-task +-// TODO: dumux-course-task 3 ++// TODO: dumux-course-task // include chemistry file here +#include "chemistry/simplebiominreactions.hh" // chemical reactions @@ -14,9 +17,12 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/soluti * \brief Problem biomineralization (MICP) in an experimental setup. */ template <class TypeTag> -@@ -53,6 +55,7 @@ +@@ -51,8 +53,9 @@ + using Element = typename GridView::template Codim<0>::Entity; + using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using SubControlVolume = typename FVElementGeometry::SubControlVolume; - // TODO: dumux-course-task +- // TODO: dumux-course-task 3 ++ // TODO: dumux-course-task // set the chemistry TypeTag + using Chemistry = typename Dumux::SimpleBiominReactions<NumEqVector, VolumeVariables>; @@ -37,9 +43,12 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/soluti && globalPos[1] < 12.0 + eps_ && time_ < injBioTime_) { -@@ -185,6 +188,13 @@ +@@ -183,8 +186,15 @@ + values[conti0EqIdx + CaIdx] = - waterFlux * concCa_ / FluidSystem::molarMass(CaIdx); + values[conti0EqIdx + UreaIdx] = - waterFlux * concUrea_ / FluidSystem::molarMass(UreaIdx); } - // TODO: dumux-course-task +- // TODO: dumux-course-task 5 ++ // TODO: dumux-course-task // Set CO2 injection below aquitard after the injBioTime + if(globalPos[0] < eps_ + && globalPos[1] > 2.0 + eps_ @@ -51,9 +60,12 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/soluti return values; } -@@ -247,14 +257,15 @@ +@@ -245,16 +255,17 @@ + { + NumEqVector source(0.0); - // TODO: dumux-course-task +- // TODO: dumux-course-task 3 ++ // TODO: dumux-course-task // set Chemistry -// Chemistry chemistry; + Chemistry chemistry; @@ -70,8 +82,8 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/soluti { return Kxx_; diff -ruN exercises/exercise-biomineralization/biominspatialparams.hh exercises/solution/exercise-biomineralization/biominspatialparams.hh ---- exercises/exercise-biomineralization/biominspatialparams.hh 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-biomineralization/biominspatialparams.hh 2025-03-04 21:00:57.449082471 +0100 +--- exercises/exercise-biomineralization/biominspatialparams.hh 2025-02-26 11:38:46.802818146 +0100 ++++ exercises/solution/exercise-biomineralization/biominspatialparams.hh 2025-02-26 11:38:46.841816361 +0100 @@ -18,7 +18,7 @@ #include <dumux/material/fluidmatrixinteractions/porosityprecipitation.hh> // TODO: dumux-course-task @@ -91,9 +103,9 @@ diff -ruN exercises/exercise-biomineralization/biominspatialparams.hh exercises/ Scalar initialPorosity_; diff -ruN exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh ---- exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh 2025-03-04 21:00:57.449082471 +0100 -@@ -73,24 +73,26 @@ +--- exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh 2025-03-03 11:26:35.285339610 +0100 ++++ exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh 2025-02-26 11:38:46.841816361 +0100 +@@ -73,36 +73,38 @@ // define and compute some parameters for convenience: const Scalar xwCa = volVars.moleFraction(liquidPhaseIdx,CaIdx); const Scalar densityBiofilm = volVars.solidComponentDensity(BiofilmPhaseIdx); @@ -101,8 +113,9 @@ diff -ruN exercises/exercise-biomineralization/chemistry/simplebiominreactions.h using std::max; const Scalar volFracBiofilm = max(volVars.solidVolumeFraction(BiofilmPhaseIdx),0.0); +- // TODO: dumux-course-task 2 + - // TODO: dumux-course-task ++ // TODO: dumux-course-task // implement mass of biofilm - const Scalar massBiofilm = 0.0; + const Scalar massBiofilm = densityBiofilm * volFracBiofilm; @@ -111,22 +124,24 @@ diff -ruN exercises/exercise-biomineralization/chemistry/simplebiominreactions.h xwCa, volVars.moleFraction(liquidPhaseIdx,CO2Idx)); // [mol_urea/kg_H2O] - // TODO: dumux-course-task +- // TODO: dumux-course-task 2 - // compute rate of ureolysis by implementing Zub and rurea - const Scalar Zub = 0.0; - const Scalar rurea = 0.0; ++ // TODO: dumux-course-task + // compute rate of ureolysis by implementing Z_urease,biofilm and r_urea + const Scalar Zub = kub_ * massBiofilm; // [kg urease/m³] + const Scalar rurea = kUrease_ * Zub * molalityUrea / (kUrea_ + molalityUrea); // [mol/m³s] -- // TODO: dumux-course-task +- // TODO: dumux-course-task 2 // compute/set dissolution and precipitation rate of calcite - const Scalar rprec = 0.0; + const Scalar rprec = rurea; // set source terms - // TODO: dumux-course-task -@@ -98,11 +100,11 @@ +- // TODO: dumux-course-task 2 ++ // TODO: dumux-course-task + // set the source terms using the reaction rates defined above and signs based on the stoichiometry of the reactions. // Hint: Ammonium occurs in the reaction equation, but is not accounted for in this simplified setup. // Additionally, the consumption of water by the reaction may be neglected, as water is present in excess. q[H2OIdx] += 0.0; @@ -143,8 +158,8 @@ diff -ruN exercises/exercise-biomineralization/chemistry/simplebiominreactions.h private: diff -ruN exercises/exercise-biomineralization/CMakeLists.txt exercises/solution/exercise-biomineralization/CMakeLists.txt ---- exercises/exercise-biomineralization/CMakeLists.txt 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-biomineralization/CMakeLists.txt 2025-03-04 21:00:57.449082471 +0100 +--- exercises/exercise-biomineralization/CMakeLists.txt 2025-02-26 11:38:46.801818192 +0100 ++++ exercises/solution/exercise-biomineralization/CMakeLists.txt 2025-02-26 11:38:46.841816361 +0100 @@ -2,9 +2,9 @@ # SPDX-License-Identifier: GPL-3.0-or-later @@ -158,8 +173,8 @@ diff -ruN exercises/exercise-biomineralization/CMakeLists.txt exercises/solution # add a symlink for each input file add_input_file_links() diff -ruN exercises/exercise-biomineralization/components/biofilm.hh exercises/solution/exercise-biomineralization/components/biofilm.hh ---- exercises/exercise-biomineralization/components/biofilm.hh 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-biomineralization/components/biofilm.hh 2025-03-04 21:00:57.449082471 +0100 +--- exercises/exercise-biomineralization/components/biofilm.hh 2025-02-26 11:38:46.802818146 +0100 ++++ exercises/solution/exercise-biomineralization/components/biofilm.hh 2025-02-26 11:38:46.842816315 +0100 @@ -12,9 +12,10 @@ #ifndef DUMUX_BIOFILM_HH #define DUMUX_BIOFILM_HH @@ -173,15 +188,19 @@ diff -ruN exercises/exercise-biomineralization/components/biofilm.hh exercises/s namespace Dumux::Components { diff -ruN exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh ---- exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2025-03-04 21:00:57.450082444 +0100 -@@ -41,10 +41,11 @@ +--- exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2025-03-03 11:37:11.636848883 +0100 ++++ exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2025-02-26 11:38:46.842816315 +0100 +@@ -39,12 +39,13 @@ + PermeabilityType evaluatePermeability(PermeabilityType refPerm, Scalar refPoro, Scalar poro) const + { using std::pow; - // TODO: dumux-course-task +- // TODO: dumux-course-task 6 ++ // TODO: dumux-course-task // read the exponent for the power law from the input file + const Scalar exponent = getParam<Scalar>("PowerLaw.Exponent", 5.0); - // TODO: dumux-course-task +- // TODO: dumux-course-task 6 ++ // TODO: dumux-course-task // return the updated permeability according to K=K_0*(poro/refPoro)^exponent - return refPerm; + return refPerm * pow(poro/refPoro, exponent); @@ -189,8 +208,8 @@ diff -ruN exercises/exercise-biomineralization/fluidmatrixinteractions/permeabil }; diff -ruN exercises/exercise-biomineralization/fluidsystems/biomin.hh exercises/solution/exercise-biomineralization/fluidsystems/biomin.hh ---- exercises/exercise-biomineralization/fluidsystems/biomin.hh 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-biomineralization/fluidsystems/biomin.hh 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-biomineralization/fluidsystems/biomin.hh 2025-02-26 11:38:46.802818146 +0100 ++++ exercises/solution/exercise-biomineralization/fluidsystems/biomin.hh 2025-02-26 11:38:46.842816315 +0100 @@ -219,7 +219,7 @@ static void init() { @@ -201,9 +220,17 @@ diff -ruN exercises/exercise-biomineralization/fluidsystems/biomin.hh exercises/ } diff -ruN exercises/exercise-biomineralization/params.input exercises/solution/exercise-biomineralization/params.input ---- exercises/exercise-biomineralization/params.input 2025-03-03 15:23:33.241567756 +0100 -+++ exercises/solution/exercise-biomineralization/params.input 2025-03-03 15:23:33.246567644 +0100 -@@ -16,10 +16,10 @@ +--- exercises/exercise-biomineralization/params.input 2025-03-03 11:36:58.886338421 +0100 ++++ exercises/solution/exercise-biomineralization/params.input 2025-02-26 11:38:46.842816315 +0100 +@@ -10,18 +10,16 @@ + UpperRight = 20 15 # x-/y-coordinates of the upper-right corner of the grid [m] + Cells = 20 15 # x-/y-resolution of the grid + +-# TODO: dumux-course-task 4 +-# vary parameters InjBioTime, InitBiofilm, InjVolumeflux, ConcUrea and ConcCa + [Initial] + InitDensityW = 997 # [kg/m³] initial wetting density + InitPressure = 1e5 # [Pa] initial pressure InitBiofilm = 0.05 # [-] initial volumefraction biofilm [Injection] @@ -217,7 +244,7 @@ diff -ruN exercises/exercise-biomineralization/params.input exercises/solution/e ConcCa = 40 # [kg/m³] injected calcium concentration (max: 50) ConcUrea = 60 # [kg/m³] injected urea concentration, should be 1.5 times ConcCa (max: 80) -@@ -35,7 +35,6 @@ +@@ -37,7 +35,6 @@ Aquitard.Swr = 0.0 Aquitard.Snr = 0.0 @@ -225,23 +252,26 @@ diff -ruN exercises/exercise-biomineralization/params.input exercises/solution/e [BioCoefficients] RhoBiofilm = 6.9 # [kg/m³] density of biofilm -@@ -48,4 +47,6 @@ +@@ -49,5 +46,7 @@ + [Brine] Salinity = 0.1 - #TODO: dumux-course-task +-#TODO: dumux-course-task 6 -# add the power law's exponent parameter PowerLaw.Exponent = 5.0 ++#TODO: dumux-course-task +# add the power law's exponent parameter PowerLaw.Exponent = 5 +[PowerLaw] +Exponent = 5.0 diff -ruN exercises/exercise-biomineralization/properties.hh exercises/solution/exercise-biomineralization/properties.hh ---- exercises/exercise-biomineralization/properties.hh 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-biomineralization/properties.hh 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-biomineralization/properties.hh 2025-03-03 11:38:57.413788851 +0100 ++++ exercises/solution/exercise-biomineralization/properties.hh 2025-02-26 11:38:46.842816315 +0100 @@ -18,17 +18,20 @@ #include <dumux/discretization/cctpfa.hh> #include <dumux/porousmediumflow/2pncmin/model.hh> #include <dumux/porousmediumflow/problem.hh> -#include <dumux/material/components/simpleco2.hh> //!< Simplified CO2 component based on ideal gas law - // TODO: dumux-course-task +-// TODO: dumux-course-task 7 ++// TODO: dumux-course-task // include the CO2 component and tabulated values from DuMux -#include "solidsystems/biominsolidphase.hh" // The biomineralization solid system +#include <dumux/material/components/co2.hh> //!< CO2 component for use with tabulated values @@ -259,9 +289,12 @@ diff -ruN exercises/exercise-biomineralization/properties.hh exercises/solution/ namespace Properties { //! Create new type tag for the problem -@@ -54,7 +57,7 @@ +@@ -52,9 +55,9 @@ + { + private: using Scalar = GetPropType<TypeTag, Properties::Scalar>; - // TODO: dumux-course-task +- // TODO: dumux-course-task 7 ++ // TODO: dumux-course-task // use the CO2 component with tabulated values - using CO2Impl = Components::SimpleCO2<Scalar>; + using CO2Impl = Components::CO2<Scalar, GeneratedCO2Tables::CO2Tables>; @@ -269,7 +302,7 @@ diff -ruN exercises/exercise-biomineralization/properties.hh exercises/solution/ public: using type = FluidSystems::BioMin<Scalar, CO2Impl, H2OType>; diff -ruN exercises/exercise-biomineralization/README.md exercises/solution/exercise-biomineralization/README.md ---- exercises/exercise-biomineralization/README.md 2025-03-03 15:23:33.240567779 +0100 +--- exercises/exercise-biomineralization/README.md 2025-03-04 10:55:49.676212309 +0100 +++ exercises/solution/exercise-biomineralization/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,257 +0,0 @@ -# Exercise Biomineralization (DuMuX Course) @@ -530,8 +563,8 @@ diff -ruN exercises/exercise-biomineralization/README.md exercises/solution/exer -output.CellData.append((S_gas_0-S_gas_1),'diffS_gas'); -``` diff -ruN exercises/exercise-biomineralization/solidsystems/biominsolidphase.hh exercises/solution/exercise-biomineralization/solidsystems/biominsolidphase.hh ---- exercises/exercise-biomineralization/solidsystems/biominsolidphase.hh 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-biomineralization/solidsystems/biominsolidphase.hh 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-biomineralization/solidsystems/biominsolidphase.hh 2025-02-26 11:38:46.803818101 +0100 ++++ exercises/solution/exercise-biomineralization/solidsystems/biominsolidphase.hh 2025-02-26 11:38:46.842816315 +0100 @@ -15,12 +15,12 @@ #include <string> #include <dune/common/exceptions.hh> 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 d8d19838..c62102c7 100644 --- a/.patches/exercise-coupling-ff-pm/exercise-coupling-ff-pm.patch +++ b/.patches/exercise-coupling-ff-pm/exercise-coupling-ff-pm.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/CMakeLists.txt exercises/solution/exercise-coupling-ff-pm/interface/CMakeLists.txt ---- exercises/exercise-coupling-ff-pm/interface/CMakeLists.txt 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/CMakeLists.txt 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-coupling-ff-pm/interface/CMakeLists.txt 2025-02-26 11:38:46.803818101 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/CMakeLists.txt 2025-02-26 11:38:46.842816315 +0100 @@ -1,10 +1,30 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -36,8 +36,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 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2025-02-28 14:04:01.038375893 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2025-02-26 11:38:46.842816315 +0100 @@ -71,8 +71,7 @@ const auto& globalPos = scvf.dofPosition(); @@ -48,7 +48,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh exer if(onUpperBoundary_(globalPos)) { values.setDirichlet(Indices::velocityXIdx); -@@ -85,20 +84,45 @@ +@@ -85,19 +84,45 @@ values.setDirichlet(Indices::velocityXIdx); values.setDirichlet(Indices::velocityYIdx); } @@ -73,6 +73,9 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh exer // coupling interface if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf)) { +- // TODO: dumux-course-task 1.C +- // set the Beaver-Joseph-Saffman slip condition for the tangential momentum balance equation, +- // consider orientation of face automatically values.setCouplingNeumann(Indices::conti0EqIdx); +#if EXNUMBER < 3 values.setCouplingNeumann(Indices::momentumYBalanceIdx); @@ -84,25 +87,25 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh exer + values.setCouplingNeumann(scvf.directionIndex()); +#endif -- // TODO: dumux-course-task 1.C +#if EXNUMBER < 2 + values.setDirichlet(Indices::velocityXIdx); // assume no slip on interface +#elif EXNUMBER == 2 + // set the Beaver-Joseph-Saffman slip condition for the tangential momentum balance equation + values.setBeaversJoseph(Indices::momentumXBalanceIdx); +#else - // set the Beaver-Joseph-Saffman slip condition for the tangential momentum balance equation, - // consider orientation of face automatically -- ++ // set the Beaver-Joseph-Saffman slip condition for the tangential momentum balance equation, ++ // consider orientation of face automatically + values.setBeaversJoseph(1 - scvf.directionIndex()); +#endif } return values; -@@ -112,9 +136,18 @@ +@@ -111,11 +136,18 @@ PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const { PrimaryVariables values(0.0); +- // TODO: dumux-course-task 1.A +- // set a no-slip, no-flow condition at the top +#if EXNUMBER == 0 values[Indices::velocityYIdx] = -1e-6 * globalPos[0] * (this->gridGeometry().bBoxMax()[0] - globalPos[0]); - // TODO: dumux-course-task 1.A @@ -119,7 +122,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh exer return values; } -@@ -140,9 +173,13 @@ +@@ -141,9 +173,13 @@ if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf)) { values[Indices::conti0EqIdx] = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf); @@ -135,8 +138,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 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/main.cc 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-coupling-ff-pm/interface/main.cc 2025-02-26 11:38:46.803818101 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/main.cc 2025-02-26 11:38:46.842816315 +0100 @@ -52,9 +52,7 @@ using FreeflowTypeTag = Properties::TTag::FreeflowOneP; using PorousMediumTypeTag = Properties::TTag::PorousMediumFlowOneP; @@ -263,9 +266,9 @@ 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/params.input exercises/solution/exercise-coupling-ff-pm/interface/params.input ---- exercises/exercise-coupling-ff-pm/interface/params.input 2025-03-03 15:23:33.242567734 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/params.input 2025-03-03 15:23:33.246567644 +0100 -@@ -1,16 +1,14 @@ +--- exercises/exercise-coupling-ff-pm/interface/params.input 2025-02-28 13:50:32.335817360 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/params.input 2025-02-26 11:38:46.842816315 +0100 +@@ -1,17 +1,14 @@ -# # TODO: dumux-course-task 1.C: uncomment the following group [Grid] -# # for dune-subgrid -#[Grid] @@ -288,22 +291,29 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/params.input exercises/sol +Offset = 0.5 # [m] +Scaling = 0.2 #[m] +-# TODO: dumux-course-task 1.B: change the grid resolution and examine the effects on the velocity profile -# TODO: dumux-course-task 1.C: comment or delete the group [Freeflow.Grid] [Freeflow.Grid] Verbosity = true Positions0 = 0.0 1.0 -@@ -19,7 +17,6 @@ +@@ -20,8 +17,6 @@ Cells1 = 100 Grading1 = 1 +-# TODO: dumux-course-task 1.B: change the grid resolution and examine the effects on the velocity profile -# TODO: dumux-course-task 1.C: comment or delete the group [PorousMedium.Grid] [PorousMedium.Grid] Verbosity = true Positions0 = 0.0 1.0 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 2025-03-04 21:00:57.446082551 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2025-03-04 21:00:57.450082444 +0100 -@@ -68,9 +68,10 @@ +--- exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2025-02-28 12:14:15.560013094 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2025-02-26 11:38:46.842816315 +0100 +@@ -65,14 +65,13 @@ + { + BoundaryTypes values; + +- // TODO: dumux-course-task 1.A +- // Set for all boundaries Neumann no-flow and keep the coupling conditions // set Neumann BCs to all boundaries first values.setAllNeumann(); @@ -316,8 +326,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh // set the coupling boundary condition at the interface if (couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf)) 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 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/properties.hh 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-coupling-ff-pm/interface/properties.hh 2025-02-26 11:38:46.804818055 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/properties.hh 2025-02-26 11:38:46.842816315 +0100 @@ -16,9 +16,9 @@ #include <dumux/multidomain/staggeredtraits.hh> #include <dumux/multidomain/boundary/stokesdarcy/couplingmanager.hh> @@ -374,7 +384,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 2025-03-03 15:23:33.241567756 +0100 +--- exercises/exercise-coupling-ff-pm/interface/README.md 2025-03-04 10:55:49.676212309 +0100 +++ exercises/solution/exercise-coupling-ff-pm/interface/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,175 +0,0 @@ -## 1. Changing the interface @@ -553,8 +563,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/README.md exercises/soluti -What changes to the left boundary conditions in the free-flow domain would you make to introduce this? What conditions can be enforced on the right boundary? -Hint: A relation between velocity and position is used for the vertical velocity component in the original form of the `dirichletAtPos` method. 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 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/CMakeLists.txt 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-coupling-ff-pm/models/CMakeLists.txt 2025-02-26 11:38:46.804818055 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/CMakeLists.txt 2025-02-26 11:38:46.843816269 +0100 @@ -1,9 +1,32 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -593,8 +603,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/CMakeLists.txt exercises/solu + +dune_symlink_to_source_files(FILES "params_orig_a.input" "params_b_c.input" plotFluxes.py) diff -ruN exercises/exercise-coupling-ff-pm/models/main.cc exercises/solution/exercise-coupling-ff-pm/models/main.cc ---- exercises/exercise-coupling-ff-pm/models/main.cc 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/main.cc 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-coupling-ff-pm/models/main.cc 2025-02-26 11:38:46.804818055 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/main.cc 2025-02-26 11:38:46.843816269 +0100 @@ -127,9 +127,15 @@ auto porousMediumGridVariables = std::make_shared<PorousMediumGridVariables>(porousMediumProblem, porousMediumFvGridGeometry); porousMediumGridVariables->init(sol[porousMediumIdx]); @@ -616,7 +626,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 2025-03-03 15:23:33.246567644 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/params_b_c.input 2025-02-26 11:38:46.843816269 +0100 @@ -0,0 +1,57 @@ +[TimeLoop] +DtInitial = 100 # s @@ -676,9 +686,9 @@ 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 2025-03-03 15:23:33.242567734 +0100 +--- exercises/exercise-coupling-ff-pm/models/params.input 2025-02-28 14:41:58.699499416 +0100 +++ exercises/solution/exercise-coupling-ff-pm/models/params.input 1970-01-01 01:00:00.000000000 +0100 -@@ -1,58 +0,0 @@ +@@ -1,60 +0,0 @@ -[TimeLoop] -DtInitial = 100 # s -EpisodeLength = -360 # s # 0.25 days @@ -723,6 +733,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/params.input exercises/soluti - -[Problem] -Name = models_coupling +-# TODO: dumux-course-task 2.B: enable ExportStorage for .csv output file, +-# enable plotting for gnuplot, enable ExportFluxes to export to .json file -ExportStorage = false -PlotStorage = false -ExportFluxes = false @@ -739,7 +751,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 2025-03-03 15:23:33.246567644 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/params_orig_a.input 2025-02-26 11:38:46.843816269 +0100 @@ -0,0 +1,56 @@ +[TimeLoop] +DtInitial = 100 # s @@ -798,8 +810,8 @@ 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 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh 2025-02-26 11:38:46.804818055 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh 2025-02-26 11:38:46.843816269 +0100 @@ -52,10 +52,15 @@ // primary variable indices static constexpr int conti0EqIdx = Indices::conti0EqIdx; @@ -921,8 +933,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh exe std::shared_ptr<CouplingManager> couplingManager_; diff -ruN exercises/exercise-coupling-ff-pm/models/properties.hh exercises/solution/exercise-coupling-ff-pm/models/properties.hh ---- exercises/exercise-coupling-ff-pm/models/properties.hh 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/properties.hh 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-coupling-ff-pm/models/properties.hh 2025-02-26 11:38:46.804818055 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/properties.hh 2025-02-26 11:38:46.843816269 +0100 @@ -25,12 +25,14 @@ #include <dumux/discretization/cctpfa.hh> #include <dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh> @@ -1005,7 +1017,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 2025-03-03 15:23:33.242567734 +0100 +--- exercises/exercise-coupling-ff-pm/models/README.md 2025-02-26 11:38:46.804818055 +0100 +++ 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 @@ -1127,7 +1139,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). diff -ruN exercises/exercise-coupling-ff-pm/README.md exercises/solution/exercise-coupling-ff-pm/README.md ---- exercises/exercise-coupling-ff-pm/README.md 2025-03-03 15:23:33.241567756 +0100 +--- exercises/exercise-coupling-ff-pm/README.md 2025-02-26 11:38:46.803818101 +0100 +++ 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) @@ -1256,8 +1268,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/README.md exercises/solution/exercis -* [**Exercise 2:** Changing the porous medium model](./models/README.md) -* [**Exercise 3:** Introducing a turbulence model in the free flow domain](./turbulence/README.md) 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 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/CMakeLists.txt 2025-03-04 21:00:57.450082444 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/CMakeLists.txt 2025-02-26 11:38:46.804818055 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/CMakeLists.txt 2025-02-26 11:38:46.843816269 +0100 @@ -1,10 +1,33 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -1296,8 +1308,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/CMakeLists.txt exercises/ # add a symlink for each input file add_input_file_links() diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exercises/solution/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh ---- exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh 2025-02-26 11:38:46.805818009 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh 2025-02-26 11:38:46.843816269 +0100 @@ -8,8 +8,8 @@ * \file * \brief The free-flow sub problem @@ -1513,8 +1525,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe return values; } diff -ruN exercises/exercise-coupling-ff-pm/turbulence/main.cc exercises/solution/exercise-coupling-ff-pm/turbulence/main.cc ---- exercises/exercise-coupling-ff-pm/turbulence/main.cc 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/main.cc 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/main.cc 2025-02-26 11:38:46.805818009 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/main.cc 2025-02-26 11:38:46.843816269 +0100 @@ -122,11 +122,12 @@ couplingManager->init(freeflowProblem, porousMediumProblem, sol); @@ -1545,7 +1557,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 2025-03-03 15:23:33.246567644 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/params_b.input 2025-02-26 11:38:46.843816269 +0100 @@ -0,0 +1,72 @@ +[TimeLoop] +DtInitial = 1e-1 # [s] @@ -1621,7 +1633,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 2025-03-03 15:23:33.246567644 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/params_c_d.input 2025-02-26 11:38:46.843816269 +0100 @@ -0,0 +1,72 @@ +[TimeLoop] +DtInitial = 1e-1 # [s] @@ -1696,7 +1708,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 2025-03-03 15:23:33.243567711 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/params.input 2025-02-26 11:38:46.805818009 +0100 +++ exercises/solution/exercise-coupling-ff-pm/turbulence/params.input 1970-01-01 01:00:00.000000000 +0100 @@ -1,73 +0,0 @@ -[TimeLoop] @@ -1774,7 +1786,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 2025-03-03 15:23:33.246567644 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/params_orig_a.input 2025-02-26 11:38:46.843816269 +0100 @@ -0,0 +1,72 @@ +[TimeLoop] +DtInitial = 1e-1 # [s] @@ -1849,8 +1861,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params_orig_a.input exerc +[RANS] +IsFlatWallBounded = True diff -ruN exercises/exercise-coupling-ff-pm/turbulence/properties.hh exercises/solution/exercise-coupling-ff-pm/turbulence/properties.hh ---- exercises/exercise-coupling-ff-pm/turbulence/properties.hh 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/properties.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/properties.hh 2025-02-26 11:38:46.805818009 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/properties.hh 2025-02-26 11:38:46.843816269 +0100 @@ -8,8 +8,8 @@ * \file * \brief The coupled exercise properties file or the turbulent case. @@ -1892,7 +1904,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 2025-03-03 15:23:33.242567734 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/README.md 2025-03-04 10:55:49.677212273 +0100 +++ 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/.patches/exercise-dunemodule/exercise-dunemodule.patch b/.patches/exercise-dunemodule/exercise-dunemodule.patch index 8eec6797..f941f82d 100644 --- a/.patches/exercise-dunemodule/exercise-dunemodule.patch +++ b/.patches/exercise-dunemodule/exercise-dunemodule.patch @@ -1,5 +1,5 @@ diff -ruN exercises/exercise-dunemodule/README.md exercises/solution/exercise-dunemodule/README.md ---- exercises/exercise-dunemodule/README.md 2025-03-03 15:23:33.243567711 +0100 +--- exercises/exercise-dunemodule/README.md 2025-02-26 11:38:46.805818009 +0100 +++ exercises/solution/exercise-dunemodule/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,114 +0,0 @@ -# Exercise New Dune Module (DuMuX course) diff --git a/.patches/exercise-fluidsystem/exercise-fluidsystem.patch b/.patches/exercise-fluidsystem/exercise-fluidsystem.patch index 0b394727..a71e36d2 100644 --- a/.patches/exercise-fluidsystem/exercise-fluidsystem.patch +++ b/.patches/exercise-fluidsystem/exercise-fluidsystem.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-fluidsystem/2p2cproblem.hh exercises/solution/exercise-fluidsystem/2p2cproblem.hh ---- exercises/exercise-fluidsystem/2p2cproblem.hh 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-fluidsystem/2p2cproblem.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fluidsystem/2p2cproblem.hh 2025-02-26 11:38:46.805818009 +0100 ++++ exercises/solution/exercise-fluidsystem/2p2cproblem.hh 2025-02-26 11:38:46.843816269 +0100 @@ -12,7 +12,7 @@ #ifndef DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH #define DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH @@ -11,8 +11,8 @@ diff -ruN exercises/exercise-fluidsystem/2p2cproblem.hh exercises/solution/exerc #include <dumux/common/boundarytypes.hh> #include <dumux/common/properties.hh> diff -ruN exercises/exercise-fluidsystem/2pproperties.hh exercises/solution/exercise-fluidsystem/2pproperties.hh ---- exercises/exercise-fluidsystem/2pproperties.hh 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-fluidsystem/2pproperties.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fluidsystem/2pproperties.hh 2025-02-26 11:38:46.805818009 +0100 ++++ exercises/solution/exercise-fluidsystem/2pproperties.hh 2025-02-26 11:38:46.843816269 +0100 @@ -25,15 +25,13 @@ #include "spatialparams.hh" @@ -52,8 +52,8 @@ diff -ruN exercises/exercise-fluidsystem/2pproperties.hh exercises/solution/exer public: using type = typename FluidSystems::TwoPImmiscible<Scalar, LiquidWaterPhase, LiquidMyComponentPhase>; diff -ruN exercises/exercise-fluidsystem/aparams.input exercises/solution/exercise-fluidsystem/aparams.input ---- exercises/exercise-fluidsystem/aparams.input 2025-03-03 15:23:33.243567711 +0100 -+++ exercises/solution/exercise-fluidsystem/aparams.input 2025-03-03 15:23:33.246567644 +0100 +--- exercises/exercise-fluidsystem/aparams.input 2025-02-27 11:12:28.808186516 +0100 ++++ exercises/solution/exercise-fluidsystem/aparams.input 2025-02-26 11:38:46.843816269 +0100 @@ -3,7 +3,7 @@ DtInitial = 10 # initial time step size [s] @@ -63,15 +63,16 @@ diff -ruN exercises/exercise-fluidsystem/aparams.input exercises/solution/exerci [SpatialParams] BrooksCoreyPcEntry = 5.0e2 # [Pa] -@@ -20,4 +20,4 @@ +@@ -20,5 +20,4 @@ Cells = 60 60 # x-/y-resolution of the grid [Output] +-# TODO Task 2.2: Set the plot density to true -PlotDensity = false # plot density over pressure for your component +PlotDensity = true # plot density over pressure for your component diff -ruN exercises/exercise-fluidsystem/bparams.input exercises/solution/exercise-fluidsystem/bparams.input ---- exercises/exercise-fluidsystem/bparams.input 2025-03-03 15:23:33.243567711 +0100 -+++ exercises/solution/exercise-fluidsystem/bparams.input 2025-03-03 15:23:33.246567644 +0100 +--- exercises/exercise-fluidsystem/bparams.input 2025-02-26 11:38:46.806817963 +0100 ++++ exercises/solution/exercise-fluidsystem/bparams.input 2025-02-26 11:38:46.844816223 +0100 @@ -3,7 +3,7 @@ DtInitial = 10 # initial time step size [s] @@ -82,8 +83,8 @@ diff -ruN exercises/exercise-fluidsystem/bparams.input exercises/solution/exerci [SpatialParams] BrooksCoreyPcEntry = 5.0e2 # [Pa] diff -ruN exercises/exercise-fluidsystem/CMakeLists.txt exercises/solution/exercise-fluidsystem/CMakeLists.txt ---- exercises/exercise-fluidsystem/CMakeLists.txt 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-fluidsystem/CMakeLists.txt 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fluidsystem/CMakeLists.txt 2025-02-26 11:38:46.805818009 +0100 ++++ exercises/solution/exercise-fluidsystem/CMakeLists.txt 2025-02-26 11:38:46.843816269 +0100 @@ -3,18 +3,16 @@ # executables for exercise part a & b @@ -110,8 +111,8 @@ diff -ruN exercises/exercise-fluidsystem/CMakeLists.txt exercises/solution/exerc -# add a symlink for the grids folder -dune_symlink_to_source_files(FILES grids) diff -ruN exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh exercises/solution/exercise-fluidsystem/components/mycompressiblecomponent.hh ---- exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-fluidsystem/components/mycompressiblecomponent.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh 2025-02-26 11:38:46.806817963 +0100 ++++ exercises/solution/exercise-fluidsystem/components/mycompressiblecomponent.hh 2025-02-26 11:38:46.844816223 +0100 @@ -38,7 +38,7 @@ static std::string name() { return "MyCompressibleComponent"; } @@ -173,8 +174,8 @@ diff -ruN exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh e }; diff -ruN exercises/exercise-fluidsystem/components/myincompressiblecomponent.hh exercises/solution/exercise-fluidsystem/components/myincompressiblecomponent.hh ---- exercises/exercise-fluidsystem/components/myincompressiblecomponent.hh 2025-03-04 21:00:57.447082525 +0100 -+++ exercises/solution/exercise-fluidsystem/components/myincompressiblecomponent.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fluidsystem/components/myincompressiblecomponent.hh 2025-02-26 11:38:46.806817963 +0100 ++++ exercises/solution/exercise-fluidsystem/components/myincompressiblecomponent.hh 2025-02-26 11:38:46.844816223 +0100 @@ -48,10 +48,7 @@ */ static Scalar molarMass() @@ -213,7 +214,7 @@ diff -ruN exercises/exercise-fluidsystem/components/myincompressiblecomponent.hh diff -ruN exercises/exercise-fluidsystem/components/plotdensityfunction.py exercises/solution/exercise-fluidsystem/components/plotdensityfunction.py --- exercises/exercise-fluidsystem/components/plotdensityfunction.py 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-fluidsystem/components/plotdensityfunction.py 2025-03-04 21:00:57.451082417 +0100 ++++ exercises/solution/exercise-fluidsystem/components/plotdensityfunction.py 2025-02-26 11:38:46.844816223 +0100 @@ -0,0 +1,22 @@ +#!usr/bin/env python +# SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder @@ -238,8 +239,8 @@ diff -ruN exercises/exercise-fluidsystem/components/plotdensityfunction.py exerc +plt.semilogx(p, r) +plt.show() diff -ruN exercises/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh exercises/solution/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh ---- exercises/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh 2025-02-26 11:38:46.806817963 +0100 ++++ exercises/solution/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh 2025-02-26 11:38:46.844816223 +0100 @@ -20,10 +20,10 @@ #include <dumux/material/fluidsystems/base.hh> @@ -276,8 +277,8 @@ diff -ruN exercises/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent else { diff -ruN exercises/exercise-fluidsystem/main.cc exercises/solution/exercise-fluidsystem/main.cc ---- exercises/exercise-fluidsystem/main.cc 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fluidsystem/main.cc 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fluidsystem/main.cc 2025-02-26 11:38:46.806817963 +0100 ++++ exercises/solution/exercise-fluidsystem/main.cc 2025-02-26 11:38:46.844816223 +0100 @@ -36,7 +36,7 @@ int main(int argc, char** argv) { @@ -303,7 +304,7 @@ diff -ruN exercises/exercise-fluidsystem/main.cc exercises/solution/exercise-flu using IOFields = GetPropType<TypeTag, Properties::IOFields>; VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name()); diff -ruN exercises/exercise-fluidsystem/README.md exercises/solution/exercise-fluidsystem/README.md ---- exercises/exercise-fluidsystem/README.md 2025-03-03 15:23:33.243567711 +0100 +--- exercises/exercise-fluidsystem/README.md 2025-03-04 10:55:49.677212273 +0100 +++ exercises/solution/exercise-fluidsystem/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,265 +0,0 @@ -# Exercise Fluidsystem (DuMuX Course) @@ -572,8 +573,8 @@ diff -ruN exercises/exercise-fluidsystem/README.md exercises/solution/exercise-f -./exercise_fluidsystem_b bparams.input -``` diff -ruN exercises/exercise-fluidsystem/spatialparams.hh exercises/solution/exercise-fluidsystem/spatialparams.hh ---- exercises/exercise-fluidsystem/spatialparams.hh 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fluidsystem/spatialparams.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fluidsystem/spatialparams.hh 2025-02-26 11:38:46.806817963 +0100 ++++ exercises/solution/exercise-fluidsystem/spatialparams.hh 2025-02-26 11:38:46.844816223 +0100 @@ -113,13 +113,17 @@ template<class FluidSystem> int wettingPhaseAtPos(const GlobalPosition& globalPos) const diff --git a/.patches/exercise-fractures/exercise-fractures.patch b/.patches/exercise-fractures/exercise-fractures.patch index 0867fd19..a786a05b 100644 --- a/.patches/exercise-fractures/exercise-fractures.patch +++ b/.patches/exercise-fractures/exercise-fractures.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-fractures/CMakeLists.txt exercises/solution/exercise-fractures/CMakeLists.txt ---- exercises/exercise-fractures/CMakeLists.txt 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fractures/CMakeLists.txt 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fractures/CMakeLists.txt 2025-02-26 11:38:46.806817963 +0100 ++++ exercises/solution/exercise-fractures/CMakeLists.txt 2025-02-26 11:38:46.844816223 +0100 @@ -1,9 +1,26 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -32,7 +32,7 @@ diff -ruN exercises/exercise-fractures/CMakeLists.txt exercises/solution/exercis add_input_file_links() diff -ruN exercises/exercise-fractures/exercise_fractures_solution_a.input exercises/solution/exercise-fractures/exercise_fractures_solution_a.input --- exercises/exercise-fractures/exercise_fractures_solution_a.input 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-fractures/exercise_fractures_solution_a.input 2024-07-11 13:35:11.680138513 +0200 ++++ exercises/solution/exercise-fractures/exercise_fractures_solution_a.input 2025-02-26 11:38:46.844816223 +0100 @@ -0,0 +1,41 @@ +[TimeLoop] +TEnd = 30000 # [s] @@ -77,7 +77,7 @@ diff -ruN exercises/exercise-fractures/exercise_fractures_solution_a.input exerc +SpatialParams.Barrier.Swr = 0.0 diff -ruN exercises/exercise-fractures/exercise_fractures_solution_b.input exercises/solution/exercise-fractures/exercise_fractures_solution_b.input --- exercises/exercise-fractures/exercise_fractures_solution_b.input 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-fractures/exercise_fractures_solution_b.input 2024-07-11 13:35:11.680138513 +0200 ++++ exercises/solution/exercise-fractures/exercise_fractures_solution_b.input 2025-02-26 11:38:46.844816223 +0100 @@ -0,0 +1,41 @@ +[TimeLoop] +TEnd = 30000 # [s] @@ -122,7 +122,7 @@ diff -ruN exercises/exercise-fractures/exercise_fractures_solution_b.input exerc +SpatialParams.Barrier.Swr = 0.0 diff -ruN exercises/exercise-fractures/exercise_fractures_solution_c.input exercises/solution/exercise-fractures/exercise_fractures_solution_c.input --- exercises/exercise-fractures/exercise_fractures_solution_c.input 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-fractures/exercise_fractures_solution_c.input 2024-07-11 13:35:11.680138513 +0200 ++++ exercises/solution/exercise-fractures/exercise_fractures_solution_c.input 2025-02-26 11:38:46.844816223 +0100 @@ -0,0 +1,41 @@ +[TimeLoop] +TEnd = 30000 # [s] @@ -166,8 +166,8 @@ diff -ruN exercises/exercise-fractures/exercise_fractures_solution_c.input exerc +SpatialParams.Barrier.Snr = 0.0 +SpatialParams.Barrier.Swr = 0.0 diff -ruN exercises/exercise-fractures/fractureproblem.hh exercises/solution/exercise-fractures/fractureproblem.hh ---- exercises/exercise-fractures/fractureproblem.hh 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fractures/fractureproblem.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fractures/fractureproblem.hh 2025-02-26 11:38:46.806817963 +0100 ++++ exercises/solution/exercise-fractures/fractureproblem.hh 2025-02-26 11:38:46.844816223 +0100 @@ -59,6 +59,10 @@ std::shared_ptr<typename ParentType::SpatialParams> spatialParams, const std::string& paramGroup) @@ -199,8 +199,8 @@ diff -ruN exercises/exercise-fractures/fractureproblem.hh exercises/solution/exe return values; } diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/solution/exercise-fractures/fracturespatialparams.hh ---- exercises/exercise-fractures/fracturespatialparams.hh 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fractures/fracturespatialparams.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fractures/fracturespatialparams.hh 2025-03-03 10:33:05.767624826 +0100 ++++ exercises/solution/exercise-fractures/fracturespatialparams.hh 2025-02-26 11:38:46.844816223 +0100 @@ -41,6 +41,7 @@ using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -226,7 +226,7 @@ diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/soluti const SubControlVolume& scv, const ElementSolution& elemSol) const { -- // TODO dumux-course-task B +- // TODO dumux-course-task B/C - // Change fracture properties - return permeability_; + // in the unmodified state and exercise part a return the non-barrier parameters @@ -252,7 +252,7 @@ diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/soluti const SubControlVolume& scv, const ElementSolution& elemSol) const { -- // TODO dumux-course-task B +- // TODO dumux-course-task B/C - // Change fracture properties - return porosity_; + // in the unmodified state and exercise part a return the non-barrier parameters @@ -278,7 +278,7 @@ diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/soluti const SubControlVolume& scv, const ElementSolution& elemSol) const { -- // TODO dumux-course-task B +- // TODO dumux-course-task B/C - // Change fracture properties - return makeFluidMatrixInteraction(pcKrSwCurve_); + // in the unmodified state and exercise part a return the non-barrier parameters @@ -322,8 +322,8 @@ diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/soluti } // end namespace Dumux diff -ruN exercises/exercise-fractures/main.cc exercises/solution/exercise-fractures/main.cc ---- exercises/exercise-fractures/main.cc 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fractures/main.cc 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fractures/main.cc 2025-02-26 11:38:46.808817872 +0100 ++++ exercises/solution/exercise-fractures/main.cc 2025-02-26 11:38:46.845816177 +0100 @@ -245,4 +245,5 @@ Parameters::print(); @@ -331,8 +331,8 @@ diff -ruN exercises/exercise-fractures/main.cc exercises/solution/exercise-fract + }// end main diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exercise-fractures/matrixproblem.hh ---- exercises/exercise-fractures/matrixproblem.hh 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fractures/matrixproblem.hh 2025-03-04 21:00:57.451082417 +0100 +--- exercises/exercise-fractures/matrixproblem.hh 2025-03-03 10:40:58.942820843 +0100 ++++ exercises/solution/exercise-fractures/matrixproblem.hh 2025-02-26 11:38:46.845816177 +0100 @@ -65,11 +65,18 @@ : ParentType(gridGeometry, spatialParams, paramGroup) , boundaryOverPressure_(getParamFromGroup<Scalar>(paramGroup, "Problem.BoundaryOverPressure")) @@ -383,14 +383,16 @@ diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exerc return values; } -@@ -107,10 +124,30 @@ +@@ -107,12 +124,29 @@ // the interior boundary conditions to Dirichlet. // IMPORTANT: Note that you will never be asked to set any values at the interior boundaries! // This simply chooses a different interface condition! -- // TODO dumux-course-task C +- // TODO dumux-course-task B - // Change coupling conditions! values.setAllDirichlet(); +- // TODO dumux-course-task additional task +- // Set interior boundary condition depending on the domain marker of the fracture domain elements! + if (isExercisePartB_) + values.setAllNeumann(); + else if (isExercisePartC_) @@ -412,11 +414,10 @@ diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exerc + if (fractureElementMarker == 2) + values.setAllNeumann(); + } -+ + return values; } - -@@ -120,11 +157,23 @@ +@@ -123,11 +157,23 @@ // initialize values with the initial conditions auto values = initialAtPos(globalPos); @@ -445,7 +446,7 @@ diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exerc return values; } -@@ -158,6 +207,9 @@ +@@ -161,6 +207,9 @@ Scalar boundaryOverPressure_; Scalar boundarySaturation_; @@ -456,8 +457,8 @@ diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exerc } // end namespace Dumux diff -ruN exercises/exercise-fractures/matrixspatialparams.hh exercises/solution/exercise-fractures/matrixspatialparams.hh ---- exercises/exercise-fractures/matrixspatialparams.hh 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fractures/matrixspatialparams.hh 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-fractures/matrixspatialparams.hh 2025-02-26 11:38:46.808817872 +0100 ++++ exercises/solution/exercise-fractures/matrixspatialparams.hh 2025-02-26 11:38:46.845816177 +0100 @@ -40,6 +40,7 @@ using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -467,11 +468,13 @@ diff -ruN exercises/exercise-fractures/matrixspatialparams.hh exercises/solution public: diff -ruN exercises/exercise-fractures/params.input exercises/solution/exercise-fractures/params.input ---- exercises/exercise-fractures/params.input 2024-07-11 13:35:11.652137556 +0200 -+++ exercises/solution/exercise-fractures/params.input 2024-07-11 13:35:11.680138513 +0200 -@@ -5,6 +5,9 @@ +--- exercises/exercise-fractures/params.input 2025-03-03 10:08:54.361892136 +0100 ++++ exercises/solution/exercise-fractures/params.input 2025-02-26 11:38:46.845816177 +0100 +@@ -4,8 +4,10 @@ + MaxTimeStepSize = 2500 # [s] [Problem] +-# TODO dumux-course-task A: switch off gravity EnableGravity = true +IsExercisePartA = false +IsExercisePartB = false @@ -479,7 +482,7 @@ diff -ruN exercises/exercise-fractures/params.input exercises/solution/exercise- [Grid] File = ./grids/complex.msh -@@ -16,8 +19,8 @@ +@@ -17,8 +19,8 @@ Problem.BoundarySaturation = 0.5 SpatialParams.Permeability = 1e-12 SpatialParams.Porosity = 0.1 @@ -490,10 +493,11 @@ diff -ruN exercises/exercise-fractures/params.input exercises/solution/exercise- SpatialParams.Snr = 0.0 SpatialParams.Swr = 0.0 -@@ -28,11 +31,11 @@ +@@ -29,12 +31,11 @@ SpatialParams.PermeabilityBarrier = 1e-16 SpatialParams.Porosity = 0.85 SpatialParams.PorosityBarrier = 0.05 +-# TODO: set the VGAlpha parameter e.g. to 1e.5 and examine the nitrogen saturation in the fracture tips (then reset to 1e-1 again) -SpatialParams.VanGenuchtenAlpha = 1e-1 -SpatialParams.VanGenuchtenN = 2 -SpatialParams.Swr = 0.0 @@ -510,8 +514,8 @@ diff -ruN exercises/exercise-fractures/params.input exercises/solution/exercise- +SpatialParams.Swr = 0.0 +SpatialParams.SwrBarrier = 0.0 diff -ruN exercises/exercise-fractures/properties.hh exercises/solution/exercise-fractures/properties.hh ---- exercises/exercise-fractures/properties.hh 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-fractures/properties.hh 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-fractures/properties.hh 2025-02-26 11:38:46.808817872 +0100 ++++ exercises/solution/exercise-fractures/properties.hh 2025-02-26 11:38:46.845816177 +0100 @@ -45,6 +45,7 @@ // with tpfa. #include <dumux/multidomain/facet/cellcentered/tpfa/properties.hh> @@ -530,7 +534,7 @@ diff -ruN exercises/exercise-fractures/properties.hh exercises/solution/exercise struct Grid<TypeTag, TTag::MatrixProblem> { using type = Dune::ALUGrid<2, 2, Dune::simplex, Dune::conforming>; }; template<class TypeTag> diff -ruN exercises/exercise-fractures/README.md exercises/solution/exercise-fractures/README.md ---- exercises/exercise-fractures/README.md 2025-03-03 15:23:33.244567689 +0100 +--- exercises/exercise-fractures/README.md 2025-03-04 10:55:49.677212273 +0100 +++ exercises/solution/exercise-fractures/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,216 +0,0 @@ -# Exercise Discrete Fractures (DuMuX Course) diff --git a/.patches/exercise-grids/exercise-grids.patch b/.patches/exercise-grids/exercise-grids.patch index eb36de05..57d8511d 100644 --- a/.patches/exercise-grids/exercise-grids.patch +++ b/.patches/exercise-grids/exercise-grids.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-grids/CMakeLists.txt exercises/solution/exercise-grids/CMakeLists.txt ---- exercises/exercise-grids/CMakeLists.txt 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-grids/CMakeLists.txt 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-grids/CMakeLists.txt 2025-02-26 11:38:46.808817872 +0100 ++++ exercises/solution/exercise-grids/CMakeLists.txt 2025-02-26 11:38:46.845816177 +0100 @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later @@ -11,7 +11,7 @@ diff -ruN exercises/exercise-grids/CMakeLists.txt exercises/solution/exercise-gr # add a symlink for each input file diff -ruN exercises/exercise-grids/grids/grid_structured.dgf exercises/solution/exercise-grids/grids/grid_structured.dgf ---- exercises/exercise-grids/grids/grid_structured.dgf 2024-07-11 13:35:11.652137556 +0200 +--- exercises/exercise-grids/grids/grid_structured.dgf 2025-02-26 11:38:46.808817872 +0100 +++ exercises/solution/exercise-grids/grids/grid_structured.dgf 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -DGF @@ -21,7 +21,7 @@ diff -ruN exercises/exercise-grids/grids/grid_structured.dgf exercises/solution/ -30 20 % cells in x and y direction -# diff -ruN exercises/exercise-grids/grids/grid_structured.geo exercises/solution/exercise-grids/grids/grid_structured.geo ---- exercises/exercise-grids/grids/grid_structured.geo 2024-07-11 13:35:11.652137556 +0200 +--- exercises/exercise-grids/grids/grid_structured.geo 2025-02-26 11:38:46.808817872 +0100 +++ exercises/solution/exercise-grids/grids/grid_structured.geo 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -X = 60; @@ -55,8 +55,8 @@ diff -ruN exercises/exercise-grids/grids/grid_structured.geo exercises/solution/ -Transfinite Volume "*"; - diff -ruN exercises/exercise-grids/main.cc exercises/solution/exercise-grids/main.cc ---- exercises/exercise-grids/main.cc 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-grids/main.cc 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-grids/main.cc 2025-02-26 11:38:46.809817826 +0100 ++++ exercises/solution/exercise-grids/main.cc 2025-02-26 11:38:46.846816132 +0100 @@ -6,7 +6,7 @@ // /*! @@ -67,8 +67,8 @@ diff -ruN exercises/exercise-grids/main.cc exercises/solution/exercise-grids/mai #include <config.h> diff -ruN exercises/exercise-grids/params.input exercises/solution/exercise-grids/params.input ---- exercises/exercise-grids/params.input 2025-03-03 15:23:33.244567689 +0100 -+++ exercises/solution/exercise-grids/params.input 2024-07-11 13:35:11.680138513 +0200 +--- exercises/exercise-grids/params.input 2025-02-26 11:38:46.809817826 +0100 ++++ exercises/solution/exercise-grids/params.input 2025-02-26 11:38:46.846816132 +0100 @@ -3,13 +3,34 @@ TEnd = 3.154e9 # in seconds, i.e ten years @@ -110,8 +110,8 @@ diff -ruN exercises/exercise-grids/params.input exercises/solution/exercise-grid [Problem] Name = grid_exercise diff -ruN exercises/exercise-grids/properties.hh exercises/solution/exercise-grids/properties.hh ---- exercises/exercise-grids/properties.hh 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-grids/properties.hh 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-grids/properties.hh 2025-02-26 11:38:46.809817826 +0100 ++++ exercises/solution/exercise-grids/properties.hh 2025-02-26 11:38:46.846816132 +0100 @@ -5,9 +5,9 @@ // SPDX-License-Identifier: GPL-3.0-or-later // @@ -163,7 +163,7 @@ diff -ruN exercises/exercise-grids/properties.hh exercises/solution/exercise-gri // Set the problem property template<class TypeTag> diff -ruN exercises/exercise-grids/README.md exercises/solution/exercise-grids/README.md ---- exercises/exercise-grids/README.md 2025-03-03 15:23:33.244567689 +0100 +--- exercises/exercise-grids/README.md 2025-02-26 11:38:46.808817872 +0100 +++ exercises/solution/exercise-grids/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,159 +0,0 @@ -# Exercise Grids (DuMuX course) diff --git a/.patches/exercise-mainfile/exercise-mainfile.patch b/.patches/exercise-mainfile/exercise-mainfile.patch index acaedcbf..e7d1e8d3 100644 --- a/.patches/exercise-mainfile/exercise-mainfile.patch +++ b/.patches/exercise-mainfile/exercise-mainfile.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-mainfile/CMakeLists.txt exercises/solution/exercise-mainfile/CMakeLists.txt ---- exercises/exercise-mainfile/CMakeLists.txt 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-mainfile/CMakeLists.txt 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-mainfile/CMakeLists.txt 2025-02-26 11:38:46.809817826 +0100 ++++ exercises/solution/exercise-mainfile/CMakeLists.txt 2025-02-26 11:38:46.846816132 +0100 @@ -2,14 +2,9 @@ # SPDX-License-Identifier: GPL-3.0-or-later @@ -20,7 +20,7 @@ diff -ruN exercises/exercise-mainfile/CMakeLists.txt exercises/solution/exercise # add a symlink for each input file add_input_file_links() diff -ruN exercises/exercise-mainfile/exercise1pamain.cc exercises/solution/exercise-mainfile/exercise1pamain.cc ---- exercises/exercise-mainfile/exercise1pamain.cc 2025-03-04 21:00:57.448082498 +0100 +--- exercises/exercise-mainfile/exercise1pamain.cc 2025-02-26 11:38:46.809817826 +0100 +++ exercises/solution/exercise-mainfile/exercise1pamain.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,130 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -155,7 +155,7 @@ diff -ruN exercises/exercise-mainfile/exercise1pamain.cc exercises/solution/exer -}// end main diff -ruN exercises/exercise-mainfile/exercise1pa_solution_main.cc exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc --- exercises/exercise-mainfile/exercise1pa_solution_main.cc 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc 2025-03-04 21:00:57.452082391 +0100 ++++ exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc 2025-02-26 11:38:46.847816086 +0100 @@ -0,0 +1,130 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: @@ -288,7 +288,7 @@ diff -ruN exercises/exercise-mainfile/exercise1pa_solution_main.cc exercises/sol + +}// end main diff -ruN exercises/exercise-mainfile/exercise1pbmain.cc exercises/solution/exercise-mainfile/exercise1pbmain.cc ---- exercises/exercise-mainfile/exercise1pbmain.cc 2025-03-04 21:00:57.448082498 +0100 +--- exercises/exercise-mainfile/exercise1pbmain.cc 2025-02-26 11:38:46.810817780 +0100 +++ exercises/solution/exercise-mainfile/exercise1pbmain.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,120 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -412,7 +412,7 @@ diff -ruN exercises/exercise-mainfile/exercise1pbmain.cc exercises/solution/exer - -}// end main diff -ruN exercises/exercise-mainfile/exercise1pcmain.cc exercises/solution/exercise-mainfile/exercise1pcmain.cc ---- exercises/exercise-mainfile/exercise1pcmain.cc 2025-03-04 21:00:57.448082498 +0100 +--- exercises/exercise-mainfile/exercise1pcmain.cc 2025-02-26 11:38:46.810817780 +0100 +++ exercises/solution/exercise-mainfile/exercise1pcmain.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,146 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -562,9 +562,9 @@ diff -ruN exercises/exercise-mainfile/exercise1pcmain.cc exercises/solution/exer - -}// end main diff -ruN exercises/exercise-mainfile/exercise_mainfile_a.input exercises/solution/exercise-mainfile/exercise_mainfile_a.input ---- exercises/exercise-mainfile/exercise_mainfile_a.input 2024-07-11 13:35:11.652137556 +0200 +--- exercises/exercise-mainfile/exercise_mainfile_a.input 2025-02-26 13:56:01.169864268 +0100 +++ exercises/solution/exercise-mainfile/exercise_mainfile_a.input 1970-01-01 01:00:00.000000000 +0100 -@@ -1,18 +0,0 @@ +@@ -1,19 +0,0 @@ -[Grid] -LowerLeft = 0 0 -UpperRight = 1 1 @@ -582,10 +582,11 @@ diff -ruN exercises/exercise-mainfile/exercise_mainfile_a.input exercises/soluti - -[Assembly.NumericDifference] -PriVarMagnitude = 1e5 +-# TODO: Task 3: Change BaseEpsilon to a smaller value 1e-15 -BaseEpsilon = 1e-10 diff -ruN exercises/exercise-mainfile/exercise_mainfile_a_solution.input exercises/solution/exercise-mainfile/exercise_mainfile_a_solution.input --- exercises/exercise-mainfile/exercise_mainfile_a_solution.input 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-mainfile/exercise_mainfile_a_solution.input 2025-03-03 15:23:33.247567621 +0100 ++++ exercises/solution/exercise-mainfile/exercise_mainfile_a_solution.input 2025-02-26 11:38:46.847816086 +0100 @@ -0,0 +1,18 @@ +[Grid] +LowerLeft = 0 0 @@ -606,7 +607,7 @@ diff -ruN exercises/exercise-mainfile/exercise_mainfile_a_solution.input exercis +PriVarMagnitude = 1e5 +BaseEpsilon = 1e-10 diff -ruN exercises/exercise-mainfile/exercise_mainfile_b.input exercises/solution/exercise-mainfile/exercise_mainfile_b.input ---- exercises/exercise-mainfile/exercise_mainfile_b.input 2024-07-11 13:35:11.652137556 +0200 +--- exercises/exercise-mainfile/exercise_mainfile_b.input 2025-02-26 11:38:46.810817780 +0100 +++ exercises/solution/exercise-mainfile/exercise_mainfile_b.input 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ -[Grid] @@ -627,7 +628,7 @@ diff -ruN exercises/exercise-mainfile/exercise_mainfile_b.input exercises/soluti -[Assembly.NumericDifference] -PriVarMagnitude = 1e5 diff -ruN exercises/exercise-mainfile/exercise_mainfile_c.input exercises/solution/exercise-mainfile/exercise_mainfile_c.input ---- exercises/exercise-mainfile/exercise_mainfile_c.input 2025-03-03 15:23:33.245567666 +0100 +--- exercises/exercise-mainfile/exercise_mainfile_c.input 2025-02-26 11:38:46.810817780 +0100 +++ exercises/solution/exercise-mainfile/exercise_mainfile_c.input 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -[TimeLoop] @@ -652,8 +653,8 @@ diff -ruN exercises/exercise-mainfile/exercise_mainfile_c.input exercises/soluti -[Assembly.NumericDifference] -PriVarMagnitude = 1e5 diff -ruN exercises/exercise-mainfile/properties.hh exercises/solution/exercise-mainfile/properties.hh ---- exercises/exercise-mainfile/properties.hh 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-mainfile/properties.hh 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-mainfile/properties.hh 2025-02-26 11:38:46.810817780 +0100 ++++ exercises/solution/exercise-mainfile/properties.hh 2025-02-26 11:38:46.847816086 +0100 @@ -25,8 +25,8 @@ #include <dumux/porousmediumflow/1p/model.hh> @@ -677,7 +678,7 @@ diff -ruN exercises/exercise-mainfile/properties.hh exercises/solution/exercise- // the fluid system for compressible tests diff -ruN exercises/exercise-mainfile/README.md exercises/solution/exercise-mainfile/README.md ---- exercises/exercise-mainfile/README.md 2025-03-03 15:23:33.245567666 +0100 +--- exercises/exercise-mainfile/README.md 2025-03-04 10:55:49.677212273 +0100 +++ exercises/solution/exercise-mainfile/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,196 +0,0 @@ -# Exercise Mainfiles (DuMuX course) diff --git a/.patches/exercise-model/exercise-model.patch b/.patches/exercise-model/exercise-model.patch index a219468e..1a7d07ea 100644 --- a/.patches/exercise-model/exercise-model.patch +++ b/.patches/exercise-model/exercise-model.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-model/CMakeLists.txt exercises/solution/exercise-model/CMakeLists.txt ---- exercises/exercise-model/CMakeLists.txt 2025-03-04 21:00:57.448082498 +0100 -+++ exercises/solution/exercise-model/CMakeLists.txt 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-model/CMakeLists.txt 2025-02-26 11:38:46.810817780 +0100 ++++ exercises/solution/exercise-model/CMakeLists.txt 2025-02-26 11:38:46.847816086 +0100 @@ -3,5 +3,5 @@ dune_symlink_to_source_files(FILES images params.input) @@ -9,31 +9,33 @@ diff -ruN exercises/exercise-model/CMakeLists.txt exercises/solution/exercise-mo +dumux_add_test(NAME exercise_nonlineardiffusion_sol SOURCES main.cc) diff -ruN exercises/exercise-model/main.cc exercises/solution/exercise-model/main.cc ---- exercises/exercise-model/main.cc 2025-03-04 21:00:57.449082471 +0100 -+++ exercises/solution/exercise-model/main.cc 2025-03-04 21:00:57.452082391 +0100 -@@ -29,6 +29,8 @@ +--- exercises/exercise-model/main.cc 2025-02-28 10:53:32.830702341 +0100 ++++ exercises/solution/exercise-model/main.cc 2025-02-26 11:38:46.847816086 +0100 +@@ -29,7 +29,7 @@ #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/assembly/fvassembler.hh> +-// TODO Task 3.1: Include the header model.hh +#include "model.hh" -+ + /*! * \ingroup NonlinearDiffusion - * \brief Test problem for image denoising using a nonlinear diffusion model -@@ -78,7 +80,7 @@ +@@ -79,8 +79,8 @@ + struct NonlinearDiffusionTest { - // TODO: We need to set our model by replacing ModelTypeTag +- // TODO Task 3.1: We need to set our model by replacing ModelTypeTag - using InheritsFrom = std::tuple</*ModelTypeTag,*/BoxModel>; ++ // TODO: We need to set our model by replacing ModelTypeTag + using InheritsFrom = std::tuple<NonlinearDiffusionModel, BoxModel>; using Scalar = double; using Grid = Dune::YaspGrid<2>; -@@ -136,63 +138,62 @@ +@@ -138,63 +138,62 @@ // the problem for the boundary conditions, a solution vector and a grid variables instance. auto gridGeometry = std::make_shared<GridGeometry>(gridManager.grid().leafGridView()); -- // TODO: Uncomment when the model is implemented +- // TODO Task 3.2: Uncomment when the model is implemented - // using Scalar = GetPropType<TypeTag, Properties::Scalar>; - // using Problem = GetPropType<TypeTag, Properties::Problem>; - // using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; @@ -148,7 +150,7 @@ diff -ruN exercises/exercise-model/main.cc exercises/solution/exercise-model/mai }// end main diff -ruN exercises/exercise-model/model.hh exercises/solution/exercise-model/model.hh --- exercises/exercise-model/model.hh 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-model/model.hh 2025-03-04 21:00:57.452082391 +0100 ++++ exercises/solution/exercise-model/model.hh 2025-02-26 11:38:46.847816086 +0100 @@ -0,0 +1,210 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: @@ -361,7 +363,7 @@ diff -ruN exercises/exercise-model/model.hh exercises/solution/exercise-model/mo + +#endif diff -ruN exercises/exercise-model/README.md exercises/solution/exercise-model/README.md ---- exercises/exercise-model/README.md 2025-03-03 15:23:33.245567666 +0100 +--- exercises/exercise-model/README.md 2025-03-04 10:55:49.677212273 +0100 +++ exercises/solution/exercise-model/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,195 +0,0 @@ -# Exercise Model (DuMuX course) diff --git a/.patches/exercise-properties/exercise-properties.patch b/.patches/exercise-properties/exercise-properties.patch index a4124ae3..12096d27 100644 --- a/.patches/exercise-properties/exercise-properties.patch +++ b/.patches/exercise-properties/exercise-properties.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-properties/CMakeLists.txt exercises/solution/exercise-properties/CMakeLists.txt ---- exercises/exercise-properties/CMakeLists.txt 2025-03-04 21:00:57.449082471 +0100 -+++ exercises/solution/exercise-properties/CMakeLists.txt 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-properties/CMakeLists.txt 2025-02-26 11:38:46.811817734 +0100 ++++ exercises/solution/exercise-properties/CMakeLists.txt 2025-02-26 11:38:46.847816086 +0100 @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -13,8 +13,8 @@ diff -ruN exercises/exercise-properties/CMakeLists.txt exercises/solution/exerci # add a symlink for each input file diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/exercise-properties/mylocalresidual.hh ---- exercises/exercise-properties/mylocalresidual.hh 2025-03-04 21:00:57.449082471 +0100 -+++ exercises/solution/exercise-properties/mylocalresidual.hh 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-properties/mylocalresidual.hh 2025-03-04 10:55:49.677212273 +0100 ++++ exercises/solution/exercise-properties/mylocalresidual.hh 2025-03-04 10:55:49.677212273 +0100 @@ -59,8 +59,6 @@ * \note The volVars can be different to allow computing * the implicit euler time derivative here @@ -51,8 +51,8 @@ diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/ex auto eqIdx = conti0EqIdx + phaseIdx; flux[eqIdx] = fluxVars.advectiveFlux(phaseIdx, upwindTerm); diff -ruN exercises/exercise-properties/problem.hh exercises/solution/exercise-properties/problem.hh ---- exercises/exercise-properties/problem.hh 2025-03-04 21:00:57.449082471 +0100 -+++ exercises/solution/exercise-properties/problem.hh 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-properties/problem.hh 2025-02-26 11:38:46.811817734 +0100 ++++ exercises/solution/exercise-properties/problem.hh 2025-02-26 11:38:46.847816086 +0100 @@ -11,6 +11,7 @@ #ifndef DUMUX_INCOMPRESSIBLE_TWOP_TEST_PROBLEM_HH #define DUMUX_INCOMPRESSIBLE_TWOP_TEST_PROBLEM_HH @@ -77,8 +77,8 @@ diff -ruN exercises/exercise-properties/problem.hh exercises/solution/exercise-p return values; } diff -ruN exercises/exercise-properties/properties.hh exercises/solution/exercise-properties/properties.hh ---- exercises/exercise-properties/properties.hh 2025-03-04 21:00:57.449082471 +0100 -+++ exercises/solution/exercise-properties/properties.hh 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-properties/properties.hh 2025-02-26 11:38:46.811817734 +0100 ++++ exercises/solution/exercise-properties/properties.hh 2025-02-26 11:38:46.848816040 +0100 @@ -27,9 +27,7 @@ #include "spatialparams.hh" @@ -103,7 +103,7 @@ diff -ruN exercises/exercise-properties/properties.hh exercises/solution/exercis // Set the fluid system template<class TypeTag> diff -ruN exercises/exercise-properties/README.md exercises/solution/exercise-properties/README.md ---- exercises/exercise-properties/README.md 2024-07-11 13:35:11.652137556 +0200 +--- exercises/exercise-properties/README.md 2025-02-26 11:38:46.811817734 +0100 +++ exercises/solution/exercise-properties/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,75 +0,0 @@ -# Exercise Properties (DuMuX course) diff --git a/.patches/exercise-runtimeparams/exercise-runtimeparams.patch b/.patches/exercise-runtimeparams/exercise-runtimeparams.patch index 5832867b..e2eaa5a5 100644 --- a/.patches/exercise-runtimeparams/exercise-runtimeparams.patch +++ b/.patches/exercise-runtimeparams/exercise-runtimeparams.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-runtimeparams/CMakeLists.txt exercises/solution/exercise-runtimeparams/CMakeLists.txt ---- exercises/exercise-runtimeparams/CMakeLists.txt 2025-03-04 21:00:57.449082471 +0100 -+++ exercises/solution/exercise-runtimeparams/CMakeLists.txt 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-runtimeparams/CMakeLists.txt 2025-02-26 11:38:46.811817734 +0100 ++++ exercises/solution/exercise-runtimeparams/CMakeLists.txt 2025-02-26 11:38:46.848816040 +0100 @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later @@ -11,12 +11,13 @@ diff -ruN exercises/exercise-runtimeparams/CMakeLists.txt exercises/solution/exe # add a symlink for each input file diff -ruN exercises/exercise-runtimeparams/params.input exercises/solution/exercise-runtimeparams/params.input ---- exercises/exercise-runtimeparams/params.input 2024-07-11 13:35:11.652137556 +0200 -+++ exercises/solution/exercise-runtimeparams/params.input 2025-03-03 15:23:33.247567621 +0100 -@@ -12,11 +12,12 @@ +--- exercises/exercise-runtimeparams/params.input 2025-02-26 14:09:24.762108833 +0100 ++++ exercises/solution/exercise-runtimeparams/params.input 2025-02-26 11:38:46.848816040 +0100 +@@ -12,12 +12,12 @@ AquiferDepth = 2700.0 # m InjectionDuration = 2.628e6 # in seconds, i.e. one month # TODO: Task 2: Create a parameter called "TotalAreaSpecificInflow" +-# TODO: Task 3: Run the case with and without a provided value in the input file for "TotalAreaSpecificInflow" +TotalAreaSpecificInflow = -1e-4 # kg/(s m^2) [SpatialParams] @@ -28,8 +29,8 @@ diff -ruN exercises/exercise-runtimeparams/params.input exercises/solution/exerc Aquitard.Swr = 0.2 Aquitard.Snr = 0.0 diff -ruN exercises/exercise-runtimeparams/problem.hh exercises/solution/exercise-runtimeparams/problem.hh ---- exercises/exercise-runtimeparams/problem.hh 2025-03-04 21:00:57.449082471 +0100 -+++ exercises/solution/exercise-runtimeparams/problem.hh 2025-03-04 21:00:57.452082391 +0100 +--- exercises/exercise-runtimeparams/problem.hh 2025-02-26 11:38:46.811817734 +0100 ++++ exercises/solution/exercise-runtimeparams/problem.hh 2025-02-26 11:38:46.848816040 +0100 @@ -81,12 +81,16 @@ injectionDuration_ = getParamFromGroup<Scalar>("Problem","InjectionDuration"); // TODO: dumux-course-task 2 @@ -67,8 +68,8 @@ diff -ruN exercises/exercise-runtimeparams/problem.hh exercises/solution/exercis }; diff -ruN exercises/exercise-runtimeparams/properties.hh exercises/solution/exercise-runtimeparams/properties.hh ---- exercises/exercise-runtimeparams/properties.hh 2025-03-04 21:00:57.449082471 +0100 -+++ exercises/solution/exercise-runtimeparams/properties.hh 2025-03-04 21:00:57.453082364 +0100 +--- exercises/exercise-runtimeparams/properties.hh 2025-02-26 11:38:46.811817734 +0100 ++++ exercises/solution/exercise-runtimeparams/properties.hh 2025-02-26 11:38:46.848816040 +0100 @@ -58,6 +58,6 @@ FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true> >; }; @@ -78,7 +79,7 @@ diff -ruN exercises/exercise-runtimeparams/properties.hh exercises/solution/exer #endif diff -ruN exercises/exercise-runtimeparams/README.md exercises/solution/exercise-runtimeparams/README.md ---- exercises/exercise-runtimeparams/README.md 2025-03-03 15:23:33.245567666 +0100 +--- exercises/exercise-runtimeparams/README.md 2025-02-26 11:38:46.811817734 +0100 +++ exercises/solution/exercise-runtimeparams/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,171 +0,0 @@ -# Exercise Runtime Parameters (DuMuX course) @@ -253,8 +254,8 @@ diff -ruN exercises/exercise-runtimeparams/README.md exercises/solution/exercise - -* > __Task 4__: Using one of the bool `hasParam` functions, place an output in the problem file to alert the user where the parameter value comes from. diff -ruN exercises/exercise-runtimeparams/spatialparams.hh exercises/solution/exercise-runtimeparams/spatialparams.hh ---- exercises/exercise-runtimeparams/spatialparams.hh 2025-03-04 21:00:57.449082471 +0100 -+++ exercises/solution/exercise-runtimeparams/spatialparams.hh 2025-03-04 21:00:57.453082364 +0100 +--- exercises/exercise-runtimeparams/spatialparams.hh 2025-02-26 11:38:46.811817734 +0100 ++++ exercises/solution/exercise-runtimeparams/spatialparams.hh 2025-02-26 11:38:46.848816040 +0100 @@ -12,8 +12,8 @@ * fully implicit model. */ -- GitLab From 5b360f201f7a48e3fe95c7031352d91f9c107029 Mon Sep 17 00:00:00 2001 From: VivienL <vivien.langhans@iws.uni-stuttgart.de> Date: Fri, 7 Mar 2025 09:57:01 +0100 Subject: [PATCH 3/4] consistency of TODOs in all files --- exercises/exercise-basic/2pmain.cc | 4 ++-- exercises/exercise-basic/CMakeLists.txt | 2 +- .../exercise-basic/injection2pniproblem.hh | 8 ++++---- exercises/exercise-basic/params.input | 2 +- exercises/exercise-basic/properties2pni.hh | 2 +- .../biominproblem.hh | 8 ++++---- .../biominspatialparams.hh | 4 ++-- .../chemistry/simplebiominreactions.hh | 8 ++++---- .../permeabilitypowerlaw.hh | 4 ++-- .../exercise-biomineralization/params.input | 4 ++-- .../exercise-biomineralization/properties.hh | 4 ++-- .../interface/freeflowsubproblem.hh | 10 +++++----- .../exercise-coupling-ff-pm/interface/main.cc | 4 ++-- .../interface/params.input | 4 ++-- .../interface/porousmediumsubproblem.hh | 2 +- .../interface/properties.hh | 6 +++--- .../models/porousmediumsubproblem.hh | 4 ++-- .../models/properties.hh | 12 +++++------ .../turbulence/freeflowsubproblem.hh | 20 +++++++++---------- .../turbulence/main.cc | 6 +++--- .../turbulence/params.input | 8 ++++---- .../turbulence/properties.hh | 4 ++-- exercises/exercise-fluidsystem/aparams.input | 2 +- exercises/exercise-fractures/README.md | 2 +- .../exercise-fractures/fractureproblem.hh | 2 +- .../fracturespatialparams.hh | 6 +++--- exercises/exercise-fractures/matrixproblem.hh | 8 ++++---- exercises/exercise-fractures/params.input | 4 ++-- exercises/exercise-grids/params.input | 10 +++++----- exercises/exercise-grids/properties.hh | 6 +++--- .../exercise-mainfile/exercise1pamain.cc | 2 +- .../exercise_mainfile_a.input | 2 +- exercises/exercise-mainfile/properties.hh | 4 ++-- exercises/exercise-model/README.md | 2 +- exercises/exercise-model/main.cc | 6 +++--- .../exercise-properties/mylocalresidual.hh | 4 ++-- exercises/exercise-properties/problem.hh | 2 +- exercises/exercise-properties/properties.hh | 4 ++-- exercises/exercise-runtimeparams/params.input | 6 +++--- exercises/exercise-runtimeparams/problem.hh | 10 +++++----- .../biominproblem.hh | 8 ++++---- .../biominspatialparams.hh | 4 ++-- .../chemistry/simplebiominreactions.hh | 7 ++++--- .../permeabilitypowerlaw.hh | 4 ++-- .../exercise-biomineralization/params.input | 4 +++- .../exercise-biomineralization/properties.hh | 4 ++-- .../solution/exercise-grids/params.input | 10 +++++----- .../solution/exercise-grids/properties.hh | 6 +++--- .../exercise1pa_solution_main.cc | 2 +- .../solution/exercise-mainfile/properties.hh | 4 ++-- exercises/solution/exercise-model/main.cc | 4 +++- .../exercise-runtimeparams/params.input | 4 ++-- .../exercise-runtimeparams/problem.hh | 10 +++++----- 53 files changed, 144 insertions(+), 139 deletions(-) diff --git a/exercises/exercise-basic/2pmain.cc b/exercises/exercise-basic/2pmain.cc index 1919f07c..87ccbe2c 100644 --- a/exercises/exercise-basic/2pmain.cc +++ b/exercises/exercise-basic/2pmain.cc @@ -28,7 +28,7 @@ #include <dumux/io/grid/gridmanager_yasp.hh> /*! - * TODO:dumux-course-task 3: + * TODO: dumux-course-task 3: * In 2pnimain.cc include the correct properties headerfile */ // The properties file, where the compile time options are defined @@ -42,7 +42,7 @@ int main(int argc, char** argv) using namespace Dumux; /*! - * TODO:dumux-course-task 3: + * TODO: dumux-course-task 3: * In 2pnimain.cc change the type tag for the new injection problem */ // define the type tag for this problem diff --git a/exercises/exercise-basic/CMakeLists.txt b/exercises/exercise-basic/CMakeLists.txt index 5530e76f..b8ee4271 100644 --- a/exercises/exercise-basic/CMakeLists.txt +++ b/exercises/exercise-basic/CMakeLists.txt @@ -5,7 +5,7 @@ dumux_add_test(NAME exercise_basic_2p SOURCES 2pmain.cc) -# TODO: add the two-phase non-isothermal simulation program +# TODO: dumux-course-task 3: add the two-phase non-isothermal simulation program # add a symlink for each input file diff --git a/exercises/exercise-basic/injection2pniproblem.hh b/exercises/exercise-basic/injection2pniproblem.hh index 51d4e902..0a79b39f 100644 --- a/exercises/exercise-basic/injection2pniproblem.hh +++ b/exercises/exercise-basic/injection2pniproblem.hh @@ -104,7 +104,7 @@ public: bcTypes.setAllNeumann(); /*! - * TODO:dumux-course-task 4: + * TODO: dumux-course-task 4: * Set Dirichlet conditions for the energy equation on the left boundary * and Neumann everywhere else. * Think about: is there anything necessary to do here? @@ -124,7 +124,7 @@ public: return initialAtPos(globalPos); /*! - * TODO:dumux-course-task 4: + * TODO: dumux-course-task 4: * Set Dirichlet conditions for the energy equation on the left boundary. * Think about: is there anything necessary to do here? */ @@ -150,7 +150,7 @@ public: values[Indices::conti0EqIdx + FluidSystem::H2OIdx] = 0.0; /*! - * TODO:dumux-course-task 4: + * TODO: dumux-course-task 4: * Set Neumann noflow conditions for the energy equation everywhere else except the left boundary. * Additionally, consider the energy flux at the injection point which is equal to the product of the respective mass flux and the matching enthalpy. Use the function `gasEnthalpy(temperature,pressure)` from the N2 component to access the necessary enthalpy. * hint: use `Indices::energyEqIdx` to access the entry belonging to the energy flux. @@ -191,7 +191,7 @@ public: values[Indices::saturationIdx] = 0.0; /*! - * TODO:dumux-course-task 4: + * TODO: dumux-course-task 4: * Set a temperature gradient of 0.03 K per m beginning at 283 K here. * Hint: you can use aquiferDepth_ and the globalPos similar to the pressure gradient. * Use globalPos[0] and globalPos[1] to implement the high temperature lens with 380 K diff --git a/exercises/exercise-basic/params.input b/exercises/exercise-basic/params.input index 7f69d7b8..63aa4f6b 100644 --- a/exercises/exercise-basic/params.input +++ b/exercises/exercise-basic/params.input @@ -23,7 +23,7 @@ Aquifer.BrooksCoreyLambda = 2.0 Aquifer.Swr = 0.2 Aquifer.Snr = 0.0 -# TODO: these parameters are only used in the nonisothermal model. Uncomment them for that +# TODO: dumux-course-task 4: these parameters are only used in the nonisothermal model. Uncomment them for that #[Component] #SolidDensity = 2700 # solid density of granite #SolidThermalConductivity = 2.8 # solid thermal conducitivity of granite diff --git a/exercises/exercise-basic/properties2pni.hh b/exercises/exercise-basic/properties2pni.hh index fda39f16..e29e4ef7 100644 --- a/exercises/exercise-basic/properties2pni.hh +++ b/exercises/exercise-basic/properties2pni.hh @@ -25,7 +25,7 @@ namespace Dumux::Properties { /*! -* TODO:dumux-course-task 4 +* TODO: dumux-course-task 4: * Inherit from the TwoPNI model instead of TwoP here */ // Create new type tags diff --git a/exercises/exercise-biomineralization/biominproblem.hh b/exercises/exercise-biomineralization/biominproblem.hh index 2dae53af..f14082a6 100644 --- a/exercises/exercise-biomineralization/biominproblem.hh +++ b/exercises/exercise-biomineralization/biominproblem.hh @@ -17,7 +17,7 @@ #include <dumux/common/numeqvector.hh> #include <dumux/porousmediumflow/problem.hh> -// TODO: dumux-course-task 3 +// TODO: dumux-course-task 3: // include chemistry file here namespace Dumux { @@ -51,7 +51,7 @@ class BioMinProblem : public PorousMediumFlowProblem<TypeTag> using Element = typename GridView::template Codim<0>::Entity; using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using SubControlVolume = typename FVElementGeometry::SubControlVolume; - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: // set the chemistry TypeTag static constexpr int numComponents = FluidSystem::numComponents; @@ -183,7 +183,7 @@ public: values[conti0EqIdx + CaIdx] = - waterFlux * concCa_ / FluidSystem::molarMass(CaIdx); values[conti0EqIdx + UreaIdx] = - waterFlux * concUrea_ / FluidSystem::molarMass(UreaIdx); } - // TODO: dumux-course-task 5 + // TODO: dumux-course-task 5: // Set CO2 injection below aquitard after the injBioTime return values; @@ -245,7 +245,7 @@ public: { NumEqVector source(0.0); - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: // set Chemistry // Chemistry chemistry; // set VolumeVariables diff --git a/exercises/exercise-biomineralization/biominspatialparams.hh b/exercises/exercise-biomineralization/biominspatialparams.hh index af2c97fe..e81beab7 100644 --- a/exercises/exercise-biomineralization/biominspatialparams.hh +++ b/exercises/exercise-biomineralization/biominspatialparams.hh @@ -16,7 +16,7 @@ #include <dumux/material/fluidmatrixinteractions/2p/linearmaterial.hh> #include <dumux/material/fluidmatrixinteractions/2p/brookscorey.hh> #include <dumux/material/fluidmatrixinteractions/porosityprecipitation.hh> -// TODO: dumux-course-task +// TODO: dumux-course-task 6: // include the new permeability law (power law) instead of Kozeny-Carman #include <dumux/material/fluidmatrixinteractions/permeabilitykozenycarman.hh> @@ -271,7 +271,7 @@ private: bool isFaultZone_(const GlobalPosition &globalPos) const { return globalPos[dimWorld-2] > 2 - eps_ && globalPos[dimWorld-2] < 3 + eps_;} - // TODO: dumux-course-task + // TODO: dumux-course-task 6: // define the power law as the permeability law PermeabilityKozenyCarman<PermeabilityType> permLaw_; PoroLaw poroLaw_; diff --git a/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh b/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh index 78d9886b..6970c7e5 100644 --- a/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh +++ b/exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh @@ -76,24 +76,24 @@ public: using std::max; const Scalar volFracBiofilm = max(volVars.solidVolumeFraction(BiofilmPhaseIdx),0.0); - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // implement mass of biofilm const Scalar massBiofilm = 0.0; const Scalar molalityUrea = moleFracToMolality(volVars.moleFraction(liquidPhaseIdx,UreaIdx), xwCa, volVars.moleFraction(liquidPhaseIdx,CO2Idx)); // [mol_urea/kg_H2O] - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // compute rate of ureolysis by implementing Zub and rurea const Scalar Zub = 0.0; const Scalar rurea = 0.0; - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // compute/set dissolution and precipitation rate of calcite const Scalar rprec = 0.0; // set source terms - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // set the source terms using the reaction rates defined above and signs based on the stoichiometry of the reactions. // Hint: Ammonium occurs in the reaction equation, but is not accounted for in this simplified setup. // Additionally, the consumption of water by the reaction may be neglected, as water is present in excess. diff --git a/exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh b/exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh index b6307897..ea8fa71c 100644 --- a/exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh +++ b/exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh @@ -39,10 +39,10 @@ public: PermeabilityType evaluatePermeability(PermeabilityType refPerm, Scalar refPoro, Scalar poro) const { using std::pow; - // TODO: dumux-course-task 6 + // TODO: dumux-course-task 6: // read the exponent for the power law from the input file - // TODO: dumux-course-task 6 + // TODO: dumux-course-task 6: // return the updated permeability according to K=K_0*(poro/refPoro)^exponent return refPerm; } diff --git a/exercises/exercise-biomineralization/params.input b/exercises/exercise-biomineralization/params.input index e8a0e917..c782f49b 100644 --- a/exercises/exercise-biomineralization/params.input +++ b/exercises/exercise-biomineralization/params.input @@ -10,7 +10,7 @@ Name = biomin UpperRight = 20 15 # x-/y-coordinates of the upper-right corner of the grid [m] Cells = 20 15 # x-/y-resolution of the grid -# TODO: dumux-course-task 4 +# TODO: dumux-course-task 4: # vary parameters InjBioTime, InitBiofilm, InjVolumeflux, ConcUrea and ConcCa [Initial] InitDensityW = 997 # [kg/m³] initial wetting density @@ -49,5 +49,5 @@ KUrea = 0.355 # [mol/kgH2O] Lauchnor et al. 2014 [Brine] Salinity = 0.1 -#TODO: dumux-course-task 6 +# TODO: dumux-course-task 6: # add the power law's exponent parameter PowerLaw.Exponent = 5.0 diff --git a/exercises/exercise-biomineralization/properties.hh b/exercises/exercise-biomineralization/properties.hh index 187ea5e8..32fb7df4 100644 --- a/exercises/exercise-biomineralization/properties.hh +++ b/exercises/exercise-biomineralization/properties.hh @@ -19,7 +19,7 @@ #include <dumux/porousmediumflow/2pncmin/model.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/material/components/simpleco2.hh> //!< Simplified CO2 component based on ideal gas law -// TODO: dumux-course-task 7 +// TODO: dumux-course-task 7: // include the CO2 component and tabulated values from DuMux #include "solidsystems/biominsolidphase.hh" // The biomineralization solid system @@ -52,7 +52,7 @@ struct FluidSystem<TypeTag, TTag::ExerciseBioMin> { private: using Scalar = GetPropType<TypeTag, Properties::Scalar>; - // TODO: dumux-course-task 7 + // TODO: dumux-course-task 7: // use the CO2 component with tabulated values using CO2Impl = Components::SimpleCO2<Scalar>; using H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>; diff --git a/exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh b/exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh index ce45a7e0..f24a4276 100644 --- a/exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh +++ b/exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh @@ -71,7 +71,7 @@ public: const auto& globalPos = scvf.dofPosition(); - // TODO: dumux-course-task 1.A + // TODO: dumux-course-task 1.A: // Change the boundary conditions here as described in the exercise if(onUpperBoundary_(globalPos)) { @@ -89,12 +89,12 @@ public: // coupling interface if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf)) { - // TODO: dumux-course-task 1.C + // TODO: dumux-course-task 1.C: // set the Beaver-Joseph-Saffman slip condition for the tangential momentum balance equation, // consider orientation of face automatically values.setCouplingNeumann(Indices::conti0EqIdx); values.setCouplingNeumann(Indices::momentumYBalanceIdx); - // TODO: dumux-course-task 1.B + // TODO: dumux-course-task 1.B: // Replace Dirichlet BC with Beavers-Joseph-Saffman slip condition for the tangential momentum balance values.setDirichlet(Indices::velocityXIdx); // assume no slip on interface @@ -111,10 +111,10 @@ public: PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const { PrimaryVariables values(0.0); - // TODO: dumux-course-task 1.A + // TODO: dumux-course-task 1.A: // set a no-slip, no-flow condition at the top values[Indices::velocityYIdx] = -1e-6 * globalPos[0] * (this->gridGeometry().bBoxMax()[0] - globalPos[0]); - // TODO: dumux-course-task 1.A + // TODO: dumux-course-task 1.A: // set fixed pressures on the left and right boundary return values; diff --git a/exercises/exercise-coupling-ff-pm/interface/main.cc b/exercises/exercise-coupling-ff-pm/interface/main.cc index ee3a2d96..81c3c568 100644 --- a/exercises/exercise-coupling-ff-pm/interface/main.cc +++ b/exercises/exercise-coupling-ff-pm/interface/main.cc @@ -52,7 +52,7 @@ int main(int argc, char** argv) using FreeflowTypeTag = Properties::TTag::FreeflowOneP; using PorousMediumTypeTag = Properties::TTag::PorousMediumFlowOneP; - //TODO: dumux-course-task 1.C + //TODO: dumux-course-task 1.C: // ******************** comment-out this section for the last exercise **************** // // create two individual grids (from the given grid file or the input file) @@ -168,7 +168,7 @@ int main(int argc, char** argv) StaggeredVtkOutputModule<FreeflowGridVariables, decltype(freeflowSol)> freeflowVtkWriter(*freeflowGridVariables, freeflowSol, freeflowName); GetPropType<FreeflowTypeTag, Properties::IOFields>::initOutputModule(freeflowVtkWriter); - //TODO: dumux-course-task 1.B + //TODO: dumux-course-task 1.B: //****** uncomment the add analytical solution of v_x *****// // freeflowVtkWriter.addField(freeflowProblem->getAnalyticalVelocityX(), "analyticalV_x"); diff --git a/exercises/exercise-coupling-ff-pm/interface/params.input b/exercises/exercise-coupling-ff-pm/interface/params.input index c5e2ac08..e4fe6b57 100644 --- a/exercises/exercise-coupling-ff-pm/interface/params.input +++ b/exercises/exercise-coupling-ff-pm/interface/params.input @@ -1,5 +1,5 @@ -# # TODO: dumux-course-task 1.C: uncomment the following group [Grid] -# # for dune-subgrid +# TODO: dumux-course-task 1.C: uncomment the following group [Grid] +# for dune-subgrid #[Grid] #Positions0 = 0 1 #Positions1 = 0 0.2 0.3 0.65 diff --git a/exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh b/exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh index f30588e7..4bd2d195 100644 --- a/exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh +++ b/exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh @@ -65,7 +65,7 @@ public: { BoundaryTypes values; - // TODO: dumux-course-task 1.A + // TODO: dumux-course-task 1.A: // Set for all boundaries Neumann no-flow and keep the coupling conditions // set Neumann BCs to all boundaries first values.setAllNeumann(); diff --git a/exercises/exercise-coupling-ff-pm/interface/properties.hh b/exercises/exercise-coupling-ff-pm/interface/properties.hh index ffc9b251..2a9f65b7 100644 --- a/exercises/exercise-coupling-ff-pm/interface/properties.hh +++ b/exercises/exercise-coupling-ff-pm/interface/properties.hh @@ -16,7 +16,7 @@ #include <dumux/multidomain/staggeredtraits.hh> #include <dumux/multidomain/boundary/stokesdarcy/couplingmanager.hh> -// TODO: dumux-course-task 1.C +// TODO: dumux-course-task 1.C: //****** uncomment for the last exercise *****// // #include <dumux/io/grid/gridmanager_sub.hh> @@ -86,7 +86,7 @@ struct Grid<TypeTag, TTag::PorousMediumFlowOneP> using Scalar = GetPropType<TypeTag, Properties::Scalar>; using TensorGrid = Dune::YaspGrid<2, Dune::TensorProductCoordinates<Scalar, dim> >; -// TODO: dumux-course-task 1.C +// TODO: dumux-course-task 1.C: //****** comment out for the last exercise *****// // use "normal" grid using type = TensorGrid; @@ -103,7 +103,7 @@ struct Grid<TypeTag, TTag::FreeflowOneP> using Scalar = GetPropType<TypeTag, Properties::Scalar>; using TensorGrid = Dune::YaspGrid<2, Dune::TensorProductCoordinates<Scalar, dim> >; -// TODO: dumux-course-task 1.C +// TODO: dumux-course-task 1.C: //****** comment out for the last exercise *****// // use "normal" grid using type = TensorGrid; diff --git a/exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh b/exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh index d844e1f8..b4051eb7 100644 --- a/exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh +++ b/exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh @@ -335,9 +335,9 @@ public: PrimaryVariables values(0.0); values[pressureIdx] = freeflowPressure; - // TODO: dumux-course-task 2.A + // TODO: dumux-course-task 2.A: // Declare here which phases are present. - // TODO: dumux-course-task 2.C + // TODO: dumux-course-task 2.C: // Change initial condition to 2p system with liquid saturation of 0.1 values[transportCompIdx] = moleFraction_; diff --git a/exercises/exercise-coupling-ff-pm/models/properties.hh b/exercises/exercise-coupling-ff-pm/models/properties.hh index a5c7e032..62622a97 100644 --- a/exercises/exercise-coupling-ff-pm/models/properties.hh +++ b/exercises/exercise-coupling-ff-pm/models/properties.hh @@ -25,10 +25,10 @@ #include <dumux/discretization/cctpfa.hh> #include <dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh> -// TODO: dumux-course-task 2.A +// TODO: dumux-course-task 2.A: // Include 2pnc model here #include <dumux/porousmediumflow/1pnc/model.hh> -// TODO: dumux-course-task 2.A +// TODO: dumux-course-task 2.A: // Include spatial params for a 2-phase system #include "../1pspatialparams.hh" #include "porousmediumsubproblem.hh" @@ -44,7 +44,7 @@ namespace Dumux::Properties { // Create new type tags namespace TTag { struct FreeflowNC { using InheritsFrom = std::tuple<NavierStokesNC, StaggeredFreeFlowModel>; }; -// TODO: dumux-course-task 2.A +// TODO: dumux-course-task 2.A: // Change the inheritance such that the correct model is used. struct PorousMediumOnePNC { using InheritsFrom = std::tuple<OnePNC, CCTpfaModel>; }; } // end namespace TTag @@ -70,7 +70,7 @@ template<class TypeTag> struct Problem<TypeTag, TTag::FreeflowNC> { using type = Dumux::FreeFlowSubProblem<TypeTag> ; }; // The fluid system -// TODO: dumux-course-task 2.A +// TODO: dumux-course-task 2.A: // Change to property of the `FluidSystem` such that `H2OAir` is used directly. template<class TypeTag> struct FluidSystem<TypeTag, TTag::PorousMediumOnePNC> @@ -108,11 +108,11 @@ template<class TypeTag> struct EffectiveDiffusivityModel<TypeTag, TTag::PorousMediumOnePNC> { using type = DiffusivityConstantTortuosity<GetPropType<TypeTag, Properties::Scalar>>; }; -// TODO: dumux-course-task 2.A +// TODO: dumux-course-task 2.A: // Define new formulation for primary variables here. // Set the spatial parameters type -// TODO: dumux-course-task 2.A +// TODO: dumux-course-task 2.A: // Adapt the spatial params here. template<class TypeTag> struct SpatialParams<TypeTag, TTag::PorousMediumOnePNC> { diff --git a/exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh b/exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh index 6ca887e3..a59f38e8 100644 --- a/exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh +++ b/exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh @@ -18,7 +18,7 @@ #include <dumux/multidomain/boundary/stokesdarcy/couplingdata.hh> #include <dumux/freeflow/turbulencemodel.hh> -// TODO: dumux-course-task 3.A +// TODO: dumux-course-task 3.A: // Include headers for turbulence problem (rans) here. #include <dumux/freeflow/navierstokes/staggered/problem.hh> #include <dumux/freeflow/navierstokes/boundarytypes.hh> @@ -28,7 +28,7 @@ namespace Dumux { * \brief The free-flow sub problem */ template <class TypeTag> -// TODO: dumux-course-task 3.A +// TODO: dumux-course-task 3.A: // Adapt the inheritance of the problem class. class FreeFlowSubProblem : public NavierStokesStaggeredProblem<TypeTag> { @@ -40,7 +40,7 @@ class FreeFlowSubProblem : public NavierStokesStaggeredProblem<TypeTag> using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>; - // TODO: dumux-course-task 3.A + // TODO: dumux-course-task 3.A: // Change the boundary types to Dumux::RANSBoundaryTypes<ModelTraits, ModelTraits::numEq()> using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; @@ -109,7 +109,7 @@ public: BoundaryTypes values; const auto& globalPos = scvf.center(); - // TODO: dumux-course-task 3.A + // TODO: dumux-course-task 3.A: // set boundary conditions for the turbulence model primary variables k and \omega everywhere (outflow on right boundary, otherwise dirichlet) if (onLeftBoundary_(globalPos)) @@ -120,7 +120,7 @@ public: values.setDirichlet(Indices::energyEqIdx); } - // TODO: dumux-course-task 3.A + // TODO: dumux-course-task 3.A: // set wall conditions for the turbulence model at the walls (values.setWall()) corresponding to the upper and lower boundary if (onLowerBoundary_(globalPos)) { @@ -133,7 +133,7 @@ public: if (onUpperBoundary_(globalPos)) { - // TODO: dumux-course-task 3.B + // TODO: dumux-course-task 3.B: // Replace all conditions here with symmetric BCs. values.setDirichlet(Indices::velocityXIdx); values.setDirichlet(Indices::velocityYIdx); @@ -172,9 +172,9 @@ public: const auto globalPos = scvf.ipGlobal(); PrimaryVariables values(initialAtPos(globalPos)); - // TODO: dumux-course-task 3.A + // TODO: dumux-course-task 3.A: // Add dirichlet conditions setting TKE and Dissipation to zero on the upper and lower walls. - // TODO: dumux-course-task 3.B + // TODO: dumux-course-task 3.B: // Remove the condition `onUpperBoundary_(globalPos)` here. // if (onUpperBoundary_(globalPos) || onLowerBoundary_(globalPos)) // { @@ -288,12 +288,12 @@ public: values[Indices::velocityXIdx] = refVelocity(); values[Indices::temperatureIdx] = refTemperature(); - // TODO: dumux-course-task 3.A + // TODO: dumux-course-task 3.A: // Set initial conditions for the TKE and the Dissipation. Values calculated in the constructor // values[Indices::turbulentKineticEnergyIdx] = TODO??; // values[Indices::dissipationIdx] = TODO??; - // TODO: dumux-course-task 3.B + // TODO: dumux-course-task 3.B: // Remove the condition `onUpperBoundary_(globalPos)` here. if(onUpperBoundary_(globalPos) || onLowerBoundary_(globalPos)) values[Indices::velocityXIdx] = 0.0; diff --git a/exercises/exercise-coupling-ff-pm/turbulence/main.cc b/exercises/exercise-coupling-ff-pm/turbulence/main.cc index e42f71b5..68714797 100644 --- a/exercises/exercise-coupling-ff-pm/turbulence/main.cc +++ b/exercises/exercise-coupling-ff-pm/turbulence/main.cc @@ -122,10 +122,10 @@ int main(int argc, char** argv) couplingManager->init(freeflowProblem, porousMediumProblem, sol); - // TODO: dumux-course-task 3.A + // TODO: dumux-course-task 3.A: // Update static wall properties - // TODO: dumux-course-task 3.A + // TODO: dumux-course-task 3.A: // Update dynamic wall properties // the grid variables @@ -180,7 +180,7 @@ int main(int argc, char** argv) // make the new solution the old solution solOld = sol; - // TODO: dumux-course-task 3.A + // TODO: dumux-course-task 3.A: // Update dynamic wall properties // post time step treatment of PorousMedium problem diff --git a/exercises/exercise-coupling-ff-pm/turbulence/params.input b/exercises/exercise-coupling-ff-pm/turbulence/params.input index c9d26a57..9545f0e9 100644 --- a/exercises/exercise-coupling-ff-pm/turbulence/params.input +++ b/exercises/exercise-coupling-ff-pm/turbulence/params.input @@ -5,13 +5,13 @@ TEnd = 864000 # [s] (6 days) [Freeflow.Grid] Positions0 = 0.0 0.25 -# TODO: dumux-course-task 3.B - use only half of FF domain height +# TODO: dumux-course-task 3.B: use only half of FF domain height Positions1 = 0.25 0.5 -# TODO: dumux-course-task 3.C - refine towards interface +# TODO: dumux-course-task 3.C: refine towards interface Grading0 = 1.0 Grading1 = 1.0 Cells0 = 15 -# TODO: dumux-course-task 3.B - use only half of FF domain height and adapt cell number +# TODO: dumux-course-task 3.B: use only half of FF domain height and adapt cell number Cells1 = 20 Verbosity = true @@ -20,7 +20,7 @@ Positions0 = 0.0 0.25 Positions1 = 0.0 0.25 Cells0 = 15 Cells1 = 10 -# TODO: dumux-course-task 3.C - refine towards interface +# TODO: dumux-course-task 3.C: refine towards interface Grading0 = 1.0 Grading1 = 1.0 Verbosity = true diff --git a/exercises/exercise-coupling-ff-pm/turbulence/properties.hh b/exercises/exercise-coupling-ff-pm/turbulence/properties.hh index 67d3e762..196ea9fe 100644 --- a/exercises/exercise-coupling-ff-pm/turbulence/properties.hh +++ b/exercises/exercise-coupling-ff-pm/turbulence/properties.hh @@ -28,7 +28,7 @@ // Free-flow domain #include <dumux/discretization/staggered/freeflow/properties.hh> -// TODO: dumux-course-task 3.A +// TODO: dumux-course-task 3.A: // Include headers for compositional k-\omega SST turbulence model here. #include <dumux/freeflow/compositional/navierstokesncmodel.hh> @@ -39,7 +39,7 @@ namespace Dumux::Properties { // Create new type tags namespace TTag { struct PorousMediumFlowModel { using InheritsFrom = std::tuple<TwoPTwoCNI, CCTpfaModel>; }; -// TODO: dumux-course-task 3.A +// TODO: dumux-course-task 3.A: // Change the entry in the `FreeflowModel` definition accordingly. struct FreeflowModel { using InheritsFrom = std::tuple<NavierStokesNCNI, StaggeredFreeFlowModel>; }; } // end namespace TTag diff --git a/exercises/exercise-fluidsystem/aparams.input b/exercises/exercise-fluidsystem/aparams.input index 775a986e..49f15941 100644 --- a/exercises/exercise-fluidsystem/aparams.input +++ b/exercises/exercise-fluidsystem/aparams.input @@ -20,5 +20,5 @@ UpperRight = 60 60 # x-/y-coordinates of the upper-right corner of the grid [m] Cells = 60 60 # x-/y-resolution of the grid [Output] -# TODO Task 2.2: Set the plot density to true +# TODO: dumux-course-task 2.2: set the plot density to true PlotDensity = false # plot density over pressure for your component diff --git a/exercises/exercise-fractures/README.md b/exercises/exercise-fractures/README.md index 0c8fc1b8..b5daac4d 100644 --- a/exercises/exercise-fractures/README.md +++ b/exercises/exercise-fractures/README.md @@ -157,7 +157,7 @@ BoundaryTypes interiorBoundaryTypes(const Element& element, const SubControlVolu // the interior boundary conditions to Dirichlet. // IMPORTANT: Note that you will never be asked to set any values at the interior boundaries! // This simply chooses a different interface condition! - // TODO dumux-course-task C + // TODO: dumux-course-task B: // Change coupling conditions! values.setAllDirichlet(); diff --git a/exercises/exercise-fractures/fractureproblem.hh b/exercises/exercise-fractures/fractureproblem.hh index b93f56b5..02f8c2f1 100644 --- a/exercises/exercise-fractures/fractureproblem.hh +++ b/exercises/exercise-fractures/fractureproblem.hh @@ -78,7 +78,7 @@ public: // However, there is one fracture reaching the top boundary. For this // fracture tip we set Dirichlet Bcs as in the matrix domain - // TODO dumux-course-task A + // TODO: dumux-course-task A: // Change boundary conditions if (globalPos[1] > this->gridGeometry().bBoxMax()[1] - 1e-6) values.setAllDirichlet(); diff --git a/exercises/exercise-fractures/fracturespatialparams.hh b/exercises/exercise-fractures/fracturespatialparams.hh index 1f7518f9..9c8a99ad 100644 --- a/exercises/exercise-fractures/fracturespatialparams.hh +++ b/exercises/exercise-fractures/fracturespatialparams.hh @@ -73,7 +73,7 @@ public: const SubControlVolume& scv, const ElementSolution& elemSol) const { - // TODO dumux-course-task B/C + // TODO: dumux-course-task B/C: // Change fracture properties return permeability_; } @@ -84,7 +84,7 @@ public: const SubControlVolume& scv, const ElementSolution& elemSol) const { - // TODO dumux-course-task B/C + // TODO: dumux-course-task B/C: // Change fracture properties return porosity_; } @@ -101,7 +101,7 @@ public: const SubControlVolume& scv, const ElementSolution& elemSol) const { - // TODO dumux-course-task B/C + // TODO: dumux-course-task B/C: // Change fracture properties return makeFluidMatrixInteraction(pcKrSwCurve_); } diff --git a/exercises/exercise-fractures/matrixproblem.hh b/exercises/exercise-fractures/matrixproblem.hh index a52381a7..9fd252c7 100644 --- a/exercises/exercise-fractures/matrixproblem.hh +++ b/exercises/exercise-fractures/matrixproblem.hh @@ -79,7 +79,7 @@ public: // we consider buoancy-driven upwards migration of nitrogen and set // Dirichlet BCs on the top and bottom boundary - // TODO dumux-course-task A + // TODO: dumux-course-task A: // Change boundary conditions and Dirichlet values! values.setAllNeumann(); if (globalPos[1] < 1e-6 || globalPos[1] > this->gridGeometry().bBoxMax()[1] - 1e-6) @@ -107,11 +107,11 @@ public: // the interior boundary conditions to Dirichlet. // IMPORTANT: Note that you will never be asked to set any values at the interior boundaries! // This simply chooses a different interface condition! - // TODO dumux-course-task B + // TODO: dumux-course-task B: // Change coupling conditions! values.setAllDirichlet(); - // TODO dumux-course-task additional task + // TODO: dumux-course-task additional task: // Set interior boundary condition depending on the domain marker of the fracture domain elements! return values; @@ -124,7 +124,7 @@ public: auto values = initialAtPos(globalPos); // nitrogen is in contact with the domain on the center half of the lower boundary - // TODO dumux-course-task A + // TODO: dumux-course-task A: // Change boundary conditions and Dirichlet values! if (globalPos[1] < 1e-6 && globalPos[0] > 25.0 && globalPos[0] < 75.0) values[saturationIdx] = boundarySaturation_; diff --git a/exercises/exercise-fractures/params.input b/exercises/exercise-fractures/params.input index 588e2294..612baec1 100644 --- a/exercises/exercise-fractures/params.input +++ b/exercises/exercise-fractures/params.input @@ -4,7 +4,7 @@ DtInitial = 10 # [s] MaxTimeStepSize = 2500 # [s] [Problem] -# TODO dumux-course-task A: switch off gravity +# TODO: dumux-course-task A: switch off gravity EnableGravity = true [Grid] @@ -29,7 +29,7 @@ SpatialParams.Permeability = 1e-7 SpatialParams.PermeabilityBarrier = 1e-16 SpatialParams.Porosity = 0.85 SpatialParams.PorosityBarrier = 0.05 -# TODO: set the VGAlpha parameter e.g. to 1e.5 and examine the nitrogen saturation in the fracture tips (then reset to 1e-1 again) +# TODO: dumux-course-task: set the VGAlpha parameter e.g. to 1e.5 and examine the nitrogen saturation in the fracture tips (then reset to 1e-1 again) SpatialParams.VanGenuchtenAlpha = 1e-1 SpatialParams.VanGenuchtenN = 2 SpatialParams.Swr = 0.0 diff --git a/exercises/exercise-grids/params.input b/exercises/exercise-grids/params.input index dbba7056..9fc6242a 100644 --- a/exercises/exercise-grids/params.input +++ b/exercises/exercise-grids/params.input @@ -5,11 +5,11 @@ TEnd = 3.154e9 # in seconds, i.e ten years [Grid] UpperRight = 60 40 Cells = 24 16 -# TODO: Task 1: Globally refine your grid -# TODO: Task 2: Develop grid input parameters that can be split into zones -# TODO: Task 3: Using the zoning and grading parameters, redevelop your grid to optimize your refinement in the areas that matter. -# TODO: Task 4: Run your simulation with the provided structured grid file ./grids/grid_structured.msh -# TODO: Task 5: Run your simulation with the provided unstructured grid file ./grids/grid_unstructured.msh +# TODO: dumux-course-task 1: Globally refine your grid +# TODO: dumux-course-task 2: Develop grid input parameters that can be split into zones +# TODO: dumux-course-task 3: Using the zoning and grading parameters, redevelop your grid to optimize your refinement in the areas that matter. +# TODO: dumux-course-task 4: Run your simulation with the provided structured grid file ./grids/grid_structured.msh +# TODO: dumux-course-task 5: Run your simulation with the provided unstructured grid file ./grids/grid_unstructured.msh [Problem] Name = grid_exercise diff --git a/exercises/exercise-grids/properties.hh b/exercises/exercise-grids/properties.hh index 1a2879ba..f5458147 100644 --- a/exercises/exercise-grids/properties.hh +++ b/exercises/exercise-grids/properties.hh @@ -35,13 +35,13 @@ struct Injection2pCC { using InheritsFrom = std::tuple<Injection2p, CCTpfaModel> // Set the grid type template<class TypeTag> struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2>; }; -// TODO: dumux-course-task 2 +// TODO: dumux-course-task 2: //Replace the above Grid Property definition with a more flexible grid (Use Dune::TensorProductCoordinates) -// TODO: dumux-course-task 4 +// TODO: dumux-course-task 4: // Replace the above Grid Property definition to read in a external structured grid via a .msh file (Use Dune::ALUGrid and Dune:cube) -// TODO: dumux-course-task 5 +// TODO: dumux-course-task 5: // Replace the above Grid Property definition to read in a external unstructured grid via a .msh file (Use Dune::ALUGrid and Dune::simplex) // Set the problem property diff --git a/exercises/exercise-mainfile/exercise1pamain.cc b/exercises/exercise-mainfile/exercise1pamain.cc index a019e2e1..637f8470 100644 --- a/exercises/exercise-mainfile/exercise1pamain.cc +++ b/exercises/exercise-mainfile/exercise1pamain.cc @@ -87,7 +87,7 @@ int main(int argc, char** argv) Dune::Timer timer; - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: // Change the differentiation method to analytic by changing from DiffMethod::numeric to DiffMethod::analytic // the assembler for stationary problems diff --git a/exercises/exercise-mainfile/exercise_mainfile_a.input b/exercises/exercise-mainfile/exercise_mainfile_a.input index 9dadca19..48ede646 100644 --- a/exercises/exercise-mainfile/exercise_mainfile_a.input +++ b/exercises/exercise-mainfile/exercise_mainfile_a.input @@ -15,5 +15,5 @@ PermeabilityLens = 1e-12 # [m^2] [Assembly.NumericDifference] PriVarMagnitude = 1e5 -# TODO: Task 3: Change BaseEpsilon to a smaller value 1e-15 +# TODO: dumux-course-task 3: Change BaseEpsilon to a smaller value 1e-15 BaseEpsilon = 1e-10 diff --git a/exercises/exercise-mainfile/properties.hh b/exercises/exercise-mainfile/properties.hh index 44ee606c..96260115 100644 --- a/exercises/exercise-mainfile/properties.hh +++ b/exercises/exercise-mainfile/properties.hh @@ -24,7 +24,7 @@ #include <dumux/discretization/box.hh> #include <dumux/porousmediumflow/1p/model.hh> -// TODO: dumux-course-task 3 +// TODO: dumux-course-task 3: // uncomment the incompressiblelocalresidual which is a specialization of the standard immiscible localresidual for one phase incompressible cases and provides an analytic jacobian. // #include <dumux/porousmediumflow/1p/incompressiblelocalresidual.hh> @@ -66,7 +66,7 @@ public: using type = FluidSystems::OnePLiquid<Scalar, Components::SimpleH2O<Scalar> >; }; -// TODO: dumux-course-task 3 +// TODO: dumux-course-task 3: // set the OneP Incompressible local residual for the OnePIncompressible type tag. This provides an analytic jacobian to be used for the analytic solution. Change that by setting: // template<class TypeTag> // struct LocalResidual<TypeTag, TTag::OnePIncompressible> { using type = OnePIncompressibleLocalResidual<TypeTag>; }; diff --git a/exercises/exercise-model/README.md b/exercises/exercise-model/README.md index f5cffc19..f643edf0 100644 --- a/exercises/exercise-model/README.md +++ b/exercises/exercise-model/README.md @@ -85,7 +85,7 @@ namespace Dumux::Properties::TTag { struct NonlinearDiffusionTest { - // TODO: Set new model by replacing ModelTypeTag + // TODO: dumux-course-task 3.1: Set new model by replacing ModelTypeTag using InheritsFrom = std::tuple</*ModelTypeTag,*/BoxModel>; // Further property definitions diff --git a/exercises/exercise-model/main.cc b/exercises/exercise-model/main.cc index ee698d91..01ee6c57 100644 --- a/exercises/exercise-model/main.cc +++ b/exercises/exercise-model/main.cc @@ -29,7 +29,7 @@ #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/assembly/fvassembler.hh> -// TODO Task 3.1: Include the header model.hh +// TODO: dumux-course-task 3.1: include the header model.hh /*! * \ingroup NonlinearDiffusion @@ -79,7 +79,7 @@ namespace Dumux::Properties::TTag { struct NonlinearDiffusionTest { - // TODO Task 3.1: We need to set our model by replacing ModelTypeTag + // TODO: dumux-course-task 3.1: we need to set our model by replacing ModelTypeTag using InheritsFrom = std::tuple</*ModelTypeTag,*/BoxModel>; using Scalar = double; @@ -138,7 +138,7 @@ int main(int argc, char** argv) // the problem for the boundary conditions, a solution vector and a grid variables instance. auto gridGeometry = std::make_shared<GridGeometry>(gridManager.grid().leafGridView()); - // TODO Task 3.2: Uncomment when the model is implemented + // TODO: dumux-course-task 3.2: uncomment when the model is implemented // using Scalar = GetPropType<TypeTag, Properties::Scalar>; // using Problem = GetPropType<TypeTag, Properties::Problem>; // using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; diff --git a/exercises/exercise-properties/mylocalresidual.hh b/exercises/exercise-properties/mylocalresidual.hh index b2d98dbe..2ff017f1 100644 --- a/exercises/exercise-properties/mylocalresidual.hh +++ b/exercises/exercise-properties/mylocalresidual.hh @@ -59,7 +59,7 @@ public: * \note The volVars can be different to allow computing * the implicit euler time derivative here */ - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: // Eliminate density from the storage term NumEqVector computeStorage(const Problem& problem, const SubControlVolume& scv, @@ -95,7 +95,7 @@ public: * \param scvf The sub control volume face to compute the flux on * \param elemFluxVarsCache The cache related to flux computation */ - // TODO: dumux-course-task + // TODO: dumux-course-task 3: // Eliminate the density from the flux term NumEqVector computeFlux(const Problem& problem, const Element& element, diff --git a/exercises/exercise-properties/problem.hh b/exercises/exercise-properties/problem.hh index 8d42a979..bfd13896 100644 --- a/exercises/exercise-properties/problem.hh +++ b/exercises/exercise-properties/problem.hh @@ -107,7 +107,7 @@ public: */ NumEqVector neumannAtPos(const GlobalPosition &globalPos) const { -// TODO: reformulate the neumann boundary condition's values in terms of volume instead of mass injected per meter and second +// TODO: dumux-course-task 3: reformulate the neumann boundary condition's values in terms of volume instead of mass injected per meter and second NumEqVector values(0.0); if (onInlet_(globalPos)) values[contiDNAPLEqIdx] = -0.04; // kg / (m * s) diff --git a/exercises/exercise-properties/properties.hh b/exercises/exercise-properties/properties.hh index c31cca06..c99d71ef 100644 --- a/exercises/exercise-properties/properties.hh +++ b/exercises/exercise-properties/properties.hh @@ -28,7 +28,7 @@ #include "spatialparams.hh" #include "problem.hh" -// TODO: dumux-course-task 3 +// TODO: dumux-course-task 3: // Include the local residual header namespace Dumux::Properties { @@ -47,7 +47,7 @@ struct Grid<TypeTag, TTag::TwoPIncompressible> { using type = Dune::YaspGrid<2>; template<class TypeTag> struct Problem<TypeTag, TTag::TwoPIncompressible> { using type = TwoPTestProblem<TypeTag>; }; -// TODO: dumux-course-task 3 +// TODO: dumux-course-task 3: // Use MyLocalResidual as LocalResidual diff --git a/exercises/exercise-runtimeparams/params.input b/exercises/exercise-runtimeparams/params.input index 184e347b..0efe314f 100644 --- a/exercises/exercise-runtimeparams/params.input +++ b/exercises/exercise-runtimeparams/params.input @@ -11,12 +11,12 @@ Name = runtimeparams_exercise OnlyPlotMaterialLaws = true AquiferDepth = 2700.0 # m InjectionDuration = 2.628e6 # in seconds, i.e. one month -# TODO: Task 2: Create a parameter called "TotalAreaSpecificInflow" -# TODO: Task 3: Run the case with and without a provided value in the input file for "TotalAreaSpecificInflow" +# TODO: dumux-course-task 2: Create a parameter called "TotalAreaSpecificInflow" +# TODO: dumux-course-task 3: Run the case with and without a provided value in the input file for "TotalAreaSpecificInflow" [SpatialParams] PermeabilityAquitard = 1e-15 # m^2 -# TODO: Task 1: Change the Aquitard's Entry Pressure +# TODO: dumux-course-task 1: Change the Aquitard's Entry Pressure Aquitard.BrooksCoreyPcEntry = 4.5e4 # Pa Aquitard.BrooksCoreyLambda = 2.0 Aquitard.Swr = 0.2 diff --git a/exercises/exercise-runtimeparams/problem.hh b/exercises/exercise-runtimeparams/problem.hh index a9c46e82..96cd16ed 100644 --- a/exercises/exercise-runtimeparams/problem.hh +++ b/exercises/exercise-runtimeparams/problem.hh @@ -79,13 +79,13 @@ public: aquiferDepth_ = getParam<Scalar>("Problem.AquiferDepth"); // the duration of the injection, units: second injectionDuration_ = getParamFromGroup<Scalar>("Problem","InjectionDuration"); - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // Set a variable "TotalAreaSpecificInflow" to read in a value from the parameter tree via the input file - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: // Set a default value for the above parameter. - // TODO: dumux-course-task 4 + // TODO: dumux-course-task 4: // Provide output describing where the parameter value comes from using parameter bool functions. } @@ -147,7 +147,7 @@ public: { // inject nitrogen. negative values mean injection // units kg/(s*m^2) - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // Incorporate "totalAreaSpecificInflow_" into the injection boundary condition values[Indices::conti0EqIdx + FluidSystem::N2Idx]= -1e-4; values[Indices::conti0EqIdx + FluidSystem::H2OIdx] = 0.0; @@ -202,7 +202,7 @@ private: std::string name_; //! Problem name Scalar aquiferDepth_; //! Depth of the aquifer in m Scalar injectionDuration_; //! Duration of the injection in seconds - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // Set a variable "totalAreaSpecificInflow_" to read in a value from the parameter tree via the input file Scalar time_; }; diff --git a/exercises/solution/exercise-biomineralization/biominproblem.hh b/exercises/solution/exercise-biomineralization/biominproblem.hh index 077c6714..af976143 100644 --- a/exercises/solution/exercise-biomineralization/biominproblem.hh +++ b/exercises/solution/exercise-biomineralization/biominproblem.hh @@ -17,7 +17,7 @@ #include <dumux/common/numeqvector.hh> #include <dumux/porousmediumflow/problem.hh> -// TODO: dumux-course-task +// TODO: dumux-course-task 3: // include chemistry file here #include "chemistry/simplebiominreactions.hh" // chemical reactions @@ -53,7 +53,7 @@ class BioMinProblem : public PorousMediumFlowProblem<TypeTag> using Element = typename GridView::template Codim<0>::Entity; using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; using SubControlVolume = typename FVElementGeometry::SubControlVolume; - // TODO: dumux-course-task + // TODO: dumux-course-task 3: // set the chemistry TypeTag using Chemistry = typename Dumux::SimpleBiominReactions<NumEqVector, VolumeVariables>; @@ -186,7 +186,7 @@ public: values[conti0EqIdx + CaIdx] = - waterFlux * concCa_ / FluidSystem::molarMass(CaIdx); values[conti0EqIdx + UreaIdx] = - waterFlux * concUrea_ / FluidSystem::molarMass(UreaIdx); } - // TODO: dumux-course-task + // TODO: dumux-course-task 5: // Set CO2 injection below aquitard after the injBioTime if(globalPos[0] < eps_ && globalPos[1] > 2.0 + eps_ @@ -255,7 +255,7 @@ public: { NumEqVector source(0.0); - // TODO: dumux-course-task + // TODO: dumux-course-task 3: // set Chemistry Chemistry chemistry; // set VolumeVariables diff --git a/exercises/solution/exercise-biomineralization/biominspatialparams.hh b/exercises/solution/exercise-biomineralization/biominspatialparams.hh index fccd6cb7..519b7381 100644 --- a/exercises/solution/exercise-biomineralization/biominspatialparams.hh +++ b/exercises/solution/exercise-biomineralization/biominspatialparams.hh @@ -16,7 +16,7 @@ #include <dumux/material/fluidmatrixinteractions/2p/linearmaterial.hh> #include <dumux/material/fluidmatrixinteractions/2p/brookscorey.hh> #include <dumux/material/fluidmatrixinteractions/porosityprecipitation.hh> -// TODO: dumux-course-task +// TODO: dumux-course-task 6: // include the new permeability law (power law) instead of Kozeny-Carman #include "fluidmatrixinteractions/permeabilitypowerlaw.hh" //the power-law porosity-permeability relation @@ -271,7 +271,7 @@ private: bool isFaultZone_(const GlobalPosition &globalPos) const { return globalPos[dimWorld-2] > 2 - eps_ && globalPos[dimWorld-2] < 3 + eps_;} - // TODO: dumux-course-task + // TODO: dumux-course-task 6: // define the power law as the permeability law PermeabilityPowerLaw<PermeabilityType> permLaw_; PoroLaw poroLaw_; diff --git a/exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh b/exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh index c13d1f4c..3c86581a 100644 --- a/exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh +++ b/exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh @@ -78,7 +78,7 @@ public: const Scalar volFracBiofilm = max(volVars.solidVolumeFraction(BiofilmPhaseIdx),0.0); - // TODO: dumux-course-task + // TODO: dumux-course-task 2: // implement mass of biofilm const Scalar massBiofilm = densityBiofilm * volFracBiofilm; @@ -86,16 +86,17 @@ public: xwCa, volVars.moleFraction(liquidPhaseIdx,CO2Idx)); // [mol_urea/kg_H2O] - // TODO: dumux-course-task + // TODO: dumux-course-task 2: // compute rate of ureolysis by implementing Z_urease,biofilm and r_urea const Scalar Zub = kub_ * massBiofilm; // [kg urease/m³] const Scalar rurea = kUrease_ * Zub * molalityUrea / (kUrea_ + molalityUrea); // [mol/m³s] + // TODO: dumux-course-task 2: // compute/set dissolution and precipitation rate of calcite const Scalar rprec = rurea; // set source terms - // TODO: dumux-course-task + // TODO: dumux-course-task 2: // set the source terms using the reaction rates defined above and signs based on the stoichiometry of the reactions. // Hint: Ammonium occurs in the reaction equation, but is not accounted for in this simplified setup. // Additionally, the consumption of water by the reaction may be neglected, as water is present in excess. diff --git a/exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh b/exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh index 9f9a6ff1..a955a5a1 100644 --- a/exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh +++ b/exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh @@ -39,11 +39,11 @@ public: PermeabilityType evaluatePermeability(PermeabilityType refPerm, Scalar refPoro, Scalar poro) const { using std::pow; - // TODO: dumux-course-task + // TODO: dumux-course-task 6: // read the exponent for the power law from the input file const Scalar exponent = getParam<Scalar>("PowerLaw.Exponent", 5.0); - // TODO: dumux-course-task + // TODO: dumux-course-task 6: // return the updated permeability according to K=K_0*(poro/refPoro)^exponent return refPerm * pow(poro/refPoro, exponent); } diff --git a/exercises/solution/exercise-biomineralization/params.input b/exercises/solution/exercise-biomineralization/params.input index fe429486..585c4102 100644 --- a/exercises/solution/exercise-biomineralization/params.input +++ b/exercises/solution/exercise-biomineralization/params.input @@ -10,6 +10,8 @@ Name = biomin UpperRight = 20 15 # x-/y-coordinates of the upper-right corner of the grid [m] Cells = 20 15 # x-/y-resolution of the grid +# TODO: dumux-course-task 4: +# vary parameters InjBioTime, InitBiofilm, InjVolumeflux, ConcUrea and ConcCa [Initial] InitDensityW = 997 # [kg/m³] initial wetting density InitPressure = 1e5 # [Pa] initial pressure @@ -46,7 +48,7 @@ KUrea = 0.355 # [mol/kgH2O] Lauchnor et al. 2014 [Brine] Salinity = 0.1 -#TODO: dumux-course-task +# TODO: dumux-course-task 6: # add the power law's exponent parameter PowerLaw.Exponent = 5 [PowerLaw] Exponent = 5.0 diff --git a/exercises/solution/exercise-biomineralization/properties.hh b/exercises/solution/exercise-biomineralization/properties.hh index c2341178..25f3b4ac 100644 --- a/exercises/solution/exercise-biomineralization/properties.hh +++ b/exercises/solution/exercise-biomineralization/properties.hh @@ -18,7 +18,7 @@ #include <dumux/discretization/cctpfa.hh> #include <dumux/porousmediumflow/2pncmin/model.hh> #include <dumux/porousmediumflow/problem.hh> -// TODO: dumux-course-task +// TODO: dumux-course-task 7: // include the CO2 component and tabulated values from DuMux #include <dumux/material/components/co2.hh> //!< CO2 component for use with tabulated values #include <dumux/material/components/defaultco2table.hh> //! Provides the precalculated tabulated values of CO2 density and enthalpy. @@ -55,7 +55,7 @@ struct FluidSystem<TypeTag, TTag::ExerciseBioMin> { private: using Scalar = GetPropType<TypeTag, Properties::Scalar>; - // TODO: dumux-course-task + // TODO: dumux-course-task 7: // use the CO2 component with tabulated values using CO2Impl = Components::CO2<Scalar, GeneratedCO2Tables::CO2Tables>; using H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>; diff --git a/exercises/solution/exercise-grids/params.input b/exercises/solution/exercise-grids/params.input index 04d20959..dcb9ce63 100644 --- a/exercises/solution/exercise-grids/params.input +++ b/exercises/solution/exercise-grids/params.input @@ -6,10 +6,10 @@ TEnd = 3.154e9 # in seconds, i.e ten years # UpperRight = 60 40 # Cells = 24 16 -# TODO: Task 1: Globally refine your grid +# TODO: dumux-course-task 1: Globally refine your grid # Refinement = 2 -# TODO: Task 2: Develop even grid input parameters that can be split into zones +# TODO: dumux-course-task 2: Develop even grid input parameters that can be split into zones # Positions0 = 0 60 # Positions1 = 0 40 # Cells0 = 24 @@ -17,7 +17,7 @@ TEnd = 3.154e9 # in seconds, i.e ten years # Grading0 = 1.0 # Grading1 = 1.0 -# TODO: Task 3: Using the zoning and grading parameters, redevelop your grid to optimize your refinement in the areas that matter. +# TODO: dumux-course-task 3: Using the zoning and grading parameters, redevelop your grid to optimize your refinement in the areas that matter. Positions0 = 0 40 60 Positions1 = 0 25 30 35 40 Cells0 = 10 14 @@ -25,11 +25,11 @@ Cells1 = 10 6 6 1 Grading0 = 1.0 -1.25 Grading1 = 1.0 -1.2 1.2 1.0 -# TODO: Task 4: Run your simulation the provided structured grid file ./grids/grid_structured.msh +# TODO: dumux-course-task 4: Run your simulation the provided structured grid file ./grids/grid_structured.msh # File = ./grids/grid_structured.msh # File = ./grids/grid_structured.dgf -# TODO: Task 5: Run your simulation the provided structured grid file ./grids/grid_unstructured.msh +# TODO: dumux-course-task 5: Run your simulation the provided structured grid file ./grids/grid_unstructured.msh #File = ./grids/grid_unstructured.msh [Problem] diff --git a/exercises/solution/exercise-grids/properties.hh b/exercises/solution/exercise-grids/properties.hh index 01568c1a..8e19ef08 100644 --- a/exercises/solution/exercise-grids/properties.hh +++ b/exercises/solution/exercise-grids/properties.hh @@ -34,15 +34,15 @@ struct Injection2pCC { using InheritsFrom = std::tuple<Injection2p, CCTpfaModel> //Set the grid type // template<class TypeTag> // struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2>; }; -// TODO: Task 2: Replace the above Grid Property definition with a more flexible grid (Use Dune::TensorProductCoordinates) +// TODO: dumux-course-task 2: Replace the above Grid Property definition with a more flexible grid (Use Dune::TensorProductCoordinates) template<class TypeTag> struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2, Dune::TensorProductCoordinates<double, 2> >; }; -// TODO: Task 4: Replace the above Grid Property definition to read in a external structured grid via a .msh file (Use Dune::ALUGrid and Dune:cube) +// TODO: dumux-course-task 4: Replace the above Grid Property definition to read in a external structured grid via a .msh file (Use Dune::ALUGrid and Dune:cube) // template<class TypeTag> // struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>; }; -// TODO: Task 5: Replace the above Grid Property definition to read in a external unstructured grid via a .msh file (Use Dune::ALUGrid and Dune::simplex) +// TODO: dumux-course-task 5: Replace the above Grid Property definition to read in a external unstructured grid via a .msh file (Use Dune::ALUGrid and Dune::simplex) // template<class TypeTag> // struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::ALUGrid<2, 2, Dune::simplex, Dune::nonconforming>; }; diff --git a/exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc b/exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc index ed2d260e..4f2c169a 100644 --- a/exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc +++ b/exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc @@ -87,7 +87,7 @@ int main(int argc, char** argv) Dune::Timer timer; - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: // Change the differentiation method to analytic by changing from DiffMethod::numeric to DiffMethod::analytic // the assembler for stationary problems diff --git a/exercises/solution/exercise-mainfile/properties.hh b/exercises/solution/exercise-mainfile/properties.hh index b1421bf1..29dd8a96 100644 --- a/exercises/solution/exercise-mainfile/properties.hh +++ b/exercises/solution/exercise-mainfile/properties.hh @@ -24,7 +24,7 @@ #include <dumux/discretization/box.hh> #include <dumux/porousmediumflow/1p/model.hh> -// TODO: dumux-course-task 3 +// TODO: dumux-course-task 3: // uncomment the incompressiblelocalresidual which is a specialization of the standard immisible localresidual for one phase incompressible cases and provides an analytic jacobian. #include <dumux/porousmediumflow/1p/incompressiblelocalresidual.hh> @@ -66,7 +66,7 @@ public: using type = FluidSystems::OnePLiquid<Scalar, Components::SimpleH2O<Scalar> >; }; -// TODO: dumux-course-task 3 +// TODO: dumux-course-task 3: // set the OneP Incompressible local residual for the OnePIncompressible type tag. This provides an analytic jacobian to be used for the analytic solution. Change that by setting: template<class TypeTag> struct LocalResidual<TypeTag, TTag::OnePIncompressible> { using type = OnePIncompressibleLocalResidual<TypeTag>; }; diff --git a/exercises/solution/exercise-model/main.cc b/exercises/solution/exercise-model/main.cc index c8083859..4b847217 100644 --- a/exercises/solution/exercise-model/main.cc +++ b/exercises/solution/exercise-model/main.cc @@ -29,6 +29,7 @@ #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/assembly/fvassembler.hh> +// TODO: dumux-course-task 3.1: include the header model.hh #include "model.hh" /*! @@ -79,7 +80,7 @@ namespace Dumux::Properties::TTag { struct NonlinearDiffusionTest { - // TODO: We need to set our model by replacing ModelTypeTag + // TODO: dumux-course-task 3.1: We need to set our model by replacing ModelTypeTag using InheritsFrom = std::tuple<NonlinearDiffusionModel, BoxModel>; using Scalar = double; @@ -138,6 +139,7 @@ int main(int argc, char** argv) // the problem for the boundary conditions, a solution vector and a grid variables instance. auto gridGeometry = std::make_shared<GridGeometry>(gridManager.grid().leafGridView()); + // TODO: dumux-course-task 3.2: uncomment when the model is implemented using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Problem = GetPropType<TypeTag, Properties::Problem>; using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; diff --git a/exercises/solution/exercise-runtimeparams/params.input b/exercises/solution/exercise-runtimeparams/params.input index 4e356277..f4a8792b 100644 --- a/exercises/solution/exercise-runtimeparams/params.input +++ b/exercises/solution/exercise-runtimeparams/params.input @@ -11,12 +11,12 @@ Name = runtimeparams_exercise OnlyPlotMaterialLaws = true AquiferDepth = 2700.0 # m InjectionDuration = 2.628e6 # in seconds, i.e. one month -# TODO: Task 2: Create a parameter called "TotalAreaSpecificInflow" +# TODO: dumux-course-task 2: Create a parameter called "TotalAreaSpecificInflow" TotalAreaSpecificInflow = -1e-4 # kg/(s m^2) [SpatialParams] PermeabilityAquitard = 1e-15 # m^2 -# TODO: Task 1: Change the Aquitard's Entry Pressure +# TODO: dumux-course-task 1: Change the Aquitard's Entry Pressure Aquitard.BrooksCoreyPcEntry = 4.5e3 # Pa Aquitard.BrooksCoreyLambda = 2.0 Aquitard.Swr = 0.2 diff --git a/exercises/solution/exercise-runtimeparams/problem.hh b/exercises/solution/exercise-runtimeparams/problem.hh index a32cada9..d8f1e4bd 100644 --- a/exercises/solution/exercise-runtimeparams/problem.hh +++ b/exercises/solution/exercise-runtimeparams/problem.hh @@ -79,13 +79,13 @@ public: aquiferDepth_ = getParam<Scalar>("Problem.AquiferDepth"); // the duration of the injection, units: second injectionDuration_ = getParamFromGroup<Scalar>("Problem","InjectionDuration"); - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // Set a variable "TotalAreaSpecificInflow" to read in a value from the parameter tree via the input file totalAreaSpecificInflow_ = getParam<Scalar>("Problem.TotalAreaSpecificInflow"); - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: // Set a default value for the above parameter. // totalAreaSpecificInflow_ = getParam<Scalar>("Problem.TotalAreaSpecificInflow", -1e-4); - // TODO: dumux-course-task 4 + // TODO: dumux-course-task 4: // Provide output describing where the parameter value comes from using parameter bool functions. // if (hasParamInGroup("Problem","TotalAreaSpecificInflow")) // std::cout << "Parameter value is read from the input file." << std::endl; @@ -151,7 +151,7 @@ public: { // inject nitrogen. negative values mean injection // units kg/(s*m^2) - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // Incorporate "totalAreaSpecificInflow_" into the injection boundary condition values[Indices::conti0EqIdx + FluidSystem::N2Idx] = totalAreaSpecificInflow_; values[Indices::conti0EqIdx + FluidSystem::H2OIdx] = 0.0; @@ -206,7 +206,7 @@ private: std::string name_; //! Problem name Scalar aquiferDepth_; //! Depth of the aquifer in m Scalar injectionDuration_; //! Duration of the injection in seconds - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // Set a variable "totalAreaSpecificInflow_" to read in a value from the parameter tree via the input file Scalar totalAreaSpecificInflow_; //! Rate of the Injection in kg/(s m^2) Scalar time_; -- GitLab From 9ae93207b490c26faeb9f072a149f09c9dd3fcf0 Mon Sep 17 00:00:00 2001 From: VivienL <vivien.langhans@iws.uni-stuttgart.de> Date: Fri, 7 Mar 2025 11:42:19 +0100 Subject: [PATCH 4/4] add patches --- .patches/exercise-basic/exercise-basic.patch | 42 ++--- .../exercise-biomineralization.patch | 127 ++++++---------- .../exercise-coupling-ff-pm.patch | 143 +++++++++--------- .../exercise-fluidsystem.patch | 40 ++--- .../exercise-fractures.patch | 54 +++---- .patches/exercise-grids/exercise-grids.patch | 44 +++--- .../exercise-mainfile/exercise-mainfile.patch | 30 ++-- .patches/exercise-model/exercise-model.patch | 30 ++-- .../exercise-properties.patch | 26 ++-- .../exercise-runtimeparams.patch | 36 ++--- 10 files changed, 268 insertions(+), 304 deletions(-) diff --git a/.patches/exercise-basic/exercise-basic.patch b/.patches/exercise-basic/exercise-basic.patch index 26e8cd0d..1e00fd3b 100644 --- a/.patches/exercise-basic/exercise-basic.patch +++ b/.patches/exercise-basic/exercise-basic.patch @@ -1,5 +1,5 @@ diff -ruN exercises/exercise-basic/2pmain.cc exercises/solution/exercise-basic/2pmain.cc ---- exercises/exercise-basic/2pmain.cc 2025-02-26 11:57:52.812342780 +0100 +--- exercises/exercise-basic/2pmain.cc 2025-03-07 11:30:34.870192062 +0100 +++ exercises/solution/exercise-basic/2pmain.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,153 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -32,7 +32,7 @@ diff -ruN exercises/exercise-basic/2pmain.cc exercises/solution/exercise-basic/2 -#include <dumux/io/grid/gridmanager_yasp.hh> - -/*! -- * TODO:dumux-course-task 3: +- * TODO: dumux-course-task 3: - * In 2pnimain.cc include the correct properties headerfile - */ -// The properties file, where the compile time options are defined @@ -46,7 +46,7 @@ diff -ruN exercises/exercise-basic/2pmain.cc exercises/solution/exercise-basic/2 - using namespace Dumux; - - /*! -- * TODO:dumux-course-task 3: +- * TODO: dumux-course-task 3: - * In 2pnimain.cc change the type tag for the new injection problem - */ - // define the type tag for this problem @@ -157,7 +157,7 @@ diff -ruN exercises/exercise-basic/2pmain.cc exercises/solution/exercise-basic/2 -} // end main diff -ruN exercises/exercise-basic/2pnimain.cc exercises/solution/exercise-basic/2pnimain.cc --- exercises/exercise-basic/2pnimain.cc 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-basic/2pnimain.cc 2025-02-26 11:38:46.841816361 +0100 ++++ exercises/solution/exercise-basic/2pnimain.cc 2025-03-07 10:42:02.617882948 +0100 @@ -0,0 +1,138 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: @@ -298,8 +298,8 @@ diff -ruN exercises/exercise-basic/2pnimain.cc exercises/solution/exercise-basic + return 0; +} // end main diff -ruN exercises/exercise-basic/CMakeLists.txt exercises/solution/exercise-basic/CMakeLists.txt ---- exercises/exercise-basic/CMakeLists.txt 2025-02-26 12:06:05.764771983 +0100 -+++ exercises/solution/exercise-basic/CMakeLists.txt 2025-02-26 11:38:46.841816361 +0100 +--- exercises/exercise-basic/CMakeLists.txt 2025-03-07 11:30:34.870192062 +0100 ++++ exercises/solution/exercise-basic/CMakeLists.txt 2025-03-07 10:42:02.617882948 +0100 @@ -1,12 +1,9 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -308,7 +308,7 @@ diff -ruN exercises/exercise-basic/CMakeLists.txt exercises/solution/exercise-ba -dumux_add_test(NAME exercise_basic_2p - SOURCES 2pmain.cc) - --# TODO: add the two-phase non-isothermal simulation program +-# TODO: dumux-course-task 3: add the two-phase non-isothermal simulation program - +# the two-phase non-isothermal simulation program +dumux_add_test(NAME exercise_basic_2pni_solution @@ -317,8 +317,8 @@ diff -ruN exercises/exercise-basic/CMakeLists.txt exercises/solution/exercise-ba # add a symlink for each input file add_input_file_links() diff -ruN exercises/exercise-basic/injection2pniproblem.hh exercises/solution/exercise-basic/injection2pniproblem.hh ---- exercises/exercise-basic/injection2pniproblem.hh 2025-02-26 11:38:46.801818192 +0100 -+++ exercises/solution/exercise-basic/injection2pniproblem.hh 2025-02-26 11:38:46.841816361 +0100 +--- exercises/exercise-basic/injection2pniproblem.hh 2025-03-07 11:30:34.871192055 +0100 ++++ exercises/solution/exercise-basic/injection2pniproblem.hh 2025-03-07 10:42:02.617882948 +0100 @@ -7,7 +7,7 @@ /*! * \file @@ -342,7 +342,7 @@ diff -ruN exercises/exercise-basic/injection2pniproblem.hh exercises/solution/ex bcTypes.setAllNeumann(); - /*! -- * TODO:dumux-course-task 4: +- * TODO: dumux-course-task 4: - * Set Dirichlet conditions for the energy equation on the left boundary - * and Neumann everywhere else. - * Think about: is there anything necessary to do here? @@ -357,7 +357,7 @@ diff -ruN exercises/exercise-basic/injection2pniproblem.hh exercises/solution/ex return initialAtPos(globalPos); - - /*! -- * TODO:dumux-course-task 4: +- * TODO: dumux-course-task 4: - * Set Dirichlet conditions for the energy equation on the left boundary. - * Think about: is there anything necessary to do here? - */ @@ -377,7 +377,7 @@ diff -ruN exercises/exercise-basic/injection2pniproblem.hh exercises/solution/ex values[Indices::conti0EqIdx + FluidSystem::H2OIdx] = 0.0; - /*! -- * TODO:dumux-course-task 4: +- * TODO: dumux-course-task 4: - * Set Neumann noflow conditions for the energy equation everywhere else except the left boundary. - * Additionally, consider the energy flux at the injection point which is equal to the product of the respective mass flux and the matching enthalpy. Use the function `gasEnthalpy(temperature,pressure)` from the N2 component to access the necessary enthalpy. - * hint: use `Indices::energyEqIdx` to access the entry belonging to the energy flux. @@ -395,7 +395,7 @@ diff -ruN exercises/exercise-basic/injection2pniproblem.hh exercises/solution/ex values[Indices::saturationIdx] = 0.0; - /*! -- * TODO:dumux-course-task 4: +- * TODO: dumux-course-task 4: - * Set a temperature gradient of 0.03 K per m beginning at 283 K here. - * Hint: you can use aquiferDepth_ and the globalPos similar to the pressure gradient. - * Use globalPos[0] and globalPos[1] to implement the high temperature lens with 380 K @@ -409,7 +409,7 @@ diff -ruN exercises/exercise-basic/injection2pniproblem.hh exercises/solution/ex } diff -ruN exercises/exercise-basic/injection2pproblem.hh exercises/solution/exercise-basic/injection2pproblem.hh ---- exercises/exercise-basic/injection2pproblem.hh 2025-02-26 11:38:46.801818192 +0100 +--- exercises/exercise-basic/injection2pproblem.hh 2025-03-07 10:42:02.607883011 +0100 +++ exercises/solution/exercise-basic/injection2pproblem.hh 1970-01-01 01:00:00.000000000 +0100 @@ -1,211 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -624,13 +624,13 @@ diff -ruN exercises/exercise-basic/injection2pproblem.hh exercises/solution/exer - -#endif diff -ruN exercises/exercise-basic/params.input exercises/solution/exercise-basic/params.input ---- exercises/exercise-basic/params.input 2025-02-26 12:13:01.057757112 +0100 +--- exercises/exercise-basic/params.input 2025-03-07 11:30:34.871192055 +0100 +++ exercises/solution/exercise-basic/params.input 2025-02-26 11:38:46.841816361 +0100 @@ -23,8 +23,8 @@ Aquifer.Swr = 0.2 Aquifer.Snr = 0.0 --# TODO: these parameters are only used in the nonisothermal model. Uncomment them for that +-# TODO: dumux-course-task 4: these parameters are only used in the nonisothermal model. Uncomment them for that -#[Component] -#SolidDensity = 2700 # solid density of granite -#SolidThermalConductivity = 2.8 # solid thermal conducitivity of granite @@ -641,7 +641,7 @@ diff -ruN exercises/exercise-basic/params.input exercises/solution/exercise-basi +SolidThermalConductivity = 2.8 # solid thermal conducitivity of granite +SolidHeatCapacity = 790 # solid heat capacity of granite diff -ruN exercises/exercise-basic/properties2p.hh exercises/solution/exercise-basic/properties2p.hh ---- exercises/exercise-basic/properties2p.hh 2025-02-26 11:38:46.801818192 +0100 +--- exercises/exercise-basic/properties2p.hh 2025-03-07 10:42:02.608883005 +0100 +++ exercises/solution/exercise-basic/properties2p.hh 1970-01-01 01:00:00.000000000 +0100 @@ -1,63 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -708,14 +708,14 @@ diff -ruN exercises/exercise-basic/properties2p.hh exercises/solution/exercise-b - -#endif diff -ruN exercises/exercise-basic/properties2pni.hh exercises/solution/exercise-basic/properties2pni.hh ---- exercises/exercise-basic/properties2pni.hh 2025-02-26 11:38:46.801818192 +0100 -+++ exercises/solution/exercise-basic/properties2pni.hh 2025-02-26 11:38:46.841816361 +0100 +--- exercises/exercise-basic/properties2pni.hh 2025-03-07 11:30:34.871192055 +0100 ++++ exercises/solution/exercise-basic/properties2pni.hh 2025-03-07 10:42:02.617882948 +0100 @@ -24,13 +24,9 @@ namespace Dumux::Properties { - /*! --* TODO:dumux-course-task 4 +-* TODO: dumux-course-task 4: -* Inherit from the TwoPNI model instead of TwoP here -*/ // Create new type tags @@ -726,7 +726,7 @@ diff -ruN exercises/exercise-basic/properties2pni.hh exercises/solution/exercise } // end namespace TTag diff -ruN exercises/exercise-basic/README.md exercises/solution/exercise-basic/README.md ---- exercises/exercise-basic/README.md 2025-03-04 10:55:49.676212309 +0100 +--- exercises/exercise-basic/README.md 2025-03-07 10:34:20.577090067 +0100 +++ exercises/solution/exercise-basic/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,94 +0,0 @@ -# Exercise Basics (DuMuX course) diff --git a/.patches/exercise-biomineralization/exercise-biomineralization.patch b/.patches/exercise-biomineralization/exercise-biomineralization.patch index 7a2f6aae..f5986d56 100644 --- a/.patches/exercise-biomineralization/exercise-biomineralization.patch +++ b/.patches/exercise-biomineralization/exercise-biomineralization.patch @@ -1,12 +1,9 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/solution/exercise-biomineralization/biominproblem.hh ---- exercises/exercise-biomineralization/biominproblem.hh 2025-03-03 11:34:18.218509920 +0100 -+++ exercises/solution/exercise-biomineralization/biominproblem.hh 2025-02-26 11:38:46.841816361 +0100 -@@ -17,12 +17,14 @@ - #include <dumux/common/numeqvector.hh> - #include <dumux/porousmediumflow/problem.hh> +--- exercises/exercise-biomineralization/biominproblem.hh 2025-03-07 11:30:34.871192055 +0100 ++++ exercises/solution/exercise-biomineralization/biominproblem.hh 2025-03-07 11:30:34.877192015 +0100 +@@ -19,10 +19,12 @@ --// TODO: dumux-course-task 3 -+// TODO: dumux-course-task + // TODO: dumux-course-task 3: // include chemistry file here +#include "chemistry/simplebiominreactions.hh" // chemical reactions @@ -17,12 +14,9 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/soluti * \brief Problem biomineralization (MICP) in an experimental setup. */ template <class TypeTag> -@@ -51,8 +53,9 @@ - using Element = typename GridView::template Codim<0>::Entity; - using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; +@@ -53,6 +55,7 @@ using SubControlVolume = typename FVElementGeometry::SubControlVolume; -- // TODO: dumux-course-task 3 -+ // TODO: dumux-course-task + // TODO: dumux-course-task 3: // set the chemistry TypeTag + using Chemistry = typename Dumux::SimpleBiominReactions<NumEqVector, VolumeVariables>; @@ -43,12 +37,9 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/soluti && globalPos[1] < 12.0 + eps_ && time_ < injBioTime_) { -@@ -183,8 +186,15 @@ - values[conti0EqIdx + CaIdx] = - waterFlux * concCa_ / FluidSystem::molarMass(CaIdx); - values[conti0EqIdx + UreaIdx] = - waterFlux * concUrea_ / FluidSystem::molarMass(UreaIdx); +@@ -185,6 +188,13 @@ } -- // TODO: dumux-course-task 5 -+ // TODO: dumux-course-task + // TODO: dumux-course-task 5: // Set CO2 injection below aquitard after the injBioTime + if(globalPos[0] < eps_ + && globalPos[1] > 2.0 + eps_ @@ -60,12 +51,9 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/soluti return values; } -@@ -245,16 +255,17 @@ - { - NumEqVector source(0.0); +@@ -247,14 +257,15 @@ -- // TODO: dumux-course-task 3 -+ // TODO: dumux-course-task + // TODO: dumux-course-task 3: // set Chemistry -// Chemistry chemistry; + Chemistry chemistry; @@ -82,11 +70,11 @@ diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/soluti { return Kxx_; diff -ruN exercises/exercise-biomineralization/biominspatialparams.hh exercises/solution/exercise-biomineralization/biominspatialparams.hh ---- exercises/exercise-biomineralization/biominspatialparams.hh 2025-02-26 11:38:46.802818146 +0100 -+++ exercises/solution/exercise-biomineralization/biominspatialparams.hh 2025-02-26 11:38:46.841816361 +0100 +--- exercises/exercise-biomineralization/biominspatialparams.hh 2025-03-07 11:30:34.871192055 +0100 ++++ exercises/solution/exercise-biomineralization/biominspatialparams.hh 2025-03-07 11:30:34.877192015 +0100 @@ -18,7 +18,7 @@ #include <dumux/material/fluidmatrixinteractions/porosityprecipitation.hh> - // TODO: dumux-course-task + // TODO: dumux-course-task 6: // include the new permeability law (power law) instead of Kozeny-Carman -#include <dumux/material/fluidmatrixinteractions/permeabilitykozenycarman.hh> +#include "fluidmatrixinteractions/permeabilitypowerlaw.hh" //the power-law porosity-permeability relation @@ -95,7 +83,7 @@ diff -ruN exercises/exercise-biomineralization/biominspatialparams.hh exercises/ @@ -273,7 +273,7 @@ - // TODO: dumux-course-task + // TODO: dumux-course-task 6: // define the power law as the permeability law - PermeabilityKozenyCarman<PermeabilityType> permLaw_; + PermeabilityPowerLaw<PermeabilityType> permLaw_; @@ -103,9 +91,9 @@ diff -ruN exercises/exercise-biomineralization/biominspatialparams.hh exercises/ Scalar initialPorosity_; diff -ruN exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh ---- exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh 2025-03-03 11:26:35.285339610 +0100 -+++ exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh 2025-02-26 11:38:46.841816361 +0100 -@@ -73,36 +73,38 @@ +--- exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh 2025-03-07 11:30:34.872192048 +0100 ++++ exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh 2025-03-07 11:30:34.877192015 +0100 +@@ -73,24 +73,27 @@ // define and compute some parameters for convenience: const Scalar xwCa = volVars.moleFraction(liquidPhaseIdx,CaIdx); const Scalar densityBiofilm = volVars.solidComponentDensity(BiofilmPhaseIdx); @@ -113,9 +101,8 @@ diff -ruN exercises/exercise-biomineralization/chemistry/simplebiominreactions.h using std::max; const Scalar volFracBiofilm = max(volVars.solidVolumeFraction(BiofilmPhaseIdx),0.0); -- // TODO: dumux-course-task 2 + -+ // TODO: dumux-course-task + // TODO: dumux-course-task 2: // implement mass of biofilm - const Scalar massBiofilm = 0.0; + const Scalar massBiofilm = densityBiofilm * volFracBiofilm; @@ -124,24 +111,22 @@ diff -ruN exercises/exercise-biomineralization/chemistry/simplebiominreactions.h xwCa, volVars.moleFraction(liquidPhaseIdx,CO2Idx)); // [mol_urea/kg_H2O] -- // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: - // compute rate of ureolysis by implementing Zub and rurea - const Scalar Zub = 0.0; - const Scalar rurea = 0.0; -+ // TODO: dumux-course-task + // compute rate of ureolysis by implementing Z_urease,biofilm and r_urea + const Scalar Zub = kub_ * massBiofilm; // [kg urease/m³] + const Scalar rurea = kUrease_ * Zub * molalityUrea / (kUrea_ + molalityUrea); // [mol/m³s] -- // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // compute/set dissolution and precipitation rate of calcite - const Scalar rprec = 0.0; + const Scalar rprec = rurea; // set source terms -- // TODO: dumux-course-task 2 -+ // TODO: dumux-course-task - // set the source terms using the reaction rates defined above and signs based on the stoichiometry of the reactions. + // TODO: dumux-course-task 2: +@@ -98,11 +101,11 @@ // Hint: Ammonium occurs in the reaction equation, but is not accounted for in this simplified setup. // Additionally, the consumption of water by the reaction may be neglected, as water is present in excess. q[H2OIdx] += 0.0; @@ -158,8 +143,8 @@ diff -ruN exercises/exercise-biomineralization/chemistry/simplebiominreactions.h private: diff -ruN exercises/exercise-biomineralization/CMakeLists.txt exercises/solution/exercise-biomineralization/CMakeLists.txt ---- exercises/exercise-biomineralization/CMakeLists.txt 2025-02-26 11:38:46.801818192 +0100 -+++ exercises/solution/exercise-biomineralization/CMakeLists.txt 2025-02-26 11:38:46.841816361 +0100 +--- exercises/exercise-biomineralization/CMakeLists.txt 2025-03-07 10:42:02.608883005 +0100 ++++ exercises/solution/exercise-biomineralization/CMakeLists.txt 2025-03-07 10:42:02.617882948 +0100 @@ -2,9 +2,9 @@ # SPDX-License-Identifier: GPL-3.0-or-later @@ -173,8 +158,8 @@ diff -ruN exercises/exercise-biomineralization/CMakeLists.txt exercises/solution # add a symlink for each input file add_input_file_links() diff -ruN exercises/exercise-biomineralization/components/biofilm.hh exercises/solution/exercise-biomineralization/components/biofilm.hh ---- exercises/exercise-biomineralization/components/biofilm.hh 2025-02-26 11:38:46.802818146 +0100 -+++ exercises/solution/exercise-biomineralization/components/biofilm.hh 2025-02-26 11:38:46.842816315 +0100 +--- exercises/exercise-biomineralization/components/biofilm.hh 2025-03-07 10:42:02.608883005 +0100 ++++ exercises/solution/exercise-biomineralization/components/biofilm.hh 2025-03-07 10:42:02.617882948 +0100 @@ -12,9 +12,10 @@ #ifndef DUMUX_BIOFILM_HH #define DUMUX_BIOFILM_HH @@ -188,19 +173,15 @@ diff -ruN exercises/exercise-biomineralization/components/biofilm.hh exercises/s namespace Dumux::Components { diff -ruN exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh ---- exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2025-03-03 11:37:11.636848883 +0100 -+++ exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2025-02-26 11:38:46.842816315 +0100 -@@ -39,12 +39,13 @@ - PermeabilityType evaluatePermeability(PermeabilityType refPerm, Scalar refPoro, Scalar poro) const - { +--- exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2025-03-07 11:30:34.872192048 +0100 ++++ exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2025-03-07 11:30:34.877192015 +0100 +@@ -41,10 +41,11 @@ using std::pow; -- // TODO: dumux-course-task 6 -+ // TODO: dumux-course-task + // TODO: dumux-course-task 6: // read the exponent for the power law from the input file + const Scalar exponent = getParam<Scalar>("PowerLaw.Exponent", 5.0); -- // TODO: dumux-course-task 6 -+ // TODO: dumux-course-task + // TODO: dumux-course-task 6: // return the updated permeability according to K=K_0*(poro/refPoro)^exponent - return refPerm; + return refPerm * pow(poro/refPoro, exponent); @@ -208,8 +189,8 @@ diff -ruN exercises/exercise-biomineralization/fluidmatrixinteractions/permeabil }; diff -ruN exercises/exercise-biomineralization/fluidsystems/biomin.hh exercises/solution/exercise-biomineralization/fluidsystems/biomin.hh ---- exercises/exercise-biomineralization/fluidsystems/biomin.hh 2025-02-26 11:38:46.802818146 +0100 -+++ exercises/solution/exercise-biomineralization/fluidsystems/biomin.hh 2025-02-26 11:38:46.842816315 +0100 +--- exercises/exercise-biomineralization/fluidsystems/biomin.hh 2025-03-07 10:42:02.608883005 +0100 ++++ exercises/solution/exercise-biomineralization/fluidsystems/biomin.hh 2025-03-07 10:42:02.617882948 +0100 @@ -219,7 +219,7 @@ static void init() { @@ -220,17 +201,9 @@ diff -ruN exercises/exercise-biomineralization/fluidsystems/biomin.hh exercises/ } diff -ruN exercises/exercise-biomineralization/params.input exercises/solution/exercise-biomineralization/params.input ---- exercises/exercise-biomineralization/params.input 2025-03-03 11:36:58.886338421 +0100 -+++ exercises/solution/exercise-biomineralization/params.input 2025-02-26 11:38:46.842816315 +0100 -@@ -10,18 +10,16 @@ - UpperRight = 20 15 # x-/y-coordinates of the upper-right corner of the grid [m] - Cells = 20 15 # x-/y-resolution of the grid - --# TODO: dumux-course-task 4 --# vary parameters InjBioTime, InitBiofilm, InjVolumeflux, ConcUrea and ConcCa - [Initial] - InitDensityW = 997 # [kg/m³] initial wetting density - InitPressure = 1e5 # [Pa] initial pressure +--- exercises/exercise-biomineralization/params.input 2025-03-07 11:30:34.872192048 +0100 ++++ exercises/solution/exercise-biomineralization/params.input 2025-03-07 11:30:34.877192015 +0100 +@@ -18,10 +18,10 @@ InitBiofilm = 0.05 # [-] initial volumefraction biofilm [Injection] @@ -244,7 +217,7 @@ diff -ruN exercises/exercise-biomineralization/params.input exercises/solution/e ConcCa = 40 # [kg/m³] injected calcium concentration (max: 50) ConcUrea = 60 # [kg/m³] injected urea concentration, should be 1.5 times ConcCa (max: 80) -@@ -37,7 +35,6 @@ +@@ -37,7 +37,6 @@ Aquitard.Swr = 0.0 Aquitard.Snr = 0.0 @@ -252,26 +225,23 @@ diff -ruN exercises/exercise-biomineralization/params.input exercises/solution/e [BioCoefficients] RhoBiofilm = 6.9 # [kg/m³] density of biofilm -@@ -49,5 +46,7 @@ - [Brine] +@@ -50,4 +49,6 @@ Salinity = 0.1 --#TODO: dumux-course-task 6 + # TODO: dumux-course-task 6: -# add the power law's exponent parameter PowerLaw.Exponent = 5.0 -+#TODO: dumux-course-task +# add the power law's exponent parameter PowerLaw.Exponent = 5 +[PowerLaw] +Exponent = 5.0 diff -ruN exercises/exercise-biomineralization/properties.hh exercises/solution/exercise-biomineralization/properties.hh ---- exercises/exercise-biomineralization/properties.hh 2025-03-03 11:38:57.413788851 +0100 -+++ exercises/solution/exercise-biomineralization/properties.hh 2025-02-26 11:38:46.842816315 +0100 +--- exercises/exercise-biomineralization/properties.hh 2025-03-07 11:30:34.872192048 +0100 ++++ exercises/solution/exercise-biomineralization/properties.hh 2025-03-07 11:30:34.878192008 +0100 @@ -18,17 +18,20 @@ #include <dumux/discretization/cctpfa.hh> #include <dumux/porousmediumflow/2pncmin/model.hh> #include <dumux/porousmediumflow/problem.hh> -#include <dumux/material/components/simpleco2.hh> //!< Simplified CO2 component based on ideal gas law --// TODO: dumux-course-task 7 -+// TODO: dumux-course-task + // TODO: dumux-course-task 7: // include the CO2 component and tabulated values from DuMux -#include "solidsystems/biominsolidphase.hh" // The biomineralization solid system +#include <dumux/material/components/co2.hh> //!< CO2 component for use with tabulated values @@ -289,12 +259,9 @@ diff -ruN exercises/exercise-biomineralization/properties.hh exercises/solution/ namespace Properties { //! Create new type tag for the problem -@@ -52,9 +55,9 @@ - { - private: +@@ -54,7 +57,7 @@ using Scalar = GetPropType<TypeTag, Properties::Scalar>; -- // TODO: dumux-course-task 7 -+ // TODO: dumux-course-task + // TODO: dumux-course-task 7: // use the CO2 component with tabulated values - using CO2Impl = Components::SimpleCO2<Scalar>; + using CO2Impl = Components::CO2<Scalar, GeneratedCO2Tables::CO2Tables>; @@ -302,7 +269,7 @@ diff -ruN exercises/exercise-biomineralization/properties.hh exercises/solution/ public: using type = FluidSystems::BioMin<Scalar, CO2Impl, H2OType>; diff -ruN exercises/exercise-biomineralization/README.md exercises/solution/exercise-biomineralization/README.md ---- exercises/exercise-biomineralization/README.md 2025-03-04 10:55:49.676212309 +0100 +--- exercises/exercise-biomineralization/README.md 2025-03-07 10:34:20.578090053 +0100 +++ exercises/solution/exercise-biomineralization/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,257 +0,0 @@ -# Exercise Biomineralization (DuMuX Course) @@ -563,8 +530,8 @@ diff -ruN exercises/exercise-biomineralization/README.md exercises/solution/exer -output.CellData.append((S_gas_0-S_gas_1),'diffS_gas'); -``` diff -ruN exercises/exercise-biomineralization/solidsystems/biominsolidphase.hh exercises/solution/exercise-biomineralization/solidsystems/biominsolidphase.hh ---- exercises/exercise-biomineralization/solidsystems/biominsolidphase.hh 2025-02-26 11:38:46.803818101 +0100 -+++ exercises/solution/exercise-biomineralization/solidsystems/biominsolidphase.hh 2025-02-26 11:38:46.842816315 +0100 +--- exercises/exercise-biomineralization/solidsystems/biominsolidphase.hh 2025-03-07 10:42:02.609882998 +0100 ++++ exercises/solution/exercise-biomineralization/solidsystems/biominsolidphase.hh 2025-03-07 10:42:02.618882942 +0100 @@ -15,12 +15,12 @@ #include <string> #include <dune/common/exceptions.hh> 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 c62102c7..3bb7e017 100644 --- a/.patches/exercise-coupling-ff-pm/exercise-coupling-ff-pm.patch +++ b/.patches/exercise-coupling-ff-pm/exercise-coupling-ff-pm.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/CMakeLists.txt exercises/solution/exercise-coupling-ff-pm/interface/CMakeLists.txt ---- exercises/exercise-coupling-ff-pm/interface/CMakeLists.txt 2025-02-26 11:38:46.803818101 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/CMakeLists.txt 2025-02-26 11:38:46.842816315 +0100 +--- exercises/exercise-coupling-ff-pm/interface/CMakeLists.txt 2025-03-07 10:42:02.609882998 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/CMakeLists.txt 2025-03-07 10:42:02.618882942 +0100 @@ -1,10 +1,30 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -36,13 +36,13 @@ 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 2025-02-28 14:04:01.038375893 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2025-02-26 11:38:46.842816315 +0100 +--- exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2025-03-07 11:30:34.872192048 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh 2025-03-07 10:42:02.618882942 +0100 @@ -71,8 +71,7 @@ const auto& globalPos = scvf.dofPosition(); -- // TODO: dumux-course-task 1.A +- // TODO: dumux-course-task 1.A: - // Change the boundary conditions here as described in the exercise +#if EXNUMBER == 0 // flow from top to bottom if(onUpperBoundary_(globalPos)) @@ -73,13 +73,13 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh exer // coupling interface if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf)) { -- // TODO: dumux-course-task 1.C +- // TODO: dumux-course-task 1.C: - // set the Beaver-Joseph-Saffman slip condition for the tangential momentum balance equation, - // consider orientation of face automatically values.setCouplingNeumann(Indices::conti0EqIdx); +#if EXNUMBER < 3 values.setCouplingNeumann(Indices::momentumYBalanceIdx); -- // TODO: dumux-course-task 1.B +- // TODO: dumux-course-task 1.B: - // Replace Dirichlet BC with Beavers-Joseph-Saffman slip condition for the tangential momentum balance - values.setDirichlet(Indices::velocityXIdx); // assume no slip on interface +#else @@ -104,11 +104,11 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/freeflowsubproblem.hh exer PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const { PrimaryVariables values(0.0); -- // TODO: dumux-course-task 1.A +- // TODO: dumux-course-task 1.A: - // set a no-slip, no-flow condition at the top +#if EXNUMBER == 0 values[Indices::velocityYIdx] = -1e-6 * globalPos[0] * (this->gridGeometry().bBoxMax()[0] - globalPos[0]); -- // TODO: dumux-course-task 1.A +- // TODO: dumux-course-task 1.A: +#elif EXNUMBER == 4 + values[Indices::velocityXIdx] = 1e-6 * (globalPos[1] - this->gridGeometry().bBoxMin()[1]) + * (this->gridGeometry().bBoxMax()[1] - globalPos[1]); @@ -138,13 +138,13 @@ 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 2025-02-26 11:38:46.803818101 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/main.cc 2025-02-26 11:38:46.842816315 +0100 +--- exercises/exercise-coupling-ff-pm/interface/main.cc 2025-03-07 11:30:34.872192048 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/main.cc 2025-03-07 10:42:02.618882942 +0100 @@ -52,9 +52,7 @@ using FreeflowTypeTag = Properties::TTag::FreeflowOneP; using PorousMediumTypeTag = Properties::TTag::PorousMediumFlowOneP; -- //TODO: dumux-course-task 1.C +- //TODO: dumux-course-task 1.C: - // ******************** comment-out this section for the last exercise **************** // - +#if EXNUMBER < 3 @@ -256,7 +256,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/main.cc exercises/solution StaggeredVtkOutputModule<FreeflowGridVariables, decltype(freeflowSol)> freeflowVtkWriter(*freeflowGridVariables, freeflowSol, freeflowName); GetPropType<FreeflowTypeTag, Properties::IOFields>::initOutputModule(freeflowVtkWriter); -- //TODO: dumux-course-task 1.B +- //TODO: dumux-course-task 1.B: - //****** uncomment the add analytical solution of v_x *****// - // freeflowVtkWriter.addField(freeflowProblem->getAnalyticalVelocityX(), "analyticalV_x"); +#if EXNUMBER >= 2 @@ -266,11 +266,11 @@ 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/params.input exercises/solution/exercise-coupling-ff-pm/interface/params.input ---- exercises/exercise-coupling-ff-pm/interface/params.input 2025-02-28 13:50:32.335817360 +0100 +--- exercises/exercise-coupling-ff-pm/interface/params.input 2025-03-07 11:30:34.872192048 +0100 +++ exercises/solution/exercise-coupling-ff-pm/interface/params.input 2025-02-26 11:38:46.842816315 +0100 @@ -1,17 +1,14 @@ --# # TODO: dumux-course-task 1.C: uncomment the following group [Grid] --# # for dune-subgrid +-# TODO: dumux-course-task 1.C: uncomment the following group [Grid] + # for dune-subgrid -#[Grid] -#Positions0 = 0 1 -#Positions1 = 0 0.2 0.3 0.65 @@ -280,7 +280,6 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/params.input exercises/sol -#Amplitude = 0.04 # [m] -#Offset = 0.5 # [m] -#Scaling = 0.2 #[m] -+# for dune-subgrid +[Grid] +Positions0 = 0 1 +Positions1 = 0 0.2 0.3 0.65 @@ -306,13 +305,13 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/params.input exercises/sol Verbosity = true Positions0 = 0.0 1.0 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 2025-02-28 12:14:15.560013094 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2025-02-26 11:38:46.842816315 +0100 +--- exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2025-03-07 11:30:34.873192042 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh 2025-03-07 10:42:02.618882942 +0100 @@ -65,14 +65,13 @@ { BoundaryTypes values; -- // TODO: dumux-course-task 1.A +- // TODO: dumux-course-task 1.A: - // Set for all boundaries Neumann no-flow and keep the coupling conditions // set Neumann BCs to all boundaries first values.setAllNeumann(); @@ -326,13 +325,13 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/porousmediumsubproblem.hh // set the coupling boundary condition at the interface if (couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf)) 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 2025-02-26 11:38:46.804818055 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/interface/properties.hh 2025-02-26 11:38:46.842816315 +0100 +--- exercises/exercise-coupling-ff-pm/interface/properties.hh 2025-03-07 11:30:34.873192042 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/interface/properties.hh 2025-03-07 10:42:02.618882942 +0100 @@ -16,9 +16,9 @@ #include <dumux/multidomain/staggeredtraits.hh> #include <dumux/multidomain/boundary/stokesdarcy/couplingmanager.hh> --// TODO: dumux-course-task 1.C +-// TODO: dumux-course-task 1.C: -//****** uncomment for the last exercise *****// -// #include <dumux/io/grid/gridmanager_sub.hh> +#if EXNUMBER >= 3 @@ -345,7 +344,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/properties.hh exercises/so using Scalar = GetPropType<TypeTag, Properties::Scalar>; using TensorGrid = Dune::YaspGrid<2, Dune::TensorProductCoordinates<Scalar, dim> >; --// TODO: dumux-course-task 1.C +-// TODO: dumux-course-task 1.C: -//****** comment out for the last exercise *****// - // use "normal" grid +#if EXNUMBER < 3 // use "normal" grid @@ -366,7 +365,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/properties.hh exercises/so using Scalar = GetPropType<TypeTag, Properties::Scalar>; using TensorGrid = Dune::YaspGrid<2, Dune::TensorProductCoordinates<Scalar, dim> >; --// TODO: dumux-course-task 1.C +-// TODO: dumux-course-task 1.C: -//****** comment out for the last exercise *****// - // use "normal" grid +#if EXNUMBER < 3 // use "normal" grid @@ -384,7 +383,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 2025-03-04 10:55:49.676212309 +0100 +--- exercises/exercise-coupling-ff-pm/interface/README.md 2025-03-07 10:34:20.581090010 +0100 +++ exercises/solution/exercise-coupling-ff-pm/interface/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,175 +0,0 @@ -## 1. Changing the interface @@ -563,8 +562,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/interface/README.md exercises/soluti -What changes to the left boundary conditions in the free-flow domain would you make to introduce this? What conditions can be enforced on the right boundary? -Hint: A relation between velocity and position is used for the vertical velocity component in the original form of the `dirichletAtPos` method. 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 2025-02-26 11:38:46.804818055 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/CMakeLists.txt 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-coupling-ff-pm/models/CMakeLists.txt 2025-03-07 10:42:02.610882992 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/CMakeLists.txt 2025-03-07 10:42:02.618882942 +0100 @@ -1,9 +1,32 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -603,8 +602,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/CMakeLists.txt exercises/solu + +dune_symlink_to_source_files(FILES "params_orig_a.input" "params_b_c.input" plotFluxes.py) diff -ruN exercises/exercise-coupling-ff-pm/models/main.cc exercises/solution/exercise-coupling-ff-pm/models/main.cc ---- exercises/exercise-coupling-ff-pm/models/main.cc 2025-02-26 11:38:46.804818055 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/main.cc 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-coupling-ff-pm/models/main.cc 2025-03-07 10:42:02.610882992 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/main.cc 2025-03-07 10:42:02.618882942 +0100 @@ -127,9 +127,15 @@ auto porousMediumGridVariables = std::make_shared<PorousMediumGridVariables>(porousMediumProblem, porousMediumFvGridGeometry); porousMediumGridVariables->init(sol[porousMediumIdx]); @@ -686,7 +685,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 2025-02-28 14:41:58.699499416 +0100 +--- exercises/exercise-coupling-ff-pm/models/params.input 2025-03-07 10:42:02.671882610 +0100 +++ exercises/solution/exercise-coupling-ff-pm/models/params.input 1970-01-01 01:00:00.000000000 +0100 @@ -1,60 +0,0 @@ -[TimeLoop] @@ -810,8 +809,8 @@ 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 2025-02-26 11:38:46.804818055 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh 2025-03-07 11:30:34.873192042 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh 2025-03-07 10:42:02.619882935 +0100 @@ -52,10 +52,15 @@ // primary variable indices static constexpr int conti0EqIdx = Indices::conti0EqIdx; @@ -903,9 +902,9 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh exe PrimaryVariables values(0.0); values[pressureIdx] = freeflowPressure; -- // TODO: dumux-course-task 2.A +- // TODO: dumux-course-task 2.A: - // Declare here which phases are present. -- // TODO: dumux-course-task 2.C +- // TODO: dumux-course-task 2.C: - // Change initial condition to 2p system with liquid saturation of 0.1 +#if EXNUMBER >= 3 + values.setState(3/*bothPhases*/); @@ -933,20 +932,20 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/porousmediumsubproblem.hh exe std::shared_ptr<CouplingManager> couplingManager_; diff -ruN exercises/exercise-coupling-ff-pm/models/properties.hh exercises/solution/exercise-coupling-ff-pm/models/properties.hh ---- exercises/exercise-coupling-ff-pm/models/properties.hh 2025-02-26 11:38:46.804818055 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/models/properties.hh 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-coupling-ff-pm/models/properties.hh 2025-03-07 11:30:34.873192042 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/models/properties.hh 2025-03-07 10:42:02.619882935 +0100 @@ -25,12 +25,14 @@ #include <dumux/discretization/cctpfa.hh> #include <dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh> --// TODO: dumux-course-task 2.A +-// TODO: dumux-course-task 2.A: -// Include 2pnc model here +#if EXNUMBER >= 1 +#include <dumux/porousmediumflow/2pnc/model.hh> +#include "../2pspatialparams.hh" +#else #include <dumux/porousmediumflow/1pnc/model.hh> --// TODO: dumux-course-task 2.A +-// TODO: dumux-course-task 2.A: -// Include spatial params for a 2-phase system #include "../1pspatialparams.hh" +#endif @@ -958,7 +957,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/properties.hh exercises/solut // Create new type tags namespace TTag { struct FreeflowNC { using InheritsFrom = std::tuple<NavierStokesNC, StaggeredFreeFlowModel>; }; --// TODO: dumux-course-task 2.A +-// TODO: dumux-course-task 2.A: -// Change the inheritance such that the correct model is used. +#if EXNUMBER >= 1 +struct PorousMediumOnePNC { using InheritsFrom = std::tuple<TwoPNC, CCTpfaModel>; }; @@ -972,7 +971,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/properties.hh exercises/solut struct Problem<TypeTag, TTag::FreeflowNC> { using type = Dumux::FreeFlowSubProblem<TypeTag> ; }; // The fluid system --// TODO: dumux-course-task 2.A +-// TODO: dumux-course-task 2.A: -// Change to property of the `FluidSystem` such that `H2OAir` is used directly. template<class TypeTag> struct FluidSystem<TypeTag, TTag::PorousMediumOnePNC> @@ -990,7 +989,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/properties.hh exercises/solut struct EffectiveDiffusivityModel<TypeTag, TTag::PorousMediumOnePNC> { using type = DiffusivityConstantTortuosity<GetPropType<TypeTag, Properties::Scalar>>; }; --// TODO: dumux-course-task 2.A +-// TODO: dumux-course-task 2.A: -// Define new formulation for primary variables here. +#if EXNUMBER >= 1 +//! Set the default formulation to pw-Sn: This can be over written in the problem. @@ -1000,7 +999,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/models/properties.hh exercises/solut +#endif // Set the spatial parameters type --// TODO: dumux-course-task 2.A +-// TODO: dumux-course-task 2.A: -// Adapt the spatial params here. +#if EXNUMBER >= 1 +template<class TypeTag> @@ -1268,8 +1267,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/README.md exercises/solution/exercis -* [**Exercise 2:** Changing the porous medium model](./models/README.md) -* [**Exercise 3:** Introducing a turbulence model in the free flow domain](./turbulence/README.md) 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 2025-02-26 11:38:46.804818055 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/CMakeLists.txt 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/CMakeLists.txt 2025-03-07 10:42:02.611882986 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/CMakeLists.txt 2025-03-07 10:42:02.619882935 +0100 @@ -1,10 +1,33 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -1308,8 +1307,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/CMakeLists.txt exercises/ # add a symlink for each input file add_input_file_links() diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exercises/solution/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh ---- exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh 2025-02-26 11:38:46.805818009 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh 2025-03-07 11:30:34.873192042 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh 2025-03-07 10:42:02.619882935 +0100 @@ -8,8 +8,8 @@ * \file * \brief The free-flow sub problem @@ -1325,7 +1324,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe #include <dumux/multidomain/boundary/stokesdarcy/couplingdata.hh> #include <dumux/freeflow/turbulencemodel.hh> --// TODO: dumux-course-task 3.A +-// TODO: dumux-course-task 3.A: -// Include headers for turbulence problem (rans) here. +#if EXNUMBER >= 1 +#include <dumux/freeflow/turbulenceproperties.hh> @@ -1341,7 +1340,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe * \brief The free-flow sub problem */ template <class TypeTag> --// TODO: dumux-course-task 3.A +-// TODO: dumux-course-task 3.A: -// Adapt the inheritance of the problem class. +#if EXNUMBER >= 1 +class FreeFlowSubProblem : public RANSProblem<TypeTag> @@ -1359,7 +1358,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>; -- // TODO: dumux-course-task 3.A +- // TODO: dumux-course-task 3.A: - // Change the boundary types to Dumux::RANSBoundaryTypes<ModelTraits, ModelTraits::numEq()> +#if EXNUMBER >= 1 + using BoundaryTypes = Dumux::RANSBoundaryTypes<ModelTraits, ModelTraits::numEq()>; @@ -1409,7 +1408,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe BoundaryTypes values; const auto& globalPos = scvf.center(); -- // TODO: dumux-course-task 3.A +- // TODO: dumux-course-task 3.A: - // set boundary conditions for the turbulence model primary variables k and \omega everywhere (outflow on right boundary, otherwise dirichlet) + +#if EXNUMBER >=1 @@ -1432,7 +1431,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe values.setDirichlet(Indices::energyEqIdx); } -- // TODO: dumux-course-task 3.A +- // TODO: dumux-course-task 3.A: - // set wall conditions for the turbulence model at the walls (values.setWall()) corresponding to the upper and lower boundary if (onLowerBoundary_(globalPos)) { @@ -1448,7 +1447,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe if (onUpperBoundary_(globalPos)) { -- // TODO: dumux-course-task 3.B +- // TODO: dumux-course-task 3.B: - // Replace all conditions here with symmetric BCs. +#if EXNUMBER >=2 + values.setAllSymmetry(); @@ -1473,9 +1472,9 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe const auto globalPos = scvf.ipGlobal(); PrimaryVariables values(initialAtPos(globalPos)); -- // TODO: dumux-course-task 3.A +- // TODO: dumux-course-task 3.A: - // Add dirichlet conditions setting TKE and Dissipation to zero on the upper and lower walls. -- // TODO: dumux-course-task 3.B +- // TODO: dumux-course-task 3.B: - // Remove the condition `onUpperBoundary_(globalPos)` here. - // if (onUpperBoundary_(globalPos) || onLowerBoundary_(globalPos)) - // { @@ -1503,7 +1502,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe values[Indices::velocityXIdx] = refVelocity(); values[Indices::temperatureIdx] = refTemperature(); -- // TODO: dumux-course-task 3.A +- // TODO: dumux-course-task 3.A: - // Set initial conditions for the TKE and the Dissipation. Values calculated in the constructor - // values[Indices::turbulentKineticEnergyIdx] = TODO??; - // values[Indices::dissipationIdx] = TODO??; @@ -1512,7 +1511,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe + values[Indices::dissipationIdx] = dissipation_; +#endif -- // TODO: dumux-course-task 3.B +- // TODO: dumux-course-task 3.B: - // Remove the condition `onUpperBoundary_(globalPos)` here. +#if EXNUMBER >= 2 + if(onLowerBoundary_(globalPos)) @@ -1525,17 +1524,17 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/freeflowsubproblem.hh exe return values; } diff -ruN exercises/exercise-coupling-ff-pm/turbulence/main.cc exercises/solution/exercise-coupling-ff-pm/turbulence/main.cc ---- exercises/exercise-coupling-ff-pm/turbulence/main.cc 2025-02-26 11:38:46.805818009 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/main.cc 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/main.cc 2025-03-07 11:30:34.873192042 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/main.cc 2025-03-07 10:42:02.619882935 +0100 @@ -122,11 +122,12 @@ couplingManager->init(freeflowProblem, porousMediumProblem, sol); -- // TODO: dumux-course-task 3.A +- // TODO: dumux-course-task 3.A: +#if EXNUMBER >= 1 // Update static wall properties - -- // TODO: dumux-course-task 3.A +- // TODO: dumux-course-task 3.A: + freeflowProblem->updateStaticWallProperties(); // Update dynamic wall properties + freeflowProblem->updateDynamicWallProperties(freeflowSol); @@ -1547,7 +1546,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/main.cc exercises/solutio // make the new solution the old solution solOld = sol; -- // TODO: dumux-course-task 3.A +- // TODO: dumux-course-task 3.A: +#if EXNUMBER >= 1 // Update dynamic wall properties + freeflowProblem->updateDynamicWallProperties(freeflowSol); @@ -1708,7 +1707,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 2025-02-26 11:38:46.805818009 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/params.input 2025-03-07 11:30:34.874192035 +0100 +++ exercises/solution/exercise-coupling-ff-pm/turbulence/params.input 1970-01-01 01:00:00.000000000 +0100 @@ -1,73 +0,0 @@ -[TimeLoop] @@ -1718,13 +1717,13 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params.input exercises/so - -[Freeflow.Grid] -Positions0 = 0.0 0.25 --# TODO: dumux-course-task 3.B - use only half of FF domain height +-# TODO: dumux-course-task 3.B: use only half of FF domain height -Positions1 = 0.25 0.5 --# TODO: dumux-course-task 3.C - refine towards interface +-# TODO: dumux-course-task 3.C: refine towards interface -Grading0 = 1.0 -Grading1 = 1.0 -Cells0 = 15 --# TODO: dumux-course-task 3.B - use only half of FF domain height and adapt cell number +-# TODO: dumux-course-task 3.B: use only half of FF domain height and adapt cell number -Cells1 = 20 -Verbosity = true - @@ -1733,7 +1732,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params.input exercises/so -Positions1 = 0.0 0.25 -Cells0 = 15 -Cells1 = 10 --# TODO: dumux-course-task 3.C - refine towards interface +-# TODO: dumux-course-task 3.C: refine towards interface -Grading0 = 1.0 -Grading1 = 1.0 -Verbosity = true @@ -1861,8 +1860,8 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/params_orig_a.input exerc +[RANS] +IsFlatWallBounded = True diff -ruN exercises/exercise-coupling-ff-pm/turbulence/properties.hh exercises/solution/exercise-coupling-ff-pm/turbulence/properties.hh ---- exercises/exercise-coupling-ff-pm/turbulence/properties.hh 2025-02-26 11:38:46.805818009 +0100 -+++ exercises/solution/exercise-coupling-ff-pm/turbulence/properties.hh 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/properties.hh 2025-03-07 11:30:34.874192035 +0100 ++++ exercises/solution/exercise-coupling-ff-pm/turbulence/properties.hh 2025-03-07 10:42:02.619882935 +0100 @@ -8,8 +8,8 @@ * \file * \brief The coupled exercise properties file or the turbulent case. @@ -1878,7 +1877,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/properties.hh exercises/s // Free-flow domain #include <dumux/discretization/staggered/freeflow/properties.hh> --// TODO: dumux-course-task 3.A +-// TODO: dumux-course-task 3.A: -// Include headers for compositional k-\omega SST turbulence model here. + +#if EXNUMBER >= 1 @@ -1893,7 +1892,7 @@ diff -ruN exercises/exercise-coupling-ff-pm/turbulence/properties.hh exercises/s // Create new type tags namespace TTag { struct PorousMediumFlowModel { using InheritsFrom = std::tuple<TwoPTwoCNI, CCTpfaModel>; }; --// TODO: dumux-course-task 3.A +-// TODO: dumux-course-task 3.A: -// Change the entry in the `FreeflowModel` definition accordingly. +#if EXNUMBER >= 1 +struct FreeflowModel { using InheritsFrom = std::tuple<SSTNCNI, StaggeredFreeFlowModel>; }; @@ -1904,7 +1903,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 2025-03-04 10:55:49.677212273 +0100 +--- exercises/exercise-coupling-ff-pm/turbulence/README.md 2025-03-07 10:34:20.583089982 +0100 +++ 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/.patches/exercise-fluidsystem/exercise-fluidsystem.patch b/.patches/exercise-fluidsystem/exercise-fluidsystem.patch index a71e36d2..3fa03cc5 100644 --- a/.patches/exercise-fluidsystem/exercise-fluidsystem.patch +++ b/.patches/exercise-fluidsystem/exercise-fluidsystem.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-fluidsystem/2p2cproblem.hh exercises/solution/exercise-fluidsystem/2p2cproblem.hh ---- exercises/exercise-fluidsystem/2p2cproblem.hh 2025-02-26 11:38:46.805818009 +0100 -+++ exercises/solution/exercise-fluidsystem/2p2cproblem.hh 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-fluidsystem/2p2cproblem.hh 2025-03-07 10:42:02.611882986 +0100 ++++ exercises/solution/exercise-fluidsystem/2p2cproblem.hh 2025-03-07 10:42:02.619882935 +0100 @@ -12,7 +12,7 @@ #ifndef DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH #define DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH @@ -11,8 +11,8 @@ diff -ruN exercises/exercise-fluidsystem/2p2cproblem.hh exercises/solution/exerc #include <dumux/common/boundarytypes.hh> #include <dumux/common/properties.hh> diff -ruN exercises/exercise-fluidsystem/2pproperties.hh exercises/solution/exercise-fluidsystem/2pproperties.hh ---- exercises/exercise-fluidsystem/2pproperties.hh 2025-02-26 11:38:46.805818009 +0100 -+++ exercises/solution/exercise-fluidsystem/2pproperties.hh 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-fluidsystem/2pproperties.hh 2025-03-07 10:42:02.612882979 +0100 ++++ exercises/solution/exercise-fluidsystem/2pproperties.hh 2025-03-07 10:42:02.619882935 +0100 @@ -25,15 +25,13 @@ #include "spatialparams.hh" @@ -52,7 +52,7 @@ diff -ruN exercises/exercise-fluidsystem/2pproperties.hh exercises/solution/exer public: using type = typename FluidSystems::TwoPImmiscible<Scalar, LiquidWaterPhase, LiquidMyComponentPhase>; diff -ruN exercises/exercise-fluidsystem/aparams.input exercises/solution/exercise-fluidsystem/aparams.input ---- exercises/exercise-fluidsystem/aparams.input 2025-02-27 11:12:28.808186516 +0100 +--- exercises/exercise-fluidsystem/aparams.input 2025-03-07 11:30:34.874192035 +0100 +++ exercises/solution/exercise-fluidsystem/aparams.input 2025-02-26 11:38:46.843816269 +0100 @@ -3,7 +3,7 @@ DtInitial = 10 # initial time step size [s] @@ -67,7 +67,7 @@ diff -ruN exercises/exercise-fluidsystem/aparams.input exercises/solution/exerci Cells = 60 60 # x-/y-resolution of the grid [Output] --# TODO Task 2.2: Set the plot density to true +-# TODO: dumux-course-task 2.2: set the plot density to true -PlotDensity = false # plot density over pressure for your component +PlotDensity = true # plot density over pressure for your component diff -ruN exercises/exercise-fluidsystem/bparams.input exercises/solution/exercise-fluidsystem/bparams.input @@ -83,8 +83,8 @@ diff -ruN exercises/exercise-fluidsystem/bparams.input exercises/solution/exerci [SpatialParams] BrooksCoreyPcEntry = 5.0e2 # [Pa] diff -ruN exercises/exercise-fluidsystem/CMakeLists.txt exercises/solution/exercise-fluidsystem/CMakeLists.txt ---- exercises/exercise-fluidsystem/CMakeLists.txt 2025-02-26 11:38:46.805818009 +0100 -+++ exercises/solution/exercise-fluidsystem/CMakeLists.txt 2025-02-26 11:38:46.843816269 +0100 +--- exercises/exercise-fluidsystem/CMakeLists.txt 2025-03-07 10:42:02.612882979 +0100 ++++ exercises/solution/exercise-fluidsystem/CMakeLists.txt 2025-03-07 10:42:02.619882935 +0100 @@ -3,18 +3,16 @@ # executables for exercise part a & b @@ -111,8 +111,8 @@ diff -ruN exercises/exercise-fluidsystem/CMakeLists.txt exercises/solution/exerc -# add a symlink for the grids folder -dune_symlink_to_source_files(FILES grids) diff -ruN exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh exercises/solution/exercise-fluidsystem/components/mycompressiblecomponent.hh ---- exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh 2025-02-26 11:38:46.806817963 +0100 -+++ exercises/solution/exercise-fluidsystem/components/mycompressiblecomponent.hh 2025-02-26 11:38:46.844816223 +0100 +--- exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh 2025-03-07 10:42:02.612882979 +0100 ++++ exercises/solution/exercise-fluidsystem/components/mycompressiblecomponent.hh 2025-03-07 10:42:02.620882929 +0100 @@ -38,7 +38,7 @@ static std::string name() { return "MyCompressibleComponent"; } @@ -174,8 +174,8 @@ diff -ruN exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh e }; diff -ruN exercises/exercise-fluidsystem/components/myincompressiblecomponent.hh exercises/solution/exercise-fluidsystem/components/myincompressiblecomponent.hh ---- exercises/exercise-fluidsystem/components/myincompressiblecomponent.hh 2025-02-26 11:38:46.806817963 +0100 -+++ exercises/solution/exercise-fluidsystem/components/myincompressiblecomponent.hh 2025-02-26 11:38:46.844816223 +0100 +--- exercises/exercise-fluidsystem/components/myincompressiblecomponent.hh 2025-03-07 10:42:02.612882979 +0100 ++++ exercises/solution/exercise-fluidsystem/components/myincompressiblecomponent.hh 2025-03-07 10:42:02.620882929 +0100 @@ -48,10 +48,7 @@ */ static Scalar molarMass() @@ -214,7 +214,7 @@ diff -ruN exercises/exercise-fluidsystem/components/myincompressiblecomponent.hh diff -ruN exercises/exercise-fluidsystem/components/plotdensityfunction.py exercises/solution/exercise-fluidsystem/components/plotdensityfunction.py --- exercises/exercise-fluidsystem/components/plotdensityfunction.py 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-fluidsystem/components/plotdensityfunction.py 2025-02-26 11:38:46.844816223 +0100 ++++ exercises/solution/exercise-fluidsystem/components/plotdensityfunction.py 2025-03-07 10:42:02.620882929 +0100 @@ -0,0 +1,22 @@ +#!usr/bin/env python +# SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder @@ -239,8 +239,8 @@ diff -ruN exercises/exercise-fluidsystem/components/plotdensityfunction.py exerc +plt.semilogx(p, r) +plt.show() diff -ruN exercises/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh exercises/solution/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh ---- exercises/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh 2025-02-26 11:38:46.806817963 +0100 -+++ exercises/solution/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh 2025-02-26 11:38:46.844816223 +0100 +--- exercises/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh 2025-03-07 10:42:02.612882979 +0100 ++++ exercises/solution/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent.hh 2025-03-07 10:42:02.620882929 +0100 @@ -20,10 +20,10 @@ #include <dumux/material/fluidsystems/base.hh> @@ -277,8 +277,8 @@ diff -ruN exercises/exercise-fluidsystem/fluidsystems/h2omycompressiblecomponent else { diff -ruN exercises/exercise-fluidsystem/main.cc exercises/solution/exercise-fluidsystem/main.cc ---- exercises/exercise-fluidsystem/main.cc 2025-02-26 11:38:46.806817963 +0100 -+++ exercises/solution/exercise-fluidsystem/main.cc 2025-02-26 11:38:46.844816223 +0100 +--- exercises/exercise-fluidsystem/main.cc 2025-03-07 10:42:02.612882979 +0100 ++++ exercises/solution/exercise-fluidsystem/main.cc 2025-03-07 10:42:02.620882929 +0100 @@ -36,7 +36,7 @@ int main(int argc, char** argv) { @@ -304,7 +304,7 @@ diff -ruN exercises/exercise-fluidsystem/main.cc exercises/solution/exercise-flu using IOFields = GetPropType<TypeTag, Properties::IOFields>; VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name()); diff -ruN exercises/exercise-fluidsystem/README.md exercises/solution/exercise-fluidsystem/README.md ---- exercises/exercise-fluidsystem/README.md 2025-03-04 10:55:49.677212273 +0100 +--- exercises/exercise-fluidsystem/README.md 2025-03-07 10:34:20.584089967 +0100 +++ exercises/solution/exercise-fluidsystem/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,265 +0,0 @@ -# Exercise Fluidsystem (DuMuX Course) @@ -573,8 +573,8 @@ diff -ruN exercises/exercise-fluidsystem/README.md exercises/solution/exercise-f -./exercise_fluidsystem_b bparams.input -``` diff -ruN exercises/exercise-fluidsystem/spatialparams.hh exercises/solution/exercise-fluidsystem/spatialparams.hh ---- exercises/exercise-fluidsystem/spatialparams.hh 2025-02-26 11:38:46.806817963 +0100 -+++ exercises/solution/exercise-fluidsystem/spatialparams.hh 2025-02-26 11:38:46.844816223 +0100 +--- exercises/exercise-fluidsystem/spatialparams.hh 2025-03-07 10:42:02.612882979 +0100 ++++ exercises/solution/exercise-fluidsystem/spatialparams.hh 2025-03-07 10:42:02.620882929 +0100 @@ -113,13 +113,17 @@ template<class FluidSystem> int wettingPhaseAtPos(const GlobalPosition& globalPos) const diff --git a/.patches/exercise-fractures/exercise-fractures.patch b/.patches/exercise-fractures/exercise-fractures.patch index a786a05b..e8f59ff4 100644 --- a/.patches/exercise-fractures/exercise-fractures.patch +++ b/.patches/exercise-fractures/exercise-fractures.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-fractures/CMakeLists.txt exercises/solution/exercise-fractures/CMakeLists.txt ---- exercises/exercise-fractures/CMakeLists.txt 2025-02-26 11:38:46.806817963 +0100 -+++ exercises/solution/exercise-fractures/CMakeLists.txt 2025-02-26 11:38:46.844816223 +0100 +--- exercises/exercise-fractures/CMakeLists.txt 2025-03-07 10:42:02.612882979 +0100 ++++ exercises/solution/exercise-fractures/CMakeLists.txt 2025-03-07 10:42:02.620882929 +0100 @@ -1,9 +1,26 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -166,8 +166,8 @@ diff -ruN exercises/exercise-fractures/exercise_fractures_solution_c.input exerc +SpatialParams.Barrier.Snr = 0.0 +SpatialParams.Barrier.Swr = 0.0 diff -ruN exercises/exercise-fractures/fractureproblem.hh exercises/solution/exercise-fractures/fractureproblem.hh ---- exercises/exercise-fractures/fractureproblem.hh 2025-02-26 11:38:46.806817963 +0100 -+++ exercises/solution/exercise-fractures/fractureproblem.hh 2025-02-26 11:38:46.844816223 +0100 +--- exercises/exercise-fractures/fractureproblem.hh 2025-03-07 11:30:34.874192035 +0100 ++++ exercises/solution/exercise-fractures/fractureproblem.hh 2025-03-07 10:42:02.620882929 +0100 @@ -59,6 +59,10 @@ std::shared_ptr<typename ParentType::SpatialParams> spatialParams, const std::string& paramGroup) @@ -185,7 +185,7 @@ diff -ruN exercises/exercise-fractures/fractureproblem.hh exercises/solution/exe - // However, there is one fracture reaching the top boundary. For this - // fracture tip we set Dirichlet Bcs as in the matrix domain -- // TODO dumux-course-task A +- // TODO: dumux-course-task A: - // Change boundary conditions - if (globalPos[1] > this->gridGeometry().bBoxMax()[1] - 1e-6) - values.setAllDirichlet(); @@ -199,8 +199,8 @@ diff -ruN exercises/exercise-fractures/fractureproblem.hh exercises/solution/exe return values; } diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/solution/exercise-fractures/fracturespatialparams.hh ---- exercises/exercise-fractures/fracturespatialparams.hh 2025-03-03 10:33:05.767624826 +0100 -+++ exercises/solution/exercise-fractures/fracturespatialparams.hh 2025-02-26 11:38:46.844816223 +0100 +--- exercises/exercise-fractures/fracturespatialparams.hh 2025-03-07 11:30:34.874192035 +0100 ++++ exercises/solution/exercise-fractures/fracturespatialparams.hh 2025-03-07 10:42:02.620882929 +0100 @@ -41,6 +41,7 @@ using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -226,7 +226,7 @@ diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/soluti const SubControlVolume& scv, const ElementSolution& elemSol) const { -- // TODO dumux-course-task B/C +- // TODO: dumux-course-task B/C: - // Change fracture properties - return permeability_; + // in the unmodified state and exercise part a return the non-barrier parameters @@ -252,7 +252,7 @@ diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/soluti const SubControlVolume& scv, const ElementSolution& elemSol) const { -- // TODO dumux-course-task B/C +- // TODO: dumux-course-task B/C: - // Change fracture properties - return porosity_; + // in the unmodified state and exercise part a return the non-barrier parameters @@ -278,7 +278,7 @@ diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/soluti const SubControlVolume& scv, const ElementSolution& elemSol) const { -- // TODO dumux-course-task B/C +- // TODO: dumux-course-task B/C: - // Change fracture properties - return makeFluidMatrixInteraction(pcKrSwCurve_); + // in the unmodified state and exercise part a return the non-barrier parameters @@ -322,8 +322,8 @@ diff -ruN exercises/exercise-fractures/fracturespatialparams.hh exercises/soluti } // end namespace Dumux diff -ruN exercises/exercise-fractures/main.cc exercises/solution/exercise-fractures/main.cc ---- exercises/exercise-fractures/main.cc 2025-02-26 11:38:46.808817872 +0100 -+++ exercises/solution/exercise-fractures/main.cc 2025-02-26 11:38:46.845816177 +0100 +--- exercises/exercise-fractures/main.cc 2025-03-07 10:42:02.613882973 +0100 ++++ exercises/solution/exercise-fractures/main.cc 2025-03-07 10:42:02.620882929 +0100 @@ -245,4 +245,5 @@ Parameters::print(); @@ -331,8 +331,8 @@ diff -ruN exercises/exercise-fractures/main.cc exercises/solution/exercise-fract + }// end main diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exercise-fractures/matrixproblem.hh ---- exercises/exercise-fractures/matrixproblem.hh 2025-03-03 10:40:58.942820843 +0100 -+++ exercises/solution/exercise-fractures/matrixproblem.hh 2025-02-26 11:38:46.845816177 +0100 +--- exercises/exercise-fractures/matrixproblem.hh 2025-03-07 11:30:34.875192028 +0100 ++++ exercises/solution/exercise-fractures/matrixproblem.hh 2025-03-07 10:42:02.621882923 +0100 @@ -65,11 +65,18 @@ : ParentType(gridGeometry, spatialParams, paramGroup) , boundaryOverPressure_(getParamFromGroup<Scalar>(paramGroup, "Problem.BoundaryOverPressure")) @@ -358,7 +358,7 @@ diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exerc - // we consider buoancy-driven upwards migration of nitrogen and set - // Dirichlet BCs on the top and bottom boundary -- // TODO dumux-course-task A +- // TODO: dumux-course-task A: - // Change boundary conditions and Dirichlet values! - values.setAllNeumann(); - if (globalPos[1] < 1e-6 || globalPos[1] > this->gridGeometry().bBoxMax()[1] - 1e-6) @@ -387,11 +387,11 @@ diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exerc // the interior boundary conditions to Dirichlet. // IMPORTANT: Note that you will never be asked to set any values at the interior boundaries! // This simply chooses a different interface condition! -- // TODO dumux-course-task B +- // TODO: dumux-course-task B: - // Change coupling conditions! values.setAllDirichlet(); -- // TODO dumux-course-task additional task +- // TODO: dumux-course-task additional task: - // Set interior boundary condition depending on the domain marker of the fracture domain elements! + if (isExercisePartB_) + values.setAllNeumann(); @@ -422,7 +422,7 @@ diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exerc auto values = initialAtPos(globalPos); - // nitrogen is in contact with the domain on the center half of the lower boundary -- // TODO dumux-course-task A +- // TODO: dumux-course-task A: - // Change boundary conditions and Dirichlet values! - if (globalPos[1] < 1e-6 && globalPos[0] > 25.0 && globalPos[0] < 75.0) - values[saturationIdx] = boundarySaturation_; @@ -457,8 +457,8 @@ diff -ruN exercises/exercise-fractures/matrixproblem.hh exercises/solution/exerc } // end namespace Dumux diff -ruN exercises/exercise-fractures/matrixspatialparams.hh exercises/solution/exercise-fractures/matrixspatialparams.hh ---- exercises/exercise-fractures/matrixspatialparams.hh 2025-02-26 11:38:46.808817872 +0100 -+++ exercises/solution/exercise-fractures/matrixspatialparams.hh 2025-02-26 11:38:46.845816177 +0100 +--- exercises/exercise-fractures/matrixspatialparams.hh 2025-03-07 10:42:02.613882973 +0100 ++++ exercises/solution/exercise-fractures/matrixspatialparams.hh 2025-03-07 10:42:02.621882923 +0100 @@ -40,6 +40,7 @@ using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -468,13 +468,13 @@ diff -ruN exercises/exercise-fractures/matrixspatialparams.hh exercises/solution public: diff -ruN exercises/exercise-fractures/params.input exercises/solution/exercise-fractures/params.input ---- exercises/exercise-fractures/params.input 2025-03-03 10:08:54.361892136 +0100 +--- exercises/exercise-fractures/params.input 2025-03-07 11:30:34.875192028 +0100 +++ exercises/solution/exercise-fractures/params.input 2025-02-26 11:38:46.845816177 +0100 @@ -4,8 +4,10 @@ MaxTimeStepSize = 2500 # [s] [Problem] --# TODO dumux-course-task A: switch off gravity +-# TODO: dumux-course-task A: switch off gravity EnableGravity = true +IsExercisePartA = false +IsExercisePartB = false @@ -497,7 +497,7 @@ diff -ruN exercises/exercise-fractures/params.input exercises/solution/exercise- SpatialParams.PermeabilityBarrier = 1e-16 SpatialParams.Porosity = 0.85 SpatialParams.PorosityBarrier = 0.05 --# TODO: set the VGAlpha parameter e.g. to 1e.5 and examine the nitrogen saturation in the fracture tips (then reset to 1e-1 again) +-# TODO: dumux-course-task: set the VGAlpha parameter e.g. to 1e.5 and examine the nitrogen saturation in the fracture tips (then reset to 1e-1 again) -SpatialParams.VanGenuchtenAlpha = 1e-1 -SpatialParams.VanGenuchtenN = 2 -SpatialParams.Swr = 0.0 @@ -514,8 +514,8 @@ diff -ruN exercises/exercise-fractures/params.input exercises/solution/exercise- +SpatialParams.Swr = 0.0 +SpatialParams.SwrBarrier = 0.0 diff -ruN exercises/exercise-fractures/properties.hh exercises/solution/exercise-fractures/properties.hh ---- exercises/exercise-fractures/properties.hh 2025-02-26 11:38:46.808817872 +0100 -+++ exercises/solution/exercise-fractures/properties.hh 2025-02-26 11:38:46.845816177 +0100 +--- exercises/exercise-fractures/properties.hh 2025-03-07 10:42:02.613882973 +0100 ++++ exercises/solution/exercise-fractures/properties.hh 2025-03-07 10:42:02.621882923 +0100 @@ -45,6 +45,7 @@ // with tpfa. #include <dumux/multidomain/facet/cellcentered/tpfa/properties.hh> @@ -534,7 +534,7 @@ diff -ruN exercises/exercise-fractures/properties.hh exercises/solution/exercise struct Grid<TypeTag, TTag::MatrixProblem> { using type = Dune::ALUGrid<2, 2, Dune::simplex, Dune::conforming>; }; template<class TypeTag> diff -ruN exercises/exercise-fractures/README.md exercises/solution/exercise-fractures/README.md ---- exercises/exercise-fractures/README.md 2025-03-04 10:55:49.677212273 +0100 +--- exercises/exercise-fractures/README.md 2025-03-07 11:30:34.874192035 +0100 +++ exercises/solution/exercise-fractures/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,216 +0,0 @@ -# Exercise Discrete Fractures (DuMuX Course) @@ -696,7 +696,7 @@ diff -ruN exercises/exercise-fractures/README.md exercises/solution/exercise-fra - // the interior boundary conditions to Dirichlet. - // IMPORTANT: Note that you will never be asked to set any values at the interior boundaries! - // This simply chooses a different interface condition! -- // TODO dumux-course-task C +- // TODO: dumux-course-task B: - // Change coupling conditions! - values.setAllDirichlet(); - diff --git a/.patches/exercise-grids/exercise-grids.patch b/.patches/exercise-grids/exercise-grids.patch index 57d8511d..1b666123 100644 --- a/.patches/exercise-grids/exercise-grids.patch +++ b/.patches/exercise-grids/exercise-grids.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-grids/CMakeLists.txt exercises/solution/exercise-grids/CMakeLists.txt ---- exercises/exercise-grids/CMakeLists.txt 2025-02-26 11:38:46.808817872 +0100 -+++ exercises/solution/exercise-grids/CMakeLists.txt 2025-02-26 11:38:46.845816177 +0100 +--- exercises/exercise-grids/CMakeLists.txt 2025-03-07 10:42:02.613882973 +0100 ++++ exercises/solution/exercise-grids/CMakeLists.txt 2025-03-07 10:42:02.621882923 +0100 @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later @@ -55,8 +55,8 @@ diff -ruN exercises/exercise-grids/grids/grid_structured.geo exercises/solution/ -Transfinite Volume "*"; - diff -ruN exercises/exercise-grids/main.cc exercises/solution/exercise-grids/main.cc ---- exercises/exercise-grids/main.cc 2025-02-26 11:38:46.809817826 +0100 -+++ exercises/solution/exercise-grids/main.cc 2025-02-26 11:38:46.846816132 +0100 +--- exercises/exercise-grids/main.cc 2025-03-07 10:42:02.614882967 +0100 ++++ exercises/solution/exercise-grids/main.cc 2025-03-07 10:42:02.621882923 +0100 @@ -6,7 +6,7 @@ // /*! @@ -67,8 +67,8 @@ diff -ruN exercises/exercise-grids/main.cc exercises/solution/exercise-grids/mai #include <config.h> diff -ruN exercises/exercise-grids/params.input exercises/solution/exercise-grids/params.input ---- exercises/exercise-grids/params.input 2025-02-26 11:38:46.809817826 +0100 -+++ exercises/solution/exercise-grids/params.input 2025-02-26 11:38:46.846816132 +0100 +--- exercises/exercise-grids/params.input 2025-03-07 11:30:34.875192028 +0100 ++++ exercises/solution/exercise-grids/params.input 2025-03-07 11:30:34.878192008 +0100 @@ -3,13 +3,34 @@ TEnd = 3.154e9 # in seconds, i.e ten years @@ -78,11 +78,11 @@ diff -ruN exercises/exercise-grids/params.input exercises/solution/exercise-grid +# UpperRight = 60 40 +# Cells = 24 16 + - # TODO: Task 1: Globally refine your grid --# TODO: Task 2: Develop grid input parameters that can be split into zones + # TODO: dumux-course-task 1: Globally refine your grid +-# TODO: dumux-course-task 2: Develop grid input parameters that can be split into zones +# Refinement = 2 + -+# TODO: Task 2: Develop even grid input parameters that can be split into zones ++# TODO: dumux-course-task 2: Develop even grid input parameters that can be split into zones +# Positions0 = 0 60 +# Positions1 = 0 40 +# Cells0 = 24 @@ -90,9 +90,9 @@ diff -ruN exercises/exercise-grids/params.input exercises/solution/exercise-grid +# Grading0 = 1.0 +# Grading1 = 1.0 + - # TODO: Task 3: Using the zoning and grading parameters, redevelop your grid to optimize your refinement in the areas that matter. --# TODO: Task 4: Run your simulation with the provided structured grid file ./grids/grid_structured.msh --# TODO: Task 5: Run your simulation with the provided unstructured grid file ./grids/grid_unstructured.msh + # TODO: dumux-course-task 3: Using the zoning and grading parameters, redevelop your grid to optimize your refinement in the areas that matter. +-# TODO: dumux-course-task 4: Run your simulation with the provided structured grid file ./grids/grid_structured.msh +-# TODO: dumux-course-task 5: Run your simulation with the provided unstructured grid file ./grids/grid_unstructured.msh +Positions0 = 0 40 60 +Positions1 = 0 25 30 35 40 +Cells0 = 10 14 @@ -100,18 +100,18 @@ diff -ruN exercises/exercise-grids/params.input exercises/solution/exercise-grid +Grading0 = 1.0 -1.25 +Grading1 = 1.0 -1.2 1.2 1.0 + -+# TODO: Task 4: Run your simulation the provided structured grid file ./grids/grid_structured.msh ++# TODO: dumux-course-task 4: Run your simulation the provided structured grid file ./grids/grid_structured.msh +# File = ./grids/grid_structured.msh +# File = ./grids/grid_structured.dgf + -+# TODO: Task 5: Run your simulation the provided structured grid file ./grids/grid_unstructured.msh ++# TODO: dumux-course-task 5: Run your simulation the provided structured grid file ./grids/grid_unstructured.msh +#File = ./grids/grid_unstructured.msh [Problem] Name = grid_exercise diff -ruN exercises/exercise-grids/properties.hh exercises/solution/exercise-grids/properties.hh ---- exercises/exercise-grids/properties.hh 2025-02-26 11:38:46.809817826 +0100 -+++ exercises/solution/exercise-grids/properties.hh 2025-02-26 11:38:46.846816132 +0100 +--- exercises/exercise-grids/properties.hh 2025-03-07 11:30:34.875192028 +0100 ++++ exercises/solution/exercise-grids/properties.hh 2025-03-07 11:30:34.878192008 +0100 @@ -5,9 +5,9 @@ // SPDX-License-Identifier: GPL-3.0-or-later // @@ -140,23 +140,23 @@ diff -ruN exercises/exercise-grids/properties.hh exercises/solution/exercise-gri +//Set the grid type +// template<class TypeTag> +// struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2>; }; -+// TODO: Task 2: Replace the above Grid Property definition with a more flexible grid (Use Dune::TensorProductCoordinates) ++// TODO: dumux-course-task 2: Replace the above Grid Property definition with a more flexible grid (Use Dune::TensorProductCoordinates) template<class TypeTag> -struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2>; }; --// TODO: dumux-course-task 2 +-// TODO: dumux-course-task 2: -//Replace the above Grid Property definition with a more flexible grid (Use Dune::TensorProductCoordinates) - --// TODO: dumux-course-task 4 +-// TODO: dumux-course-task 4: -// Replace the above Grid Property definition to read in a external structured grid via a .msh file (Use Dune::ALUGrid and Dune:cube) +struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2, Dune::TensorProductCoordinates<double, 2> >; }; --// TODO: dumux-course-task 5 +-// TODO: dumux-course-task 5: -// Replace the above Grid Property definition to read in a external unstructured grid via a .msh file (Use Dune::ALUGrid and Dune::simplex) -+// TODO: Task 4: Replace the above Grid Property definition to read in a external structured grid via a .msh file (Use Dune::ALUGrid and Dune:cube) ++// TODO: dumux-course-task 4: Replace the above Grid Property definition to read in a external structured grid via a .msh file (Use Dune::ALUGrid and Dune:cube) +// template<class TypeTag> +// struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>; }; + -+// TODO: Task 5: Replace the above Grid Property definition to read in a external unstructured grid via a .msh file (Use Dune::ALUGrid and Dune::simplex) ++// TODO: dumux-course-task 5: Replace the above Grid Property definition to read in a external unstructured grid via a .msh file (Use Dune::ALUGrid and Dune::simplex) +// template<class TypeTag> +// struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::ALUGrid<2, 2, Dune::simplex, Dune::nonconforming>; }; diff --git a/.patches/exercise-mainfile/exercise-mainfile.patch b/.patches/exercise-mainfile/exercise-mainfile.patch index e7d1e8d3..a3e6f128 100644 --- a/.patches/exercise-mainfile/exercise-mainfile.patch +++ b/.patches/exercise-mainfile/exercise-mainfile.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-mainfile/CMakeLists.txt exercises/solution/exercise-mainfile/CMakeLists.txt ---- exercises/exercise-mainfile/CMakeLists.txt 2025-02-26 11:38:46.809817826 +0100 -+++ exercises/solution/exercise-mainfile/CMakeLists.txt 2025-02-26 11:38:46.846816132 +0100 +--- exercises/exercise-mainfile/CMakeLists.txt 2025-03-07 10:42:02.614882967 +0100 ++++ exercises/solution/exercise-mainfile/CMakeLists.txt 2025-03-07 10:42:02.621882923 +0100 @@ -2,14 +2,9 @@ # SPDX-License-Identifier: GPL-3.0-or-later @@ -20,7 +20,7 @@ diff -ruN exercises/exercise-mainfile/CMakeLists.txt exercises/solution/exercise # add a symlink for each input file add_input_file_links() diff -ruN exercises/exercise-mainfile/exercise1pamain.cc exercises/solution/exercise-mainfile/exercise1pamain.cc ---- exercises/exercise-mainfile/exercise1pamain.cc 2025-02-26 11:38:46.809817826 +0100 +--- exercises/exercise-mainfile/exercise1pamain.cc 2025-03-07 11:30:34.875192028 +0100 +++ exercises/solution/exercise-mainfile/exercise1pamain.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,130 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -112,7 +112,7 @@ diff -ruN exercises/exercise-mainfile/exercise1pamain.cc exercises/solution/exer - - Dune::Timer timer; - -- // TODO: dumux-course-task 3 +- // TODO: dumux-course-task 3: - // Change the differentiation method to analytic by changing from DiffMethod::numeric to DiffMethod::analytic - - // the assembler for stationary problems @@ -155,7 +155,7 @@ diff -ruN exercises/exercise-mainfile/exercise1pamain.cc exercises/solution/exer -}// end main diff -ruN exercises/exercise-mainfile/exercise1pa_solution_main.cc exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc --- exercises/exercise-mainfile/exercise1pa_solution_main.cc 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc 2025-02-26 11:38:46.847816086 +0100 ++++ exercises/solution/exercise-mainfile/exercise1pa_solution_main.cc 2025-03-07 11:30:34.878192008 +0100 @@ -0,0 +1,130 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: @@ -246,7 +246,7 @@ diff -ruN exercises/exercise-mainfile/exercise1pa_solution_main.cc exercises/sol + + Dune::Timer timer; + -+ // TODO: dumux-course-task 3 ++ // TODO: dumux-course-task 3: + // Change the differentiation method to analytic by changing from DiffMethod::numeric to DiffMethod::analytic + + // the assembler for stationary problems @@ -288,7 +288,7 @@ diff -ruN exercises/exercise-mainfile/exercise1pa_solution_main.cc exercises/sol + +}// end main diff -ruN exercises/exercise-mainfile/exercise1pbmain.cc exercises/solution/exercise-mainfile/exercise1pbmain.cc ---- exercises/exercise-mainfile/exercise1pbmain.cc 2025-02-26 11:38:46.810817780 +0100 +--- exercises/exercise-mainfile/exercise1pbmain.cc 2025-03-07 10:42:02.614882967 +0100 +++ exercises/solution/exercise-mainfile/exercise1pbmain.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,120 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -412,7 +412,7 @@ diff -ruN exercises/exercise-mainfile/exercise1pbmain.cc exercises/solution/exer - -}// end main diff -ruN exercises/exercise-mainfile/exercise1pcmain.cc exercises/solution/exercise-mainfile/exercise1pcmain.cc ---- exercises/exercise-mainfile/exercise1pcmain.cc 2025-02-26 11:38:46.810817780 +0100 +--- exercises/exercise-mainfile/exercise1pcmain.cc 2025-03-07 10:42:02.614882967 +0100 +++ exercises/solution/exercise-mainfile/exercise1pcmain.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,146 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -562,7 +562,7 @@ diff -ruN exercises/exercise-mainfile/exercise1pcmain.cc exercises/solution/exer - -}// end main diff -ruN exercises/exercise-mainfile/exercise_mainfile_a.input exercises/solution/exercise-mainfile/exercise_mainfile_a.input ---- exercises/exercise-mainfile/exercise_mainfile_a.input 2025-02-26 13:56:01.169864268 +0100 +--- exercises/exercise-mainfile/exercise_mainfile_a.input 2025-03-07 11:30:34.875192028 +0100 +++ exercises/solution/exercise-mainfile/exercise_mainfile_a.input 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -[Grid] @@ -582,7 +582,7 @@ diff -ruN exercises/exercise-mainfile/exercise_mainfile_a.input exercises/soluti - -[Assembly.NumericDifference] -PriVarMagnitude = 1e5 --# TODO: Task 3: Change BaseEpsilon to a smaller value 1e-15 +-# TODO: dumux-course-task 3: Change BaseEpsilon to a smaller value 1e-15 -BaseEpsilon = 1e-10 diff -ruN exercises/exercise-mainfile/exercise_mainfile_a_solution.input exercises/solution/exercise-mainfile/exercise_mainfile_a_solution.input --- exercises/exercise-mainfile/exercise_mainfile_a_solution.input 1970-01-01 01:00:00.000000000 +0100 @@ -653,12 +653,12 @@ diff -ruN exercises/exercise-mainfile/exercise_mainfile_c.input exercises/soluti -[Assembly.NumericDifference] -PriVarMagnitude = 1e5 diff -ruN exercises/exercise-mainfile/properties.hh exercises/solution/exercise-mainfile/properties.hh ---- exercises/exercise-mainfile/properties.hh 2025-02-26 11:38:46.810817780 +0100 -+++ exercises/solution/exercise-mainfile/properties.hh 2025-02-26 11:38:46.847816086 +0100 +--- exercises/exercise-mainfile/properties.hh 2025-03-07 11:30:34.875192028 +0100 ++++ exercises/solution/exercise-mainfile/properties.hh 2025-03-07 11:30:34.878192008 +0100 @@ -25,8 +25,8 @@ #include <dumux/porousmediumflow/1p/model.hh> - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: -// uncomment the incompressiblelocalresidual which is a specialization of the standard immiscible localresidual for one phase incompressible cases and provides an analytic jacobian. -// #include <dumux/porousmediumflow/1p/incompressiblelocalresidual.hh> +// uncomment the incompressiblelocalresidual which is a specialization of the standard immisible localresidual for one phase incompressible cases and provides an analytic jacobian. @@ -668,7 +668,7 @@ diff -ruN exercises/exercise-mainfile/properties.hh exercises/solution/exercise- #include "1pproblem.hh" @@ -68,8 +68,8 @@ - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: // set the OneP Incompressible local residual for the OnePIncompressible type tag. This provides an analytic jacobian to be used for the analytic solution. Change that by setting: -// template<class TypeTag> -// struct LocalResidual<TypeTag, TTag::OnePIncompressible> { using type = OnePIncompressibleLocalResidual<TypeTag>; }; @@ -678,7 +678,7 @@ diff -ruN exercises/exercise-mainfile/properties.hh exercises/solution/exercise- // the fluid system for compressible tests diff -ruN exercises/exercise-mainfile/README.md exercises/solution/exercise-mainfile/README.md ---- exercises/exercise-mainfile/README.md 2025-03-04 10:55:49.677212273 +0100 +--- exercises/exercise-mainfile/README.md 2025-03-07 10:34:20.586089939 +0100 +++ exercises/solution/exercise-mainfile/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,196 +0,0 @@ -# Exercise Mainfiles (DuMuX course) diff --git a/.patches/exercise-model/exercise-model.patch b/.patches/exercise-model/exercise-model.patch index 1a7d07ea..a84dc582 100644 --- a/.patches/exercise-model/exercise-model.patch +++ b/.patches/exercise-model/exercise-model.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-model/CMakeLists.txt exercises/solution/exercise-model/CMakeLists.txt ---- exercises/exercise-model/CMakeLists.txt 2025-02-26 11:38:46.810817780 +0100 -+++ exercises/solution/exercise-model/CMakeLists.txt 2025-02-26 11:38:46.847816086 +0100 +--- exercises/exercise-model/CMakeLists.txt 2025-03-07 10:42:02.615882961 +0100 ++++ exercises/solution/exercise-model/CMakeLists.txt 2025-03-07 10:42:02.621882923 +0100 @@ -3,5 +3,5 @@ dune_symlink_to_source_files(FILES images params.input) @@ -9,33 +9,31 @@ diff -ruN exercises/exercise-model/CMakeLists.txt exercises/solution/exercise-mo +dumux_add_test(NAME exercise_nonlineardiffusion_sol SOURCES main.cc) diff -ruN exercises/exercise-model/main.cc exercises/solution/exercise-model/main.cc ---- exercises/exercise-model/main.cc 2025-02-28 10:53:32.830702341 +0100 -+++ exercises/solution/exercise-model/main.cc 2025-02-26 11:38:46.847816086 +0100 -@@ -29,7 +29,7 @@ - #include <dumux/nonlinear/newtonsolver.hh> +--- exercises/exercise-model/main.cc 2025-03-07 11:30:34.876192021 +0100 ++++ exercises/solution/exercise-model/main.cc 2025-03-07 11:30:34.878192008 +0100 +@@ -30,6 +30,7 @@ #include <dumux/assembly/fvassembler.hh> --// TODO Task 3.1: Include the header model.hh + // TODO: dumux-course-task 3.1: include the header model.hh +#include "model.hh" /*! * \ingroup NonlinearDiffusion -@@ -79,8 +79,8 @@ +@@ -79,8 +80,8 @@ struct NonlinearDiffusionTest { -- // TODO Task 3.1: We need to set our model by replacing ModelTypeTag +- // TODO: dumux-course-task 3.1: we need to set our model by replacing ModelTypeTag - using InheritsFrom = std::tuple</*ModelTypeTag,*/BoxModel>; -+ // TODO: We need to set our model by replacing ModelTypeTag ++ // TODO: dumux-course-task 3.1: We need to set our model by replacing ModelTypeTag + using InheritsFrom = std::tuple<NonlinearDiffusionModel, BoxModel>; using Scalar = double; using Grid = Dune::YaspGrid<2>; -@@ -138,63 +138,62 @@ - // the problem for the boundary conditions, a solution vector and a grid variables instance. +@@ -139,62 +140,62 @@ auto gridGeometry = std::make_shared<GridGeometry>(gridManager.grid().leafGridView()); -- // TODO Task 3.2: Uncomment when the model is implemented + // TODO: dumux-course-task 3.2: uncomment when the model is implemented - // using Scalar = GetPropType<TypeTag, Properties::Scalar>; - // using Problem = GetPropType<TypeTag, Properties::Problem>; - // using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>; @@ -150,7 +148,7 @@ diff -ruN exercises/exercise-model/main.cc exercises/solution/exercise-model/mai }// end main diff -ruN exercises/exercise-model/model.hh exercises/solution/exercise-model/model.hh --- exercises/exercise-model/model.hh 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-model/model.hh 2025-02-26 11:38:46.847816086 +0100 ++++ exercises/solution/exercise-model/model.hh 2025-03-07 10:42:02.622882916 +0100 @@ -0,0 +1,210 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: @@ -363,7 +361,7 @@ diff -ruN exercises/exercise-model/model.hh exercises/solution/exercise-model/mo + +#endif diff -ruN exercises/exercise-model/README.md exercises/solution/exercise-model/README.md ---- exercises/exercise-model/README.md 2025-03-04 10:55:49.677212273 +0100 +--- exercises/exercise-model/README.md 2025-03-07 11:30:34.876192021 +0100 +++ exercises/solution/exercise-model/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,195 +0,0 @@ -# Exercise Model (DuMuX course) @@ -453,7 +451,7 @@ diff -ruN exercises/exercise-model/README.md exercises/solution/exercise-model/R - -struct NonlinearDiffusionTest -{ -- // TODO: Set new model by replacing ModelTypeTag +- // TODO: dumux-course-task 3.1: Set new model by replacing ModelTypeTag - using InheritsFrom = std::tuple</*ModelTypeTag,*/BoxModel>; - - // Further property definitions diff --git a/.patches/exercise-properties/exercise-properties.patch b/.patches/exercise-properties/exercise-properties.patch index 12096d27..05a072c2 100644 --- a/.patches/exercise-properties/exercise-properties.patch +++ b/.patches/exercise-properties/exercise-properties.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-properties/CMakeLists.txt exercises/solution/exercise-properties/CMakeLists.txt ---- exercises/exercise-properties/CMakeLists.txt 2025-02-26 11:38:46.811817734 +0100 -+++ exercises/solution/exercise-properties/CMakeLists.txt 2025-02-26 11:38:46.847816086 +0100 +--- exercises/exercise-properties/CMakeLists.txt 2025-03-07 10:42:02.615882961 +0100 ++++ exercises/solution/exercise-properties/CMakeLists.txt 2025-03-07 10:42:02.622882916 +0100 @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -13,13 +13,13 @@ diff -ruN exercises/exercise-properties/CMakeLists.txt exercises/solution/exerci # add a symlink for each input file diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/exercise-properties/mylocalresidual.hh ---- exercises/exercise-properties/mylocalresidual.hh 2025-03-04 10:55:49.677212273 +0100 -+++ exercises/solution/exercise-properties/mylocalresidual.hh 2025-03-04 10:55:49.677212273 +0100 +--- exercises/exercise-properties/mylocalresidual.hh 2025-03-07 11:30:34.876192021 +0100 ++++ exercises/solution/exercise-properties/mylocalresidual.hh 2025-03-07 10:42:02.622882916 +0100 @@ -59,8 +59,6 @@ * \note The volVars can be different to allow computing * the implicit euler time derivative here */ -- // TODO: dumux-course-task 3 +- // TODO: dumux-course-task 3: - // Eliminate density from the storage term NumEqVector computeStorage(const Problem& problem, const SubControlVolume& scv, @@ -36,7 +36,7 @@ diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/ex * \param scvf The sub control volume face to compute the flux on * \param elemFluxVarsCache The cache related to flux computation */ -- // TODO: dumux-course-task +- // TODO: dumux-course-task 3: - // Eliminate the density from the flux term NumEqVector computeFlux(const Problem& problem, const Element& element, @@ -51,8 +51,8 @@ diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/ex auto eqIdx = conti0EqIdx + phaseIdx; flux[eqIdx] = fluxVars.advectiveFlux(phaseIdx, upwindTerm); diff -ruN exercises/exercise-properties/problem.hh exercises/solution/exercise-properties/problem.hh ---- exercises/exercise-properties/problem.hh 2025-02-26 11:38:46.811817734 +0100 -+++ exercises/solution/exercise-properties/problem.hh 2025-02-26 11:38:46.847816086 +0100 +--- exercises/exercise-properties/problem.hh 2025-03-07 11:30:34.876192021 +0100 ++++ exercises/solution/exercise-properties/problem.hh 2025-03-07 10:42:02.622882916 +0100 @@ -11,6 +11,7 @@ #ifndef DUMUX_INCOMPRESSIBLE_TWOP_TEST_PROBLEM_HH #define DUMUX_INCOMPRESSIBLE_TWOP_TEST_PROBLEM_HH @@ -65,7 +65,7 @@ diff -ruN exercises/exercise-properties/problem.hh exercises/solution/exercise-p */ NumEqVector neumannAtPos(const GlobalPosition &globalPos) const { --// TODO: reformulate the neumann boundary condition's values in terms of volume instead of mass injected per meter and second +-// TODO: dumux-course-task 3: reformulate the neumann boundary condition's values in terms of volume instead of mass injected per meter and second NumEqVector values(0.0); if (onInlet_(globalPos)) - values[contiDNAPLEqIdx] = -0.04; // kg / (m * s) @@ -77,14 +77,14 @@ diff -ruN exercises/exercise-properties/problem.hh exercises/solution/exercise-p return values; } diff -ruN exercises/exercise-properties/properties.hh exercises/solution/exercise-properties/properties.hh ---- exercises/exercise-properties/properties.hh 2025-02-26 11:38:46.811817734 +0100 -+++ exercises/solution/exercise-properties/properties.hh 2025-02-26 11:38:46.848816040 +0100 +--- exercises/exercise-properties/properties.hh 2025-03-07 11:30:34.876192021 +0100 ++++ exercises/solution/exercise-properties/properties.hh 2025-03-07 10:42:02.622882916 +0100 @@ -27,9 +27,7 @@ #include "spatialparams.hh" #include "problem.hh" - --// TODO: dumux-course-task 3 +-// TODO: dumux-course-task 3: -// Include the local residual header +#include "mylocalresidual.hh" @@ -94,7 +94,7 @@ diff -ruN exercises/exercise-properties/properties.hh exercises/solution/exercis template<class TypeTag> struct Problem<TypeTag, TTag::TwoPIncompressible> { using type = TwoPTestProblem<TypeTag>; }; --// TODO: dumux-course-task 3 +-// TODO: dumux-course-task 3: -// Use MyLocalResidual as LocalResidual - +template<class TypeTag> diff --git a/.patches/exercise-runtimeparams/exercise-runtimeparams.patch b/.patches/exercise-runtimeparams/exercise-runtimeparams.patch index e2eaa5a5..cd9047c6 100644 --- a/.patches/exercise-runtimeparams/exercise-runtimeparams.patch +++ b/.patches/exercise-runtimeparams/exercise-runtimeparams.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-runtimeparams/CMakeLists.txt exercises/solution/exercise-runtimeparams/CMakeLists.txt ---- exercises/exercise-runtimeparams/CMakeLists.txt 2025-02-26 11:38:46.811817734 +0100 -+++ exercises/solution/exercise-runtimeparams/CMakeLists.txt 2025-02-26 11:38:46.848816040 +0100 +--- exercises/exercise-runtimeparams/CMakeLists.txt 2025-03-07 10:42:02.616882954 +0100 ++++ exercises/solution/exercise-runtimeparams/CMakeLists.txt 2025-03-07 10:42:02.622882916 +0100 @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later @@ -11,37 +11,37 @@ diff -ruN exercises/exercise-runtimeparams/CMakeLists.txt exercises/solution/exe # add a symlink for each input file diff -ruN exercises/exercise-runtimeparams/params.input exercises/solution/exercise-runtimeparams/params.input ---- exercises/exercise-runtimeparams/params.input 2025-02-26 14:09:24.762108833 +0100 -+++ exercises/solution/exercise-runtimeparams/params.input 2025-02-26 11:38:46.848816040 +0100 +--- exercises/exercise-runtimeparams/params.input 2025-03-07 11:30:34.876192021 +0100 ++++ exercises/solution/exercise-runtimeparams/params.input 2025-03-07 11:30:34.878192008 +0100 @@ -12,12 +12,12 @@ AquiferDepth = 2700.0 # m InjectionDuration = 2.628e6 # in seconds, i.e. one month - # TODO: Task 2: Create a parameter called "TotalAreaSpecificInflow" --# TODO: Task 3: Run the case with and without a provided value in the input file for "TotalAreaSpecificInflow" + # TODO: dumux-course-task 2: Create a parameter called "TotalAreaSpecificInflow" +-# TODO: dumux-course-task 3: Run the case with and without a provided value in the input file for "TotalAreaSpecificInflow" +TotalAreaSpecificInflow = -1e-4 # kg/(s m^2) [SpatialParams] PermeabilityAquitard = 1e-15 # m^2 - # TODO: Task 1: Change the Aquitard's Entry Pressure + # TODO: dumux-course-task 1: Change the Aquitard's Entry Pressure -Aquitard.BrooksCoreyPcEntry = 4.5e4 # Pa +Aquitard.BrooksCoreyPcEntry = 4.5e3 # Pa Aquitard.BrooksCoreyLambda = 2.0 Aquitard.Swr = 0.2 Aquitard.Snr = 0.0 diff -ruN exercises/exercise-runtimeparams/problem.hh exercises/solution/exercise-runtimeparams/problem.hh ---- exercises/exercise-runtimeparams/problem.hh 2025-02-26 11:38:46.811817734 +0100 -+++ exercises/solution/exercise-runtimeparams/problem.hh 2025-02-26 11:38:46.848816040 +0100 +--- exercises/exercise-runtimeparams/problem.hh 2025-03-07 11:30:34.877192015 +0100 ++++ exercises/solution/exercise-runtimeparams/problem.hh 2025-03-07 11:30:34.879192001 +0100 @@ -81,12 +81,16 @@ injectionDuration_ = getParamFromGroup<Scalar>("Problem","InjectionDuration"); - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // Set a variable "TotalAreaSpecificInflow" to read in a value from the parameter tree via the input file - + totalAreaSpecificInflow_ = getParam<Scalar>("Problem.TotalAreaSpecificInflow"); - // TODO: dumux-course-task 3 + // TODO: dumux-course-task 3: // Set a default value for the above parameter. - + // totalAreaSpecificInflow_ = getParam<Scalar>("Problem.TotalAreaSpecificInflow", -1e-4); - // TODO: dumux-course-task 4 + // TODO: dumux-course-task 4: // Provide output describing where the parameter value comes from using parameter bool functions. + // if (hasParamInGroup("Problem","TotalAreaSpecificInflow")) + // std::cout << "Parameter value is read from the input file." << std::endl; @@ -52,7 +52,7 @@ diff -ruN exercises/exercise-runtimeparams/problem.hh exercises/solution/exercis @@ -149,7 +153,7 @@ // units kg/(s*m^2) - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // Incorporate "totalAreaSpecificInflow_" into the injection boundary condition - values[Indices::conti0EqIdx + FluidSystem::N2Idx]= -1e-4; + values[Indices::conti0EqIdx + FluidSystem::N2Idx] = totalAreaSpecificInflow_; @@ -61,15 +61,15 @@ diff -ruN exercises/exercise-runtimeparams/problem.hh exercises/solution/exercis @@ -204,6 +208,7 @@ Scalar injectionDuration_; //! Duration of the injection in seconds - // TODO: dumux-course-task 2 + // TODO: dumux-course-task 2: // Set a variable "totalAreaSpecificInflow_" to read in a value from the parameter tree via the input file + Scalar totalAreaSpecificInflow_; //! Rate of the Injection in kg/(s m^2) Scalar time_; }; diff -ruN exercises/exercise-runtimeparams/properties.hh exercises/solution/exercise-runtimeparams/properties.hh ---- exercises/exercise-runtimeparams/properties.hh 2025-02-26 11:38:46.811817734 +0100 -+++ exercises/solution/exercise-runtimeparams/properties.hh 2025-02-26 11:38:46.848816040 +0100 +--- exercises/exercise-runtimeparams/properties.hh 2025-03-07 10:42:02.616882954 +0100 ++++ exercises/solution/exercise-runtimeparams/properties.hh 2025-03-07 10:42:02.623882910 +0100 @@ -58,6 +58,6 @@ FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true> >; }; @@ -254,8 +254,8 @@ diff -ruN exercises/exercise-runtimeparams/README.md exercises/solution/exercise - -* > __Task 4__: Using one of the bool `hasParam` functions, place an output in the problem file to alert the user where the parameter value comes from. diff -ruN exercises/exercise-runtimeparams/spatialparams.hh exercises/solution/exercise-runtimeparams/spatialparams.hh ---- exercises/exercise-runtimeparams/spatialparams.hh 2025-02-26 11:38:46.811817734 +0100 -+++ exercises/solution/exercise-runtimeparams/spatialparams.hh 2025-02-26 11:38:46.848816040 +0100 +--- exercises/exercise-runtimeparams/spatialparams.hh 2025-03-07 10:42:02.616882954 +0100 ++++ exercises/solution/exercise-runtimeparams/spatialparams.hh 2025-03-07 10:42:02.623882910 +0100 @@ -12,8 +12,8 @@ * fully implicit model. */ -- GitLab