PetraSim – A shallow geothermal model with pipe flow

We recently had a customer request for some help with a shallow geothermal model. I thought it would be interesting to show one approach to simulating fluid flow in tubes (pipes) with heat conduction into the surrounding soil.

When I first saw this problem, I thought that PetraSim (TOUGH2) might not be the best code for the solution. The pipe geometry would need to be approximated and if conduction is the dominant mechanism in the soil, there might be other codes that could do a good job. However, PetraSim (TOUGH2) does offer some unique advantages to simulate complex heat transfer in the soil, including the potential heat transport due to groundwater flow.


A schematic of the problem is show below. Shallow wells (about 40 m depth) are dug and U-shaped pipes inserted into each well. The tubes in each well are close together, with flow down one tube and up the adjacent tube. Each well is connected by horizontal tubing. Flow enters the connected system and then is either cooled or heated by heat transfer to the soil.



One challenge of the simulation is how to model the flow in the tubes, which is separated from the flow in the soil. The first approach was to represent the tube walls using impermeable material and then have high porosity material inside the tubes for the pipe flow and a normal soil model outside the tubes. This led to some very small cells and related convergence problems.

However, TOUGH2 does allow permeabilities to be anisotropic and specified in the X, Y, and Z directions. So it is possible to simulate flow in a tube by only allowing flow along the axis of the tube, while still including heat transfer normal to the axis of the tube.

To test this approach, we made a model of two U-tube wells. The model took advantage of symmetry and we radially refined the cells near the tubes to capture the radial heat transfer from the tubes to the soil.

petrasim model


We used different materials to represent the vertical tubes, the horizontal tube, and the impermeable caps required at the tube joints.

bottom permeabilities

top permeabilities


The initial temperature was 25 C and the injected water was at 84 C. The flow rate was 0.1 kg/s. After one year, we calculated the following temperature contours.

temp contours at one year


If we zoom in, we can see the flow does indeed go down one tube and up the adjacent tube.

flow vectors


A plot of the inlet and outlet temperatures shows the amount of heat stored in the soil.

Inlet and outlet temps


Several analytic solutions are available that are relevant to this problem. Standard analytic solutions are available for 1D planar and radial transient heat conduction from a surface. A less well-known solution for flow on a planar fracture with coupled heat conduction normal to the fracture is provided by Carslaw and Jaeger (Conduction of Heat in Solids, Second Edition, Oxford at the Clarendon Press, Chapter 15).

A corresponding corrected Carslaw-Jeager solution for cylindrical geometry has been developed by Arriaga and Samaniego (PROCEEDINGS, Twenty-Fourth Workshop on Geothermal Reservoir Engineering, Stanford University, Stanford, California, January 25-27, 1999, SGP-TR-162, “A PRACTICAL SOLUTION FOR THE TRANSIENT RADIAL-VERTICAL HEAT CONDUCTION IN GEOTHERMAL WELLS,” Mario César Suárez Arriaga and Fernando Samaniego V.)

We had previously developed a spreadsheet for the Carslaw-Jeager planar fracture, so used that to validate our approach with a 2D coupled flow/heat conduction model. We did not validate using the Arriaga-Samaniego solution for radial geometry, but our results are consistent with the expected behavior and we leave that exercise to the user.

More Tutorials Like This

See all PetraSim tutorials