Skip to content

A Tracer / break-through analysis and diffusion and convection coefficients fit tool - simulation based, as opposed to the original CXTFIT

License

Notifications You must be signed in to change notification settings

ghorwin/CXTSimFit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CXTSimFit

CXTSimFit is a small tool to determine model parameters through Inverse Modelling of Tracer experiments or break-through filter tests. It fits the parameters of a typical diffusion and convection equation to measured inlet/outlet data (optionally with sorption and source term, and/or dual porosity). As opposed to the original CXTFit (see reference below) it can handle much more complex equations and handle non-constant inlet conditions.

Paper of the original CXTFIT:

The CXTFIT Code for Estimating Transport Parameters from Laboratory or Field Tracer Experiments, Research Report No. 137, April 1999, N. Toride, F. J. Leij, and M. Th. van Genuchten, https://www.ars.usda.gov/arsuserfiles/20360500/pdf_pubs/P1444.pdf

NOTE/DISCLAIMER Neither the CXTSimFit code nor the model formulation or anything else in this repository is related to or uses material from the original code/model. The purpose of the software is, however, very similar, hence the similar naming.

Features

This is a re-design of the original CXTFit software using a modern PDE solver to support measured, variable concentration pulses. Internally, it uses the CVODE integrator (SUNDIALS Suite) with error-controlled adaptive time integration. The sample is automatically discretized (equidistant) and the progression of the concentration pulse is simulated dynamically.

Also, a dual-porosity model is implemented, to better capture sorption characteristics in filters. Actually, the program was initially developed to analyze VOC filter bed model parameters obtained from break-through measurements (done by Prof. Jensen Zhang and his group at BEESL group @ Syracuse University, NY, USA. Since the physics is very typical for other problems (like salt diffusion/convection Tracer tests), the tool can be used likewise for such problems.

Documentation

The mathematical theory is written down in a small paper:

A. Nicolai, CXT SIM-FIT Manual, 2009, Technical Report, cxtsimfit_manual.pdf

How does it work

The software computes the solution of the convection-diffusion-equation (see model description in the manual). You can enter the model parameters, run the simulation and plot the calculated results with the "Add curve" button:

Manually added curve

This functionality is great for testing the impact of various model parameters, and also numerical parameters such as the number of grid cells. For example, the solution of the pure convection equation with 100, 1000 and 10000 cells shows the typical numerical diffusion/dispersion effect:

Grid_Sensitivity

For each calculated and added curve, you can inspect the progression of the convection/diffusion front, using the "Inspect profiles..." dialog:

Profile_view

Curve Fitting

You can now select one or more model parameters (check the check boxes) to determine via Inverse Modelling. This procedure involves running a simulation with some set of parameters, evaluating the difference between calculated and provided break-through curve and then using the Levenberg-Marquardt to optimize the parameters.

As with all non-linear optimization algorithms, a good set of starting values will help. Also, adjusting first a few parameters and adding the others later, might give better results.

Checking/evaluating typical Inverse Modelling errors

The software can be used very well in teaching problems appearing with Inverse Modelling. For example, a frequent mistake in papers related to Inverse Modelling is the mixup of numerical effects on results with physical parameters, most notably the diffusion coefficient. Try to fit a perfect analytical break-through curve with a coarse and fine grid - the algorithm will give you near perfect fit in both cases, yet with different diffusion coefficients.

So, when you read a paper with parameters determined through inverse modelling and numerical simulation, and the author does not discuss impact of numerical parameters, then the presented results are likely garbarge or unreliable at best.

Authors

The tool was a small side project that I (Andreas Nicolai) developed together with my colleague Jing Jing Pei while working my PhD at Syracuse University in the BEESL group.

(Btw, sorry, Jing Jing, that I made you listen to all my boring explanations on numerics and C++ programming :-)

Downloads

Eventually I might add releases. Until then just grab the source code, and use qmake to build:

cd build/Qt
qmake
make

and similar on Windows from the Visual Studio command line prompt.

Old Screenshots

Mind, this software was first published in 2009/2010, hence the old screenshots below show OS versions that are now long out of date. However, I still like the window manager decorations and color schemes from back then :-)

Kubuntu 8.10

CXTSimFit on Kubuntu 8.10

OpenSuse 10.3

CXTSimFit on OpenSuse 10.3

OpenSuse 11.1

CXTSimFit on OpenSuse 11.1

Windows XP

CXTSimFit on Windows XP

About

A Tracer / break-through analysis and diffusion and convection coefficients fit tool - simulation based, as opposed to the original CXTFIT

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published