Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
diff -ruN exercises/exercise-biomineralization/biominproblem.hh exercises/solution/exercise-biomineralization/biominproblem.hh
--- exercises/exercise-biomineralization/biominproblem.hh 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/biominproblem.hh 2023-04-26 14:37:49.789150797 +0200
@@ -31,10 +31,12 @@
// TODO: dumux-course-task
// include chemistry file here
+#include "chemistry/simplebiominreactions.hh" // chemical reactions
namespace Dumux {
/*!
+ *
* \brief Problem biomineralization (MICP) in an experimental setup.
*/
template <class TypeTag>
@@ -65,6 +67,7 @@
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
// TODO: dumux-course-task
// set the chemistry TypeTag
+ using Chemistry = typename Dumux::SimpleBiominReactions<NumEqVector, VolumeVariables>;
static constexpr int numComponents = FluidSystem::numComponents;
static constexpr int pressureIdx = Indices::pressureIdx;
@@ -182,11 +185,12 @@
NumEqVector values(0.0);
Scalar waterFlux = injVolumeflux_; // divide by area if area not 1! [m/s]
+ Scalar gasFlux = injCO2_; // divide by area if area not 1! [m/s]
// Set values for Ca + urea injection above aquitard.
// Use negative values for injection.
if(globalPos[0] < eps_
- && globalPos[1] > 11.0 - eps_
+ && globalPos[1] > 11.0 + eps_
&& globalPos[1] < 12.0 + eps_
&& time_ < injBioTime_)
{
@@ -196,9 +200,15 @@
}
// TODO: dumux-course-task
// Set CO2 injection below aquitard after the injBioTime
+ else if(globalPos[0] < eps_
+ && globalPos[1] > 2.0 + eps_
+ && globalPos[1] < 3.0 + eps_
+ && time_ > injBioTime_ )
+ {
+ values[conti0EqIdx + CO2Idx] = - gasFlux / FluidSystem::molarMass(CO2Idx);
+ }
else
{
- // Scalar gasFlux = injCO2_; // divide by area if area not 1! [m/s]
values = 0.0; //mol/m²/s
}
@@ -265,11 +275,13 @@
// set Chemistry
// set VolumeVariables
// call reactionSource() in chemistry
+ Chemistry chemistry;
+ const auto& volVars = elemVolVars[scv];
+ chemistry.reactionSource(source, volVars);
return source;
}
-
const std::vector<Scalar>& getKxx()
{
return Kxx_;
diff -ruN exercises/exercise-biomineralization/biominspatialparams.hh exercises/solution/exercise-biomineralization/biominspatialparams.hh
--- exercises/exercise-biomineralization/biominspatialparams.hh 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/biominspatialparams.hh 2023-04-26 14:37:49.789150797 +0200
@@ -30,7 +30,7 @@
#include <dumux/material/fluidmatrixinteractions/porosityprecipitation.hh>
// TODO: dumux-course-task
// 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
#include <dumux/discretization/method.hh>
@@ -285,7 +285,7 @@
// TODO: dumux-course-task
// define the power law as the permeability law
- PermeabilityKozenyCarman<PermeabilityType> permLaw_;
+ PermeabilityPowerLaw<PermeabilityType> permLaw_;
PoroLaw poroLaw_;
Scalar initialPorosity_;
diff -ruN exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh
--- exercises/exercise-biomineralization/chemistry/simplebiominreactions.hh 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/chemistry/simplebiominreactions.hh 2023-04-26 14:37:49.789150797 +0200
@@ -25,7 +25,6 @@
#define DUMUX_BIOMIN_REACTIONS_HH
#include <dumux/common/parameters.hh>
-// #include <dumux-course/exercises/exercise-biomineralization/components/urea.hh>
namespace Dumux {
@@ -94,6 +93,7 @@
// TODO: dumux-course-task
// implement mass of biofilm
+ Scalar massBiofilm = densityBiofilm * volFracBiofilm;
Scalar molalityUrea = moleFracToMolality(volVars.moleFraction(liquidPhaseIdx,UreaIdx),
xwCa,
@@ -101,7 +101,8 @@
// TODO: dumux-course-task
// compute rate of ureolysis by implementing Z_urease,biofilm and r_urea
- Scalar rurea = 0.0;
+ Scalar Zub = kub_ * massBiofilm; // [kg urease/m³]
+ Scalar rurea = kurease_ * Zub * molalityUrea / (ku_ + molalityUrea); // [mol/m³s]
// compute/set dissolution and precipitation rate of calcite
Scalar rprec = 0.0;
@@ -111,11 +112,11 @@
// TODO: dumux-course-task
// update terms according to stochiometry
q[H2OIdx] += 0.0;
- q[CO2Idx] += 0.0;
- q[CaIdx] += 0.0;
- q[UreaIdx] += 0.0;
+ q[CO2Idx] += rurea - rprec ;
+ q[CaIdx] += - rprec;
+ q[UreaIdx] += - rurea;
q[BiofilmIdx] += 0.0;
- q[CalciteIdx] += 0.0;
+ q[CalciteIdx] += rprec;
}
private:
diff -ruN exercises/exercise-biomineralization/CMakeLists.txt exercises/solution/exercise-biomineralization/CMakeLists.txt
--- exercises/exercise-biomineralization/CMakeLists.txt 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/CMakeLists.txt 2023-04-26 14:37:49.789150797 +0200
@@ -1,7 +1,7 @@
# executables for exercisebiomin
-dumux_add_test(NAME exercise_biomin
+dumux_add_test(NAME exercise_biomin_solution
SOURCES main.cc
- CMD_ARGS -Injection.InjBioTime 1 -Injection.InjCO2Time 0)
+ CMD_ARGS -Injection.InjBioTime 1 -Injection.InjCO2Time 0.3)
# 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 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/components/biofilm.hh 2023-04-26 14:37:49.789150797 +0200
@@ -24,9 +24,10 @@
#ifndef DUMUX_BIOFILM_HH
#define DUMUX_BIOFILM_HH
+#include <dumux/common/parameters.hh>
+
#include <dumux/material/components/base.hh>
#include <dumux/material/components/solid.hh>
-#include <dumux/common/parameters.hh>
namespace Dumux::Components {
diff -ruN exercises/exercise-biomineralization/components/urea.hh exercises/solution/exercise-biomineralization/components/urea.hh
--- exercises/exercise-biomineralization/components/urea.hh 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/components/urea.hh 2023-04-26 14:37:49.789150797 +0200
@@ -26,8 +26,7 @@
#include <dumux/material/components/base.hh>
-namespace Dumux {
-namespace Components {
+namespace Dumux::Components {
/*!
* \ingroup Components
@@ -52,7 +51,5 @@
};
-} // end namespace Components
-} // end namespace Dumux
-
+} // end namespace Dumux::Components
#endif
diff -ruN exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh
--- exercises/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/fluidmatrixinteractions/permeabilitypowerlaw.hh 2023-04-26 14:37:49.789150797 +0200
@@ -52,10 +52,11 @@
using std::pow;
// 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
// return the updated permeability according to K=K_0*(poro/refPoro)^exponent
- return refPerm;
+ return refPerm * pow((poro)/(refPoro), exponent);
}
};
diff -ruN exercises/exercise-biomineralization/fluidsystems/biomin.hh exercises/solution/exercise-biomineralization/fluidsystems/biomin.hh
--- exercises/exercise-biomineralization/fluidsystems/biomin.hh 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/fluidsystems/biomin.hh 2023-04-26 14:37:49.789150797 +0200
@@ -231,7 +231,7 @@
static void init()
{
init(/*startTemp=*/295.15, /*endTemp=*/305.15, /*tempSteps=*/10,
- /*startPressure=*/1e4, /*endPressure=*/1e6, /*pressureSteps=*/200);
+ /*startPressure=*/1e4, /*endPressure=*/1e6, /*pressureSteps=*/2000);
}
diff -ruN exercises/exercise-biomineralization/params.input exercises/solution/exercise-biomineralization/params.input
--- exercises/exercise-biomineralization/params.input 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/params.input 2023-04-26 14:37:49.789150797 +0200
@@ -16,10 +16,10 @@
InitBiofilm = 0.05 # [-] initial volumefraction biofilm
[Injection]
-InjVolumeflux = 1e-5 # [m³/s] = [ml/min] /[s/min] /[ml/m³]
-InjBioTime = 10 # [days]
+InjVolumeflux = 1e-4 # [m³/s] = [ml/min] /[s/min] /[ml/m³]
+InjBioTime = 12 # [days]
InjCO2 = 1e-2 # [kg/s] gasFlux
-InjCO2Time = 4 # [days] duration of CO2 injection until the end of the simulation
+InjCO2Time = 4 # [days]
ConcCa = 40 # [kg/m³] injected calcium concentration (max: 50)
ConcUrea = 60 # [kg/m³] injected urea concentration (max: 80)
@@ -35,7 +35,6 @@
Aquitard.Swr = 0.0
Aquitard.Snr = 0.0
-
[BioCoefficients]
RhoBiofilm = 6.9 # [kg/m³] density of biofilm
@@ -48,4 +47,6 @@
Salinity = 0.1
#TODO: dumux-course-task
-# add the power law's exponent parameter PowerLaw.Exponent = 5.0
+# 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 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/properties.hh 2023-04-26 14:37:49.789150797 +0200
@@ -30,17 +30,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
// 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
+#include <dumux/material/components/defaultco2table.hh> //! Provides the precalculated tabulated values of CO2 density and enthalpy.
+#include "solidsystems/biominsolidphase.hh" // The biomineralization solid system
#include "fluidsystems/biomin.hh" // The biomineralization fluid system
#include "biominspatialparams.hh" // Spatially dependent parameters
#include "biominproblem.hh"
namespace Dumux {
+
+
namespace Properties {
//! Create new type tag for the problem
@@ -66,7 +69,7 @@
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
// TODO: dumux-course-task
// use the CO2 component with tabulated values
- using CO2Impl = Components::SimpleCO2<Scalar>;
+ using CO2Impl = Components::CO2<Scalar, GeneratedCO2Tables::CO2Tables>;
using H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>;
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 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/README.md 1970-01-01 01:00:00.000000000 +0100
@@ -1,245 +0,0 @@
-# Exercise Biomineralization (DuMuX Course)
-
-The aim of this exercise is to get a first glimpse at the _DuMu<sup>x</sup>_ way of implementing mineralization and reaction processes. In the scope of this exercise, the setting of boundary conditions is revisited and a new reaction term is implemented.
-
-## Problem set-up
-
-The domain has a size of 20 x 15 m and contains a sealing aquitard in the middle. The aquitard is interrupted by a "fault zone" and thereby connects the upper drinking water aquifer and the lower CO<sub>2<sub>-storage aquifer. Initially, the domain is fully saturated with water and biofilm is present in the lower CO<sub>2<sub>-storage aquifer. Calcium and urea are injected in the upper drinking water aquifer by means of a Neumann boundary condition. The remaining parts of the upper boundary and the entire lower boundary are modelled with Neumann no-flow conditions, while on the right-hand side a Dirichlet boundary conditions is assigned, which fixes there the the initial values.
-
-
-Disclaimer: Please note, that this is not a realistic scenario. No one would think of storing gaseous CO<sub>2<sub> in this subcritical setting.
-
-
-
-
-## Preparing the exercise
-
-* Navigate to the directory `dumux-course/exercises/exercise-biomineralization`
-
-### 1. Getting familiar with the code
-
-Locate all the files you will need for this exercise
-* The __main file__ : `main.cc`
-* The __input file__: `params.input`
-* The __problem file__ : `biominproblem.hh`
-* The __properties file__: `properties.hh`
-* The __spatial parameters file__: `biominspatialparams.hh`
-
-Furthermore you will find the following folders:
-* `chemistry`: Provides a way to formulate reactions via source/sink terms.
-* `components`: Provides some additional components, e.g. biofilm and urea.
-* `fluidsystems`: Stores headers containing data/methods on fluid mixtures of pure components.
-* `fluidmatrixinteractions`: Stores headers containing methods on fluid-solid interactions, i.e. the permeability law.
-* `solidsystems`: Stores headers containing data/methods on solid mixtures of the components.
-
-To find out more on chemistry, components, fluidsystems, fluidmatrixinteractions, and solidsystems implementations, you may have a look at the folder `dumux/material`.
-
-__Special note on solidsystems:__
-There are two types of solid components: reactive and inert. For each reactive component, one mass balance is solved. The inert components compose the "unchanging" (inert) rock matrix.
-
-### 2. Implement a chemical equation
-
-In the following, the basic steps required to set the new chemical equation are outlined. Here, this is done in the __chemistry__ folder in the prepared file: `simplebiominreactions.hh` within the function ``reactionSource()``.
-Please be aware, that the chemistry file already provides some convenience functions (e.g. ``moleFracToMolality()``).
-
-__Task__
-
-Add a kinetic reaction by first calculating the current mass of available biofilm. Note that the density and volume fraction of biofilm are already defined for you.
-
-$`\displaystyle mass_{biofilm} = \rho_{biofilm} * \phi_{biofilm}`$
-
-Next, we want to implement the rate of ureolysis. This can be done with the following simplified equation:
-
-$`\displaystyle r_{urea} = k_{urease} * Z_{urease,biofilm} * m_{urea} / (K_{urea} + m_{urea})`$,
-
-where $`\displaystyle r_{urea}`$ is the rate of ureolysis, $`\displaystyle k_{urease}`$ the urease enzyme activity, $`\displaystyle m_{urea}`$ the molality of urea and $`\displaystyle K_{urea}`$ the half-saturation constant for urea for the ureolysis rate.
-
-Note, that the urease concentration $`\displaystyle Z_{urease,biofilm}`$ has a kinetic term of urease production per biofilm :
-
-$`\displaystyle Z_{urease,biofilm} = k_{urease,biofilm} * mass_{biofilm}`$
-
-The last step is defining the source term for each component according to the chemical reaction equations:
-
-$`\displaystyle \mathrm{CO(NH_{2})_{2} + 2 H_{2}O \rightarrow 2 NH_{3} + H_{2}CO_{3}}`$
-
-$`\displaystyle \mathrm{Ca^{2+} + CO_{3}^{2-} \rightarrow CaCO_{3}}`$
-
-Alternatively, it can be written in terms of the total chemical reaction equation, in which the appearance of inorganic carbon species cancels out:
-
-$`\displaystyle \mathrm{Ca^{2+} + CO(NH_{2})_{2} + 2 H_{2}O \rightarrow 2 NH_{4}^{+} + CaCO_{3}}`$
-
-which, written in terms of our primary variables are:
-
-Urea + 2 Water → (2 Ammonia) + Total Carbon
-
-Calcium ion + Total Carbon → Calcite
-
-Calcium ion + Urea + 2 Water → (2 Ammonium ions) + Calcite
-
-Note that for the sake of having a simplified chemistry for this dumux-course example, the component Ammonium is not considered as part of the reaction. Thus, you cannot set its source term, even though it is produced in the real reaction.
-Similarly, we only account for "Total Carbon", which is the sum of all carbon species
-($`\mathrm{CO_{2}}`$, $`\mathrm{H_{2}CO_{3}}`$, $`\mathrm{HCO_{3}^{-}}`$, and $`\mathrm{CO_{3}^{2-}}`$).
-Further, we assume that the overall reaction has reached an equilibrium state, i.e. every mole of urea hydrolyzed will lead to a mole of Calcite precipitating, and thus the precipitation rate simplifies to $`\displaystyle r_{prec} = r_{urea}`$.
-In reality, the initial geochemistry might be far away from conditions at which Calcite precipitates, e.g. due to low pH values at which the "Total Carbon" is mainly present as bicarbonate, $`\mathrm{HCO_{3}^{-}}`$, not taking part in the Calcite precipitation reaction.
-To reach the overall reaction's equilibrium state, the pH value needs to be increased first by ureolysis.
-However, to calculate the detailed precipitation rate of Calcite, we would first need to determine how much of the aggregate species "Total Carbon" is present in the form of each of its sub species, $`\mathrm{CO_{2}}`$, $`\mathrm{H_{2}CO_{3}}`$, $`\mathrm{HCO_{3}^{-}}`$, and $`\mathrm{CO_{3}^{2-}}`$.
-Further, we would need to account for all involved complex aqueous geochemistry to be able to determine the activities of both Calcium and Carbonate ions, which also impact the precipitation rate.
-We feel that this very specific chemistry goes beyond what is necessary for this dumux-course exercise and simplify the chemistry also with the motivation to save on the run time, which accounting for the detailed, complex geochemistry would increase significantly.
-The assumption of the overall reaction being at an equilibrium is used in many models for biomineralization.
-
-### 3. Make use of your newly created chemical equation
-
-To employ your newly created chemical equation, the chemistry file has to be included in your problem file.
-
-```c++
-#include "chemistry/simplebiominreactions.hh" // chemical reactions
-```
-
-Additionally the TypeTag of your chemistry file needs to be set in the problem file, within the class ``BioMinProblem``:
-
-```c++
-using Chemistry = typename Dumux::SimpleBiominReactions<NumEqVector, VolumeVariables>;
-```
-
-__Task__
-
-Now, the source/sink term can be updated in the problem file in its function ``source()``. You can access the newly created chemistry file and call the ``reactionSource()``-function from it. Make sure to call the ``chemistry.reactionSource()``-function with the correct arguments. Return the updated source terms in the end.
-The volume variables can be set using the element volume variables and the sub control volume:
-
-```c++
-const auto& volVars = elemVolVars[scv];
-```
-
-In order to compile and execute the program, change to the build-directory
-
-```bash
-cd build-cmake/exercises/exercise-biomineralization
-```
-
-and type
-
-```bash
-make exercise_biomin
-./exercise_biomin
-```
-
-### 4. Seal leakage pathway in the aquitard
-
- In the input file, you will find some parameters concerning the mineralization process. We want to seal the leakage pathway in the aquitard. The leakage pathway is assumed to be sealed when the porosity is reduced to `0.07` or less.
-
- __Task:__
-
- Vary input parameters in the input file to seal the leakage pathway. The overall injection duration in days (`InjBioTime`), the initial biomass (`InitBiofilm`), the overall injection rate (`InjVolumeflux`) and the injected concentrations of urea and calcium (`ConcUrea` and `ConcCa`) are available for variation. When changing the concentrations, keep in mind that both urea and calcium are needed for the reaction and their mass ratio should be 2 calcium to 3 urea for a good molar ratio of 1 mol urea per 1 mol of calcium, see also the molar masses in the component files.
-
- The result for the porosity should look like this:
-
- 
-
-### 5. CO<sub>2</sub> injection to test aquitard integrity
-
-Now, the sealed aquitard is tested with a CO<sub>2<sub>-Injection into the lower CO<sub>2<sub>-storage aquifer.
-
-__Task:__
-
-Implement a new boundary condition on the left boundary, injecting CO<sub>2<sub> from 2 m to 3 m from the bottom. Make sure, that the injection time for the calcium and urea is finished. You can use the predefined value `gasFlux` directly and divide it by the molar mass of CO<sub>2<sub>.
-Run two simulations and compare them side by side by creating two input files, or overwriting the input file in the command line:
-```bash
-./exercise_biomin -Problem.Name biominNoUrea -Injection.ConcUrea 0
-```
-The result for the biomineralization process during the CO<sub>2<sub> injection should look like this:
-
-
-
-### 6. Change the permeability law
-
-Now, we want to change the way the change in permeability due to the precipitation is calculated. While the initially used Kozeny-Carman relation is widely used, another common relation is the so-called Power Law.
-
-__Task:__
-
-Implement the Power-Law relation to create a new permeability law.
-For this, you can copy the existing header `dumux/material/fluidmatrixinteractions/permeabilitykozenycarman.hh` to the folder `fluidmatrixinteractions` in the exercise, rename it and within the file adapt the guarding macro, the class name, and the calculations for updating the permeability.
-Alternatively, you can work with the pre-prepared header `permeabilitypowerlaw.hh` in the folder `fluidmatrixinteractions`, in which only the calculations for updating the permeability are left to be modified.
-The equation of the Power Law is defined as:
-
-$`\displaystyle K = K_0 \left(\frac{\phi}{\phi_0}\right)^\eta`$
-
-```c++
- const Scalar exponent = getParam<Scalar>("PowerLaw.Exponent", 5.0);
-```
-
-```c++
- const Scalar factor = pow(poro/refPoro, exponent);
-```
-
-As a special feature, we would like the exponent $`\displaystyle \eta=5`$ to be a run-time parameter read from the input file, as this allows easy modification of the parameter and potentially fit it.
-This is useful, as field-scale porosity-permeability relations might be quite uncertain.
-Adapt the input file `params.input` accordingly.
-
-Finally, the header `permeabilitypowerlaw.hh` needs to be included in the spatial parameters header `biominspatialparams.hh` and the permeability law set to the new implementation of the Power Law.
-
-```c++
- PermeabilityPowerLaw<PermeabilityType> permLaw_;
-```
-
-Note: As both the Kozeny-Carman and the Power-Law relation use the same parameters, there is no need to change the permeability function calling `evaluatePermeability(refPerm, refPoro, poro)` in `biominspatialparams.hh`:
-
-```c++
- template<class ElementSolution>
- PermeabilityType permeability(const Element& element,
- const SubControlVolume& scv,
- const ElementSolution& elemSol) const
- {
- const auto refPerm = referencePermeability(element, scv);
- const auto refPoro = referencePorosity(element, scv);
- const auto poro = porosity(element, scv, elemSol);
- return permLaw_.evaluatePermeability(refPerm, refPoro, poro);
- }
-```
-
-What is the effect of the exchanged permeability calculation on the results, especially the leakage of CO<sub>2<sub>? What if the exponent would be smaller, e.g. $`\displaystyle \eta=2`$, which would mean that the precipitation is less efficient in sealing the leakage?
-You can again run two simulations and compare them side by side by creating two input files, or overwriting the input file parameter in the command line:
-```bash
-./exercise_biomin -Problem.Name biominPowerLawExponent2 -PowerLaw.Exponent 2.0
-```
-
-### 7. Use tabulated CO<sub>2</sub> values instead of SimpleCO2
-
-So far we have been using a simplified component for CO<sub>2</sub>, which is based on the ideal gas law. Due to the conditions present in this exercise this is not too inaccurate, but for real applications of CO<sub>2<sub> storage changes to the model are required. We use tabulated data for density and enthalpy of CO<sub>2<sub>, accessed through `GeneratedCO2Tables::CO2Tables` and `Components::CO2` from DuMu<sup>x</sup>.
-
-__Task:__
-
-The CO<sub>2<sub> component is used in the fluidsystem, which is defined in `properties.hh`. Replace the component `SimpleCO2` with `CO2` defined in `dumux/material/components/co2.hh`, with a CO<sub>2<sub> table as an additional template parameter. Use the the table defined in `dumux/material/components/defaultco2table.hh`, noting the different namespace. Take care to include the appropriate headers.
-
-```c++
-#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.
-```
-
-```c++
-template<class TypeTag>
-struct FluidSystem<TypeTag, TTag::ExerciseBioMin>
-{
-private:
- using Scalar = GetPropType<TypeTag, Properties::Scalar>;
- using CO2Impl = Components::CO2<Scalar, GeneratedCO2Tables::CO2Tables>;
- using H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>;
-public:
- using type = FluidSystems::BioMin<Scalar, CO2Impl, H2OType>;
-};
-```
-
-### Bonus: Paraview Magic: Compare different results using Programmable Filter
-
-In the last step, the manual comparison of the results can be quite difficult. Paraview offers the option to use programmable python filters. To use them, make sure that two result files with __different names__ are loaded. Mark both of them and click on `Filters --> Alphabetical --> Programmable Filter`. Now, a new field opens on the left side. Copy the following lines there:
-
-```python
-S_gas_0 = inputs[0].CellData['S_gas'];
-S_gas_1 = inputs[1].CellData['S_gas'];
-output.CellData.append(abs(S_gas_0-S_gas_1),'diffS_gas');
-```
-
-Click `Apply` and select `diffS_gas` as new output. You should now see the difference between the two result files. You can also change the output to a not absolute value by changing the last line to:
-
-```python
-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 2023-06-01 14:31:33.149062999 +0200
+++ exercises/solution/exercise-biomineralization/solidsystems/biominsolidphase.hh 2023-04-26 14:37:49.789150797 +0200
@@ -27,12 +27,12 @@
#include <string>
#include <dune/common/exceptions.hh>
-#include "../components/biofilm.hh"
+#include <dumux/common/parameters.hh>
#include <dumux/material/components/calcite.hh>
#include <dumux/material/components/granite.hh>
+#include "../components/biofilm.hh"
-namespace Dumux {
-namespace SolidSystems {
+namespace Dumux::SolidSystems {
/*!
* \ingroup SolidSystems
@@ -195,7 +195,6 @@
};
-} // end namespace SolidSystems
-} // end namespace Dumux
+} // end namespace Dumux::SolidSystems
#endif