# RichardsFoam3: A new version of RichardsFoam for continental surfaces hydrogeology modelling

Laurent Orgogozo

► To cite this version:

Laurent Orgogozo. RichardsFoam3: A new version of RichardsFoam for continental surfaces hydrogeology modelling. Computer Physics Communications, 2022, 270, 316, p. 41-58. 10.1016/j.cpc.2021.108182. insu-03661495

HAL Id: insu-03661495

https://insu.hal.science/insu-03661495

Submitted on 7 May 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# RichardsFoam3: A new version of RichardsFoam for continental surfaces hydrogeology modelling ⭐

Laurent Orgogozo

GET (Géosciences Environnement Toulouse), Observatoire Midi-Pyrénées, Université Paul Sabatier - Toulouse III, Université de Toulouse, 14 avenue Edouard Belin, 31400 Toulouse, France

<figure><img src="image_2.png" /></figure>

## ARTICLE INFO

Article history:

Received 7 September 2021

Received in revised form 17 September 2021

Accepted 22 September 2021

Available online 25 September 2021

Keywords:

Richards equation

OpenFOAM®

Hydrogeological modelling

Infiltration

Exfiltration

## ABSTRACT

RichardsFoam3 is an updated version of the OpenFOAM® solver RichardsFoam, previously presented in "An open source massively parallel solver for Richards equation: Mechanistic modelling of water fluxes at the watershed scale" by L. Orgogozo, N. Renon, C. Soulaine, F. Hénon, S.K. Tomer, D. Labat, O.S. Pokrovsky, M. Sekhar, R. Ababou, M. Quintard (Comput. Phys. Commun. 185 (2014) 3358-3371, https://doi.org/10.1016/j.cpc.2014.08.004), and in the new version announcement "RichardsFOAM2: a new version of RichardsFOAM devoted to the modelling of the vadose zone" by L. Orgogozo (Comput. Phys. Commun. 196 (2015) 619-620, https://doi.org/10.1016/j.cpc.2015.07.009).

This new version includes improvements of memory handling and of on-the-fly control of computations, a better integration in the OpenFOAM® framework, simplifications of the coding of some expressions, as well as new advanced boundary conditions. All together these developments allow to enhance the ease of application of the code to continental surfaces hydrogeology modelling, its computational performances and its readability.

The description of the elements contained in this release may be found in the readMe file.

Please note that you may also find RichardsFoam3 on the hydrology page of the develop.openfoam.com interface:

https://develop.openfoam.com/Community/hydrology/

### New version program summary

Program title: RichardsFoam3

CPC Library link to program files: https://doi.org/10.17632/vkr7sd6fhb.1

Developer's repository link: https://develop.openfoam.com/Community/hydrology/

Licensing provisions: GPLv3

Programming language: C++

Supplementary material: The full system of equations solved by RichardsFoam3 is presented in the documentation directory of the RichardsFoam3 package, with a numbering that is used in the comments of the main source file RichardsFoam3.C of the solver RichardsFoam3, in order to identify which lines of code are related to which equation.

Journal reference of previous version: Comput. Phys. Commun. 196 (2015) 619-620

Does the new version supersede the previous version?: Yes

Reasons for the new version: Introducing new functionalities and implementing improvements for ergonomy, computational performances and readability

Summary of revisions: The new features compared to RichardsFOAM [1] and RichardsFoam2 [2] are the following:

(i) better handling of memory use during computation;

(ii) possibility of on-the-fly modification of the control parameters of the linearisation procedure;

(iii) new boundary conditions to be compiled along with the solver itself, and dedicated to the simulation of rain infiltration (rainFallFlux) or no infiltration (noFlux) conditions while allowing exfiltration with OpenFOAM® stand-alone (i.e. without mandatory use of swak4foam as it was the case in RichardsFoam2 [2]);

(iv) Computation of the field of piezometric head along computation. NB: in the demonstration cases, a way to implement a constant piezometric head boundary conditions with OpenFOAM is proposed.

<footnote>☆ The review of this paper was arranged by Prof. J Ballantyne.</footnote>

<footnote>E-mail address: laurent.orgogozo@get.omp.eu.</footnote>
(v) new functions that allow to build seasonally variable boundary conditions easily;

(vi) use of postprocessing procedures with OpenFOAM® stand-alone (i.e. without mandatory use of swak4foam as it was the case in RichardsFoam2 [2]);

(vii) several other minor rewritings/cleanings of the code.

*Nature of problem:* This software solves the non-linear three-dimensional transient Richards equation, which is a very popular model for water transfer in variably saturated porous media (e.g.: soils). It is designed to take advantage of the massively parallel computing performance of OpenFOAM®. The goal is to be able to model natural hydrosystems on large temporal and spatial scales.

*Solution method:* A mixed implicit (FVM in the object oriented OpenFOAM framework) and explicit (FVC in the object oriented OpenFOAM® framework) discretization of the equation with a backward time scheme is coupled with a linearization method (Picard algorithm). Due to the linearization loop the final solution of each time step tends towards a fully implicit solution. The implementation has been carried out with a concern for robustness and parallel efficiency.

References

[1] L. Orgogozo, N. Renon, C. Soulaine, F. Hénon, S.K. Tomer, D. Labat, O.S. Pokrovsky, M. Sekhar, R. Ababou, M. Quintard, An open source massively parallel solver for Richards equation: mechanistic modelling of water fluxes at the watershed scale, Comput. Phys. Commun. 185 (2014) 3358-3371, https://doi.org/10.1016/j.cpc.2014.08.004.

[2] L. Orgogozo, RichardsFOAM2: a new version of RichardsFOAM devoted to the modelling of the vadose zone, Comput. Phys. Commun. 196 (2015) 619-620, https://doi.org/10.1016/j.cpc.2015.07.009.

© 2021 The Author. Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).

**Declaration of competing interest**

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

**Acknowledgements**

The author acknowledges the help of ESI Group - OpenCFD Ltd, and especially of Mark Olesen, for the set up of this new version of RichardsFoam. This work benefited from the funding of the French National Agency for Research ANR - grant ANR-19-CE46-0003-01 (HiPerBorea project hiperborea.omp.eu).