Numerical models for dense snow avalanches have become central to hazard zone mapping
and mitigation. Several commercial and free applications, which are used on a
regular basis, implement such models. In this study we present a tool based
on the open-source toolkit OpenFOAM^{®} as an
alternative to the established solutions. The proposed tool implements a
depth-integrated shallow flow model in accordance with current practice. The
solver combines advantages of the extensive OpenFOAM infrastructure with
popular models from the avalanche community. OpenFOAM allows assembling
custom physical models with built-in primitives and implements the numerical
solution at a high level. OpenFOAM supports an extendable solver structure,
making the tool well-suited for future developments and rapid prototyping. We
introduce the basic solver, implementing an incompressible, single-phase
model for natural terrain, including entrainment. The respective workflow,
consisting of meshing, pre-processing, numerical solution and
post-processing, is presented. We demonstrate data transfer from and to a
geographic information system (GIS) to allow a simple application in
practice. The tool chain is based entirely on open-source applications and
libraries and can be easily customised and extended. Simulation results for a
well-documented avalanche event are presented and compared to previous
numerical studies and historical data.

Numerical avalanche modelling has become an important and well-accepted
ingredient in hazard zone mapping. All popular tools rely on depth-integrated
flow models

Beside improvement of the underlying mechanical model, various physical
processes have been added to governing equations, such as multiple phases

In this work, we strictly distinguish between a mechanical model and process models. The mechanical model consists of basic conservation equations and their reformulation, e.g. in terms of depth integration. Process models, on the other hand, describe the closure of governing equations, for example with constitutive models. The combination of the mechanical model and all closures is called flow model or physical model throughout this work.

There are several numerical methods to solve the respective mathematical
equations. Basically, most methods can be classified as finite-difference
methods

Shallow granular flow models have been carefully validated over the last few
decades. This includes back-calculations of small-scale experiments

Shallow flow models gained popularity through commercial software packages:
DAN

Geographic information systems (GISs) are commonly applied in hazard zone mapping. Therefore numerical simulation tools are usually incorporated or linked to these systems to streamline the respective workflow. GIS allows user-friendly data input, post-processing and the production of publication-quality maps.

Recently, ^{®}

One particular advantage of an OpenFOAM solver is the well-designed, object-oriented source code. This makes the code cleaner than comparable solutions as it hides implementation details, such as numerical schemes, input/output or inter-process communication, behind well-defined interfaces. The top-level solver mimics the tensorial notation of partial differential equations, and specific implementations of, for example, interpolation schemes, are exchangeable without changing the top-level source code. This enables the separation of physical models and numerical solution, which allows a streamlined interdisciplinary development process. Process models, e.g. of entrainment and basal friction, can be incorporated similarly, keeping the source code clean and easy to extend.

The OpenFOAM solver, presented here, implements an incompressible
single-phase model including various basal friction and entrainment closures.
The solver is called faSavageHutterFoam, indicating that the
underlying mechanical model is similar to the one of

The purpose of this paper is to present the capability of the new OpenFOAM
solver and the

Historically, shallow granular flow models have been set up in
surface-aligned, curvilinear coordinates, leading to a two-dimensional system
of partial differential equations

Definition of velocity

A basic shallow granular flow
model can be written in terms of surface partial differential equations
as

Multiplications between vectors represent the outer product

