Note: Also use the wrapper class `EffToAbsLaw`. It takes care of converting absolute to effective saturations considering residual saturations. `MyMaterialLaw`
Note: Also use the wrapper class `EffToAbsLaw`. It takes care of converting absolute to effective saturations considering residual saturations. `MyMaterialLaw`
as other material laws (like Brooks-Corey, VanGenuchten, ...) in DuMuX only deals with effective saturations.
as other material laws (like Brooks-Corey, VanGenuchten, ...) in DuMuX only deals with effective saturations.
Verify your changes by recompiling and running the program. You should see a plot of your new function.
*Verify your changes by recompiling and running the program. You should see a plot of your new function.
For the next task disable the plotting feature by changing the settings in the input file `exercise2.input`
For the next task, disable the plotting feature by changing the settings in the input file `exercise2.input`
DuMuX has many parameters that have default values. For example, per default all simulation consider gravity effects.
DuMuX has many parameters that have default values. For example, all simulations consider gravity effects by default.
You can disable gravity for a study, simply by setting the parameter in the input file
You can disable gravity for a study, simply by setting the parameter in the input file
```ini
```ini
...
@@ -108,7 +109,7 @@ EnableGravity = false
...
@@ -108,7 +109,7 @@ EnableGravity = false
Run the simulation with and without gravity. Change the `Problem.Name` parameter to create output files with different
Run the simulation with and without gravity. Change the `Problem.Name` parameter to create output files with different
names. Compare the results using paraview. You should immediately see the difference.
names. Compare the results using paraview. You should immediately see the difference.
A list of parameters that can be set through the input file are given [here](http://www.dumux.org/doxygen-stable/html-2.11/a06387.php).
A list of parameters that can be set through the input file is given [here](http://www.dumux.org/doxygen-stable/html-2.11/a06387.php).
<hr><br><br>
<hr><br><br>
...
@@ -142,7 +143,7 @@ MyTwoPTwoCLocalResidual()
...
@@ -142,7 +143,7 @@ MyTwoPTwoCLocalResidual()
* Verify you are using the new class by compiling and running the new program and inspecting the terminal output.
* Verify you are using the new class by compiling and running the new program and inspecting the terminal output.
You want to make the new local residual special by adding a switch enabling / disabling diffusion. We will achieve this with a DuMuX parameter, a parameter read from the input file that defaults to a property value if the input file doesn't contain the parameter.
You want to make the new local residual special by adding a switch enabling / disabling diffusion. We will achieve this with a DuMuX parameter which is read from the input file and defaults to a property value if the input file doesn't contain the parameter.
* Create a new `TypeTag` node, a new `PropertyTag`, and set a default in the `mylocalresidual.hh` file by adding
* Create a new `TypeTag` node, a new `PropertyTag`, and set a default in the `mylocalresidual.hh` file by adding
...
@@ -193,6 +194,8 @@ You can now enable and disable diffusion through the input file
...
@@ -193,6 +194,8 @@ You can now enable and disable diffusion through the input file
EnableDiffusion=true / false
EnableDiffusion=true / false
```
```
Verify the difference in the parameter $`x_w^{N2}`$, i.e. the mole fraction of nitrogen in the
* Verify the difference in the parameter $`x_w^{N2}`$, i.e. the mole fraction of nitrogen in the
water phase, with and without diffusion. Note that due to diffusion being a slow process you
water phase, with and without diffusion.
Note that due to diffusion being a slow process you