Exercise 2
Ok, time to put our new knowledge to work! Let’s explore a more realistic case and investigate how a more permeable fault zone can deviate hydrothermal upflow. You can find background on such a setup in [Andersen et al., 2015].
Steps
check all settings and modify model run time so that the plume arrives at the surface
modify (or create) a
setFieldsDict
to create the permeability structure.use a function called
rotatedBoxToCell
to set the permeability structurerun the case and explore how the results change for different fault widths and permeability contrasts.
Step 1
Copy the $HOME/hydrothermalfoam-master/cookbooks/2d/Regular2DBox/
into your working directory.
cd $HOME/HydrothermalFoam_runs
cp -r /home/openfoam/hydrothermalfoam-master/cookbooks/2d/Regular2DBox/ ./Fault_zone_2D
Step 2
Now modify the case and setup the permeability structure. It should look like this:

Fig. 37 Permeability structure of our detachment fault example cause.
We can use the rotatedBoxToCell
function in the setFieldsDict
for this. Check the openfoam documentation !
Tip
It’s all about rotating the coordinate system to figure out the origin and i,j,k vectors for rotatedBoxToCell
!

You can use the #calc
macro that we already used in the very first lecture to do the rotation. The setFieldsDict
should contain line like this:
// define variables
// origin of rotated box
X0 750;
Y0 -2800;
Z0 0;
width 100; //width of fault zone
height 800; // distance to surface of box
angle 60; // degrees, counter-clockwise angle between x-axis and fault
// Example using #calc macro
angleRadians #calc "degToRad($angle)"; // Convert angle to radians
// input for rotatedBoxToCell
i0 ???;
i1 ???;
i2 ???;
j0 ???;
j1 ???;
j2 ???;
regions
(
rotatedBoxToCell
{
origin ( ? ? ?);
i ( ? ? ?);
j ( ? ? ?);
k ( ? ? ?);
fieldValues
(
volScalarFieldValue permeability 1e-13
);
}
);
Step 3
Explore the results in paraview! And investigate how the results change for different fault widths and permeability contrasts.

Fig. 38 Hydrothermal flow along a preferential pathway.
Tip
Run many simulations for different fault widths and permeabilities
Explore how vent temperature changes
…and when the plume is captured by the fault!