Understanding the behaviour of pollutants in aquifers is a common issue we have to face as hydrogeologists. Numerical models are useful tools that allow us to predict the displacement and evolution of the pollutants in the subsurface. For this modelling task we usually use well-known software, but we find important keeping simple approaches in mind since they can be useful for learning about numerics insights and physics understanding.
To this end, we have developed a simple python program to compute the Advection-Diffusion equation (Bear, 1972) with first order decay and degradation chain [Eq.1] in 1 dimension using finite differences. This has been applied to simulate the nitrification chain, the degradation of ammonium generates nitrite and this specie when degrades produces nitrate. (NH4+→NO2−→NO3−).
Description
The system modelled is represented by the following partial differential equations:
Here, a is the fluid velocity (water in the studied case) (m/s), D is the diffusion coefficient (m2/s) and λi is the half-time of the i species where 1 refers to NH4+, 2 is NO2− and 3 is NO3+.
Obtained results (Figure 1) have been validated by comparing with the analytical solutions reported by (Cho et al. 1971).
Numerical solution
Previous to the finite differences scheme development, it is useful to define some terms:
L = Length of the domain.
N = number of grid points.
⋅x=L/N spatial discretization.
i is the position at the domain being, therefore, i∗⋅x where i∈[O,N−1] is the real position.
T = Total simulation time.
k refers to a determined timestep being ⋅t= time step and k∗⋅t the real time.
As can be seen in [Eq. 1] the proposed equation has a diffusive and a convective term. Using a Crank-Nicolson scheme for the diffusive term:
This equation holds for all grid points containing in the domain i∈[1,N−2]. The expression in the borders (0 and N-1) is given by the boundary conditions. In this case, we assume Neumann conditions in both boundaries.
The resulting expression for i equal to 0 and N−1 is:
Uk+1 and Uk are the solution at a given time k and k+1.
f is the source term which in our case is a vector of length N with the following expression:
f[N]=Uk[−⋅tλ,−⋅tλ,....,−⋅tλ]
Conclusions
The proposed numerical scheme and its implementation are able to reproduce the results of the analytical solution reported by (Cho et al. 1971). The model describes the dissolved species movement through advection, diffusion and takes into account the degradation by first order decay.
References
Cho C. M., 1971. Convective transport of ammonium with nitrification in soil.Canadian journal of soil science.