Skip to content

This repository contains all the neccessary files to initialize an interactive 1-D analytical transport model, representative of a column test. The user can enter parameter values specific to the experimental setup. For further information, check the documentation. The model is written in Python and uses callback functions written in JavaScript.…

Notifications You must be signed in to change notification settings

JanGei/1D_column_test_analytical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1-Dimensional Analytical Column Test

General Structure

This repository contains an interactive, analytical model that solves 1-dimensional solute transport through a cylinder, representative of a n experiment. The basic structure of the model is developed in Python, while the interactive nature of this model functions through JavaScript. This is realized through the Python library bokeh which provides customizable JavaScript callbacks in the Python language.

Analytical Equation

Analytical Equation

The analytical equation above is being solved through the model and contains the following elements:

  • Normed concentration C(x,t)/C0 of the solute
  • Location x within the column
  • Time t
  • First order rate constant λ
  • Seepage velocity v
  • Complimentary Error function erfc
  • Dispersion coefficient D
  • Combined parameter H = 2λD / v2

User Interface

AnalyticalUI

The UI of the model is essentially divided into four parts.
The plot in the upper left part shows the normed solute concentration as a function of space, i.e. length of the column, at a given point in time.
The plot in the lower left part shows a breakthroughcurve, i.e. the normed solute concentration as a function of time at a given location. This location is specified by the grey diamond in the upper plot, which can be dragged in order to change its position.
The upper right part of the UI contains the widgets through which the user can change the models mode, geometry, and the solutes properties. Initially the user can choose between a continuous injection and a pulse injection. The picture above depicts the model in its 'Continuous Injection' state. If the mode of the model is switched to 'Pulse Injection', an additional slider appears, that controlls the duration of injection. Furthermore, the user can choose between 'No Sorption' and 'Linear Sorption', as linear sorption of a solute can be modelled analytically. For this, the retardation factor R is computed:
R = 1 + (1-n)/n Kd ρd
with:

  • Porosity n
  • Linear Partitioning Coefficient Kd
  • Solid Density ρd

This retardataion factor is multiplied to the seepage velocity in order to model linear sorption. If the option 'Linear Sorption' is selected, three sliders, containing Kd and ρd appear.
An extension of the problem to non-linear sorption can be found in this repository

Below these options the 'Time' slider is found, through which the elapsed time within the simulation can be changed. Note that for practical reasons time is converted into pore volumes, but a conversion rate from pore volumes to hours is depicted in the slider title. Following the 'Time' slider, all necessary and adjustable model parameters are displayed with a slider. Through the sliders the numerical values of the columns length and radius, the solutes first-order reaction coefficient, dispersion coefficient, and the setups flow rate and porosity can be altered.

The lower right part of the UI contains a unit selection for the reaction, dispersion, and flow rate term. However, after selecting the unit of choice, the user needs to interact with the slider again, as this triggers the unit switch.

Below the unit selection are two buttons that, when clicked, download a .csv file, containing x and y values of the upper and lower plot to the download folder of the computer.

Uncertainty

In experimental column setups the exact value of the first-order reaction coefficient and/or the dispersion coefficient is not known exactly. To tackle this problem, the model allows the user to define a range with a lowest and highest possible value for both variables. Within this range, a latin hypercube is used to sample 100 parameter combinations containing both variables. Thus, the model re-computes the aforeshown equation 100 times and computes the ensemble mean, as well as the upper and lower quartile and the minimum and maximum. These values are also depicted in the figure in the upper left part of the UI. Collapsing the range slider minimum and maximum into one point for both variables disables this option.

Future Work and Extensions

An extended (and numerical) version of this model can be found here. It contains non-linear sorption (Freundlich and Langmuir). Further possible extensions and future work is discussed there.

About

This repository contains all the neccessary files to initialize an interactive 1-D analytical transport model, representative of a column test. The user can enter parameter values specific to the experimental setup. For further information, check the documentation. The model is written in Python and uses callback functions written in JavaScript.…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published