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] 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