Herein, we introduce

High-temperature hydrothermal circulation through the ocean floor plays a key role in the exchange of mass and energy between the solid earth and the global ocean

In the last few decades, significant progress has been made in hydrothermal flow modeling both theoretically and numerically

Current numerical simulators of hydrothermal flow can be divided into two families: (1) multiphase codes that thrive towards resolving saltwater convection and associated phase separation phenomena and (2) single-phase hydrothermal codes that focus on sub-critical low-temperature fluid flow and/or super-critical high-temperature flow of pure water, i.e., codes that only “work” within single-phase fluid states. Multiphase saltwater codes are at the forefront of what is currently feasible in numerical simulations, as accounting for the complexity of the equation-of-state (EOS) of seawater

Interestingly, even single-phase models are not that easily accessible to the hydrothermal community. Many research groups maintain 2-D research codes that resolve hydrothermal flow but single-phase 3-D models continue to be rare. To our knowledge there are basically three single-phase code families that are routinely used in 3-D studies ^{®}

The paper is organized as follows. In Sect.

Definitions and values of variables used in this study.

We use a continuum porous media approach and describe creeping flow in hydrothermal circulation systems using Darcy's law, where the Darcy velocity of the fluid is given by

We solve for pressure (Eq.

To apply the finite-volume method, the advection term (the second term on the right-hand side) in the temperature Eq. (

Phase diagram and density of pure water in temperature–pressure space. Red dot denotes supercritical point. The supercritical fluid region is outlined by critical pressure and critical temperature lines and is divided by critical density isoline into liquid-like fluid and vapor-like fluid. Three solid curves in different colors represent pressure-temperature path of 1-D benchmark examples shown in Fig. 4a, c, and e, respectively.

To determine the time step, we adopt the limitation related to the Courant number

To solve the pressure and temperature equations, we have to impose suitable boundary conditions for

The hydrothermal heat flux (

Numerical solutions of hydrothermal flow are known to strongly depend on the used thermodynamic properties of the simulated fluid. A series of studies using realistic thermodynamic properties of pure and salt water, rather than making a Boussinesq approximation or using linearized properties, have shown that realistic results depend critically on using a realistic EOS

Schematic of the sequential algorithm.

The governing equations of pressure and temperature are solved in a sequential approach. The primary variables (pressure and temperature) and transport properties (such as permeability, porosity, etc.) have to be initialized before the time loop, and then the initial Darcy velocity and thermodynamic properties of fluid can be updated according to the temperature and pressure fields. The main computational sequence for a single time step is described below and sketched in Fig.

Implementation of temperature Eq. (

Implementation of pressure Eq. (

The time step size

Temperature field

The pressure field

The velocity field is calculated explicitly using the latest pressure field based on Darcy's law (Eq.

Thermodynamic properties of fluid are updated by the thermo-physical model after solving the temperature and pressure field.
The implementation code snippet is shown in Listing

Implementation of Darcy velocity calculation with OpenFOAM (in

Update of fluid thermodynamic properties (in

Since the numerical evaluation of the divergence and gradient terms in the governing equations has great influence on heat and mass transfer, a suitable solution strategy regarding discretization and linear solver schemes needs to be chosen to ensure accuracy, robustness, and stability. In the presented solver

The organization of the

Structure and components of the

We provided two options for installation: one is building from source and the other is using a pre-compiled docker image.

The

Once OpenFOAM is built successfully,
the source code of

In order to use all the tools directly without any compiling and development skills,
we have published a pre-compiled Docker^{®} image in a repository at

Install Docker, then open Docker and keep it running.

Pull the docker image by using command of

Install a container from the docker image by running a shell script, e.g., Unix shell script, shown in Listing

Start the container by running the command

Attach the container by running the command ^{®}, Tecplot^{®}, or other software.

Script for installing a container from the

The basic directory structure for a

Case directory structure of the

The mesh information containing boundary patches definitions, cell face indices, and connections is located in the

Much of the input–output data in

Main keywords used in field dictionary files.

The required input field data of

Example dictionary file for temperature field

The

The

The discretization schemes for primary variables in the PDEs (partial difference equations)
and solver for linear equations
are specified in

We have conducted a number of one-dimensional (1-D), two-dimensional (2-D), and three-dimensional benchmark tests and compared the results to other established software packages to validate

We conducted six 1-D simulations to test the code performance along the three

Model parameters of 1-D benchmark examples.

Simulation results of the six 1-D examples are shown in Fig.

Snapshots of one-dimensional benchmark examples in horizontal

The two-dimensional models are performed on a rectangular domain with a length of 9 km in the

Mesh and model configuration of the two-dimensional examples.

The simulation results are shown in Fig.

Snapshots of two-dimensional examples. Contour lines for fluid pressure (blue) and temperature (red) calculated from

Similar to the two-dimensional model in Sect.

The simulation results at 50 kyr are shown in Fig.

Snapshots of three-dimensional model results. Contour lines for fluid pressure (blue) and temperature calculated from

The heterogeneous model with two-layer permeability structure is modified from the homogeneous model described in Sect.

Results of three-dimensional model with two-layer permeability structure. Two layers are separated by the dashed green line. Contour lines for fluid pressure (blue) and temperature calculated from

In addition to the presented benchmarks, we have added a number of cookbooks to the code repositories that can be used as starting points for more complex models. These include simple 2-D and 3-D box models, 2-D single-pass loop models, and time-dependent permeability models. They also include examples of how to use more complex meshes generated by Gmsh

We have presented a toolbox for simulating flow in submarine hydrothermal circulation systems. Being based on the widely used fluid-dynamic simulation platform OpenFOAM, the toolbox provides the user with robust parallelized 3-D solvers and a whole suite of pre- and post-processing tools. The toolbox is meant to provide the interdisciplinary submarine hydrothermal systems community with an accessible and easy-to-use open-source platform for testing ideas on how hydrothermal systems “work”. The benchmark tests have shown that model matches previously published models and that the cookbooks provide the user with starting points for building more sophisticated models. By following an open-source approach and by providing extensive code documentation, we hope that the presented model will facilitate integrative studies that combine models with data to better assess the role of submarine hydrothermalism in the Earth system.

Example of

Example of

Program title: HydrothermalFoam.

Source code repository on GitLab:

DOI of the source code:

Pre-compiled Docker image on Docker Hub:

Quick-start tutorial video:

Source code documentation:

Online manual:

Licensing provision:

Programming language: C++.

Nature of problem: seafloor hydrothermal circulation.

Solution method: The numerical approach is based on the finite-volume method (FVM).

The supplement related to this article is available online at:

ZG, LR, and CT designed the project. ZG developed the source code, ran simulations, and wrote the paper. LR provided suggestions for the benchmarks and co-wrote the paper and manual. CT provided further suggestions for the manuscript and the model. All authors discussed and contributed to the final paper.

The authors declare that they have no conflict of interest.

We would like to thank the reviewers Cyprien Soulaine, Matteo Cerminara, and Rene Gassmoeller for their helpful and constructive comments. Special thanks also go to the topical editor Thomas Poulet for his professional handling of the manuscript.

This research has been supported by the National Key R&D Program of China (grant nos. 2018YFC0309901, 2017YFC0306603, 2017YFC0306803, and 2017YFC0306203), the COMRA Major Project (grant nos. DY135-S1-01-01 and DY135-S1-01-06), and the German Science Foundation (DFG) (grant no. 428603082). The article processing charges for this open-access publication were covered by a Research Centre of the Helmholtz Association.

This paper was edited by Thomas Poulet and reviewed by Cyprien Soulaine, Matteo Cerminara, and Rene Gassmoeller.