Equations (

Equation (

In the framework of SPDEs, the normal vector field

There are various user-selectable models, describing basal friction

The entrainment rate is calculated, based on an empirical erosive entrainment
model, as

The governing equations are solved with an implicit, conservative,
finite-area method

As mentioned before, OpenFOAM utilises capabilities of C++ to make top-level
source code appear similar to the tensor notation of partial differential
equations. The conservation equation (Eq.

We use an established implementation of the same flow model, SamosAT (version
2017_07_05)

We compare simulations using the

In addition to the comparison with a reference implementation, we present a comparison with historical records from a catastrophic event. A common method to document avalanches is the delineation of deposition. This information is also available for the presented case study. Deposition processes are not explicitly included in the flow model due to depth integration. However, the general form and size of the deposition should be reproduced by the model to be useful for hazard zone mapping. This is problematic in some implementations, e.g. SamosAT, due to missing regularisation of the friction term, but it is possible with the proposed method.

We apply model parameters (

Finally, we evaluate OpenFOAM simulations with regard to convergence during
mesh refinement to give a quantitative estimation of numerical uncertainties
as recommended by

The precondition to conduct simulations in OpenFOAM is a mesh, describing the geometry of the problem. For SPDEs, e.g. shallow flow models, a surface mesh, matching the slope topography, is sufficient and no volume mesh is required. In practice, however, three-dimensional meshing tools can be used to create a volume mesh, the boundary of which can be used as surface mesh.

Simulation set-up and tool chain. The tool chain consists
exclusively of open-source applications. Individual applications and process
models can be replaced with custom ones. Parameters for python scripts are
provided via a command line interface. Parameters for OpenFOAM applications
are provided through OpenFOAM dictionaries. Domain decomposition and
reconstruction, which is handled by separate applications, is not shown.
OpenFOAM reads initial conditions from the folder “0” and writes results to
folders named after the corresponding time step (“1”, “2”, etc.). Details
on OpenFOAM formats can be found in

Topography is usually available as a digital elevation model (DEM) in GIS
formats, yielding elevation on a regular two-dimensional grid. The relevant
part of the topography is re-sampled with cubic splines, triangulated and
stored as an STL file

The release area, acting as an initial condition, is provided as a polygon in
an ESRI shape file format

Meshing tool chain: the terrain data are usually available as raster
data

Time series of an OpenFOAM simulation with mean cell size

The solver reads the surface mesh and initial conditions, as well as physical
models, numerical schemes and constants to initialise the simulation (see
Fig.

User-defined friction and entrainment models can be loaded at run-time, meaning that the user does not have to recompile the solver to add a custom friction or entrainment model. The same is the case for general purpose functions which are triggered at the end of every time step. Here, we used this interface to calculate and record the dynamic peak pressure at run-time, without the necessity to save multiple time steps or to change solver source code. Similar functions can be used to check mass, momentum or energy conservation, record specific data (e.g. time line at a certain point), or to manipulate fields during run-time, e.g. to trigger secondary slabs.

Simulation results are written to hard disk in the usual OpenFOAM file format

Post-processing and visualisation of OpenFOAM simulations is commonly
performed using ParaView^{®}

Perspective view on the OpenFOAM simulation with mean cell size

The flow thickness field

To generate regular raster files, the unstructured OpenFOAM mesh and
associated fields have to be mapped to a structured Cartesian grid
(Figs.

In this work we focus on the Wolfsgruben avalanche. The event from
13 March 1988, when the avalanche struck inhabited areas, has been repeatedly
used as benchmark for avalanche simulations, most recently by

The mountain snow cover thickness for the specific event can be described
with the parameters

Numerical parameters for OpenFOAM

SamosAT utilises a grid with

ParaView renderings are presented in Fig.

The results at time step

The influence of the mesh resolution on the affected area is shown in
Fig.

Mesh size, runout, error estimation and execution time for different OpenFOAM simulations. Base cell size and refinements refer to parameters of cfMesh.

Deposition (i.e. flow thickness field

Comparison of OpenFOAM first order (blue, dashed), OpenFOAM second
order (blue), SamosAT SPH 0 (red, dashed) and SamosAT SPH 1 (red) in terms of

Mesh refinement and convergence study for the OpenFOAM solver. Four
mesh sizes and both interpolation schemes, first-order upwind (dashed line)
and second-order Gamma (solid line) have been evaluated. The central
avalanche path from

Flow thickness field

Results of the new OpenFOAM solver are very similar to SamosAT. Differences
between SamosAT and OpenFOAM are in the range of numerical uncertainty, and
differences between interpolation methods are of a comparable size. This
uncertainty has to be expected; in fact, it is well known in the CFD
community that numerical schemes and implementation details influence results
if they are not converged to the analytical solution

The refinement study shows that in the presented case, the simulated runout
reduces with increasing mesh refinement (Fig.

The execution time of the OpenFOAM solver is acceptable for coarse meshes but
increases with the square of the number of cells because the time step
duration has to be reduced similarly to cell size. The OpenFOAM solver is
noticeably slower than SamosAT, especially when considering OpenFOAM's
multiprocessing capabilities. For applications where fast execution is
imperative, such as parameter studies, SamosAT may be the appropriate choice.
There is potential for future optimisation in OpenFOAM; in particular, the
implicit time integration scheme is expensive and should be replaced with a
simpler explicit one. However, the implicit solution strategy, in combination
with the regularised friction relation, leads to satisfying behaviour in the
runout zone. In contrast, the simple explicit solution strategy, for example
from SamosAT, leads to a continuous creeping of the deposition, meaning that
the final flow thickness cannot be compared with the deposition, as noted by

The stability of the OpenFOAM solver is strongly influenced by mesh quality.
Simulations with polygonal-dominated surface meshes showed an acceptable
stability for first- and second-order interpolations. The high influence of
the three-dimensional mesh on stability and its computationally expensive
creation is the main drawback of the proposed method. This is, however, also
a big advantage, allowing simple coupling with three-dimensional ambient
flows, as conducted by

This paper shows the application of a finite-area scheme for shallow granular
flows

Various simulations with the new OpenFOAM solver have been conducted. Methods and tools to incorporate the OpenFOAM solver in GIS have been presented. These tools allow the integration of OpenFOAM in hazard mapping workflows and thus the validation of the OpenFOAM solver with a reference implementation, herein SamosAT.

The application of three-dimensional Cartesian coordinates allows simple
coupling with GIS applications because no coordinate transformations are
required. Unstructured meshes, on the other hand, require re-sampling to
structured meshes or data transfer in the form of polygons. This incorporates
an additional effort compared to simulations on structured meshes, as
conducted for example by

The OpenFOAM solver roughly reproduces the results of SamosAT. Differences are within the expected numerical uncertainty. A comparison of numerical results to a documented event suggests that model uncertainty is substantially higher than numerical uncertainties.

The major advantage of OpenFOAM is the object-oriented open-source code, which can be extended easily. The flexible code structure allows fast application of new models to real case examples. This especially qualifies the proposed method for model development and academic purposes. Moreover, the vast majority of source code is shared within the OpenFOAM community, leading to faster development of core features and higher code quality.

The finite-area scheme allows a description in terms of surface partial
differential equations

Future steps will incorporate the
optimisation of the solver in terms of stability and execution time. Mesh
generation and the integration of geographic information systems will be
further streamlined. The limitation to mildly curved terrain should be
eliminated, as this assumption is violated in many practical cases. We aim to
implement more complex models, suitable for mixed snow avalanches

The OpenFOAM solver, core utilities and the case study
presented are available in the OpenFOAM community repository
(

Here we briefly explain the concept of projections within the framework of
surface partial differential equations. These projections are widely used in
computational fluid dynamics, usually when surfaces in three-dimensional
space are considered. We do not focus on mathematical formalities and this
section cannot replace the formal derivation of

Splitting gravitational acceleration into a surface-tangential and
surface-normal part with simple projections to the surface-normal vector

We begin by splitting a simple vectorial entity, the gravitational
acceleration

Splitting the divergence of a flux tensor

The same concept can be applied to fluxes through the boundary of the control
volume, leading to the concept of surface partial differential operators
(

The supplement related to this article is available online at:

MR developed the model and the respective code. Simulations have been conducted by MR and AK. AH covered GIS aspects and the production of respective figures. WF conceived the presented investigation, verified the underlying analytical models and supervised the project. All authors discussed the results and contributed to the final paper.

The authors declare that they have no conflict of interest.

We thank Mark Olesen and Andrew Heather (ESI-OpenCFD) for help regarding OpenFOAM and a review of our solver code. We thank Matthias Granig and Felix Oesterle (WLV) for support regarding SamosAT and for providing the respective software. We thank our colleges, Iman Bathaeian, Jan-Thomas Fischer and Fabian Schranz, for valuable comments on the manuscript. We thank the OpenFOAM, ParaView and QGIS communities for sharing their code and providing helpful advice. We further thank Stefan Hergarten, Julia Kowalski and one anonymous reviewer for their valuable comments, which helped to increase the clarity and quality of this paper. We gratefully acknowledge the financial support of the OEAW project “Beyond dense flow avalanches” and the Vice Rectorate for Research at the University of Innsbruck. The computational results presented have been achieved (in part) using the HPC infrastructure LEO of the University of Innsbruck. Edited by: Simone Marras Reviewed by: Julia Kowalski, Stefan Hergarten, and one anonymous referee