Path: blob/devel/elmerice/Solvers/Documentation/AdvReactDensity.md
3206 views
Solving the Mass Conservation of Snow/Firn
General Description
This page explains how to use the general AdvectionReactionSolver from the Elmer distribution to get the density evolution in case of a compressible material (snow/firn) under a given velocity field computed from the Porous Solver. The AdvectionReactionSolver solves the general equation
{{\partial A}/{\partial t}} + div (A u) + gamma A=sigma
where u is the velocity vector. In the particular case of the mass conservation equation, one has therefore gamma = 0 and sigma = 0. Solving for the true density (kg/m^3) or the relative density is equivalent (but limit values and Dirichlet boundary conditions have to be set accordingly).
Note 1: equation (4.1) in the Elmer Model Manual for the AdvectionReaction solver is not correct. The previous equation is the one implemented.
Note 2: Have a look to this post on the Elmer Forum regarding the initialisation of both the DG primary and exported variables of the AdvectionReaction solver (see the example at the end of this page).
SIF contents
The Solver section looks like:
The source in case of the mass conservation equation is 0
Initial and boundary conditions are then being set for the DG variable and not the exported one!
The Material section contains a zero reaction rate as well as the upper/lower limit for the DG variable
Examples
A 1D example build from an analytical solution can be found in [ELMER_TRUNK]/elmerice/Tests/Density. In that case, the velocity and density are inversely proportional (u(z) = K/D(z)).
A 3D example coupling the Porous Solver and the calculation of the density field can be found in [ELMER_TRUNK]/elmerice/Tests/DGsolver.