{"id":26376362,"url":"https://github.com/ghorwin/cxtsimfit","last_synced_at":"2025-03-17T03:17:10.381Z","repository":{"id":119383547,"uuid":"448899302","full_name":"ghorwin/CXTSimFit","owner":"ghorwin","description":"A Tracer / break-through analysis and diffusion and convection coefficients fit tool - simulation based, as opposed to the original CXTFIT","archived":false,"fork":false,"pushed_at":"2022-01-18T20:26:09.000Z","size":14057,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-01-27T20:37:06.362Z","etag":null,"topics":["filter","inverse-modelling","simulation","tracer"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghorwin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-01-17T13:12:23.000Z","updated_at":"2022-01-18T20:19:21.000Z","dependencies_parsed_at":"2023-10-12T16:41:45.215Z","dependency_job_id":null,"html_url":"https://github.com/ghorwin/CXTSimFit","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"9eba30f29964e8e884267500a3522088969937dd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghorwin%2FCXTSimFit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghorwin%2FCXTSimFit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghorwin%2FCXTSimFit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghorwin%2FCXTSimFit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghorwin","download_url":"https://codeload.github.com/ghorwin/CXTSimFit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243965780,"owners_count":20375920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filter","inverse-modelling","simulation","tracer"],"created_at":"2025-03-17T03:17:09.868Z","updated_at":"2025-03-17T03:17:10.380Z","avatar_url":"https://github.com/ghorwin.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CXTSimFit\n\n_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.\n\nPaper of the original CXTFIT:\n\n_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\n\n**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.\n\n## Features\n\nThis 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.\n\nAlso, 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](https://beesl.syr.edu). Since the physics is very typical for other problems (like salt diffusion/convection Tracer tests), the tool can be used likewise for such problems.\n\n## Documentation\n\nThe mathematical theory is written down in a small paper:\n\nA. Nicolai, _CXT SIM-FIT Manual_, 2009, Technical Report, [cxtsimfit_manual.pdf](doc/cxtsimfit_manual.pdf)\n\n## How does it work\n\nThe 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:\n\n![Manually added curve](doc/CXTSimFit_single_curve.png)\n\nThis 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:\n\n![Grid_Sensitivity](doc/CXTSimFit_grid_sensitivity.png)\n\nFor each calculated and added curve, you can inspect the progression of the convection/diffusion front, using the \"Inspect profiles...\" dialog:\n\n![Profile_view](doc/CXTSimFit_profile_view.gif)\n\n## Curve Fitting\n\nYou 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](https://en.wikipedia.org/wiki/Levenberg–Marquardt_algorithm) to optimize the parameters.\n\nAs 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.\n\n### Checking/evaluating typical Inverse Modelling errors\n\nThe 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. \n\nSo, 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.\n\n## Authors\n\nThe 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](https://www.syracuse.edu) in the [BEESL group](https://beesl.syr.edu).\n\n(Btw, sorry, Jing Jing, that I made you listen to all my boring explanations on numerics and C++ programming :-)\n\n## Downloads\n\nEventually I might add releases. Until then just grab the source code, and use `qmake` to build:\n\n```bash\ncd build/Qt\nqmake\nmake\n```\n\nand similar on Windows from the Visual Studio command line prompt.\n\n# Old Screenshots\n\nMind, 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 :-)\n\n### Kubuntu 8.10\n![CXTSimFit on Kubuntu 8.10](doc/snapshot_kubuntu8.10.png)\n\n### OpenSuse 10.3\n![CXTSimFit on OpenSuse 10.3](doc/snapshot_openSuse_10.3.png)\n\n### OpenSuse 11.1\n![CXTSimFit on OpenSuse 11.1](doc/snapshot_openSuse_11.1.png)\n\n### Windows XP\n![CXTSimFit on Windows XP](doc/snapshot_windows_XP.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghorwin%2Fcxtsimfit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghorwin%2Fcxtsimfit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghorwin%2Fcxtsimfit/lists"}