Testing¶
In AvaFrame we provide a continuously growing test suite. This includes tests that target model verification and model validation. The former are used to test the numerical implementation of the mathematical model, whereas the latter are aiming at testing if the mathematical model employed is appropriate to describe the physical processes of the desired application, in our case the simulation of dense snow avalanches.
In the following, a brief description of the available tests is given.
Note
This section is currently under development and will be updated regularly.
Note
See this example pdf (25mb) how we apply these tests during development.
Tests for model verification¶
This section includes testing of bits and pieces of the model code up to tests that check whether the full workflow is numerically robust. However, at the ‘smallest scale’, where individual functions are tested, we also refer to the Section about pytests: How to test code.
Rotational Symmetry¶
In this test, a pyramid-shaped topography is used to test whether different grid alignments in respect to the topography and hence flow direction cause problems for the model implementation. For this test, we simply provide two pyramid shaped topographies, where one is rotated around the z-axis to change the orientation of the pyramid’s facets with respect to the mesh.
Dambreak problem¶
This test is based on a Riemann problem, where the initial condition is described by two different states that are separated by a discontinuity.
In [FM13] exact solutions are derived for this problem, based on the Savage-Hutter model to describe the granular flow.
Here, we provide an implementation of one of the seven cases presented in [FM13].
In Test 2, the initial velocity is zero and a granular mass is suddenly released and flows downslope.
For further details have a look at the module ana1Tests.damBreak
and the Section moduleana1Tests:Dambreak.
Similarity Solution¶
This test makes use of semi-analytic solution of a sliding granular mass on an inclined plane.
In [HSSN93] the semi-analytic solution is derived for this problem, based on the Savage-Hutter shallow flow
model to describe the granular flow.
Here, we provide an implementation of the similarity solution and compare
it to the output of a numerical simulation.
For further details have a look at the module ana1Tests.simiSol
and the Section Similarity solution.
Tests for model validation¶
In this section, tests that check whether the chosen mathematical model is suitable to represent the problem at hand can be found. Currently, we provide idealized and real-world topographies that can be used for avalanche simulations. Additionally, there are several functions that can be used to analyse the simulation results and compare them to other data such as results from other models or observations. For this, we refer to Sections ana3AIMEC: Aimec and outQuickPlot.
Idealized test cases¶
We provide a range of idealized topographies to perform avalanche simulations including different release area scenarios. Some of the topographies also
include entrainment and/or resistance areas. These can be found in data/NameOfAvalanche
. The functions to produce these can be found in
module in3Utils/generateTopo.py
.
Flat Plane - FP¶
