Case study
TS-CHEM
A cross-platform groundwater contaminant analysis application, built in Xojo for McLane Environmental.
When Dr. Charles McLane first approached me about building a cross-platform groundwater modeling application in Xojo, we knew a few large hurdles stood in the way before it could be useful:
- To use existing, well-vetted scientific models, we needed a way to run programs written in FORTRAN (an older scientific programming language) from the command line on both Windows and Mac.
- Those FORTRAN programs each used a different format for their input and output.
- The FORTRAN programs were not cross-platform.
-
Proof of concept
Our first task was a simple proof of concept: could we generate an input file for these command-line tools, launch them, wait while they crunched the numbers, and gather the data they produced?
Dr. McLane built versions of the FORTRAN models that could run on Windows and Mac, while I wrote a small Xojo application to handle the rest. Together we got the command-line and desktop applications working in tandem, pulling the exported results back into the app. I wrote a class to store and manipulate chemical concentration data in four dimensions, height, width, depth, and time, and to output it in a form that could be charted.
-
Overcoming the hard part
At first the charts were difficult. I consider myself scientifically minded, but groundwater modeling was new to me, and the charts other applications in the field produced were hard to read closely enough to replicate.
Dr. McLane gave me simple test cases with known results that I could reproduce in software to confirm the equations were right. Working from those examples and parsing the data, it eventually clicked. I started to think a little like a groundwater analyst myself, which made it far easier to drive charting tools like ChartDirector toward meaningful output. From there it was clear the work had paid off: the application was producing results a professional analyst could actually use.
-
Adding features
With the uncertain work behind us, we built the software up feature by feature:
- Many charting and formatting options: concentration over time, profile, and contour charts, with adjustable fonts, sizes, colors, linear or logarithmic scales, and custom lines and markers.
- A portable, text-based project file so an analyst could save an entire analysis and share it with colleagues.
- Built-in calculators and analysis tools.
- Data export in the formats used by other popular modeling and graphing tools.
- More scientific models. By the first release, over 20 were available.
- A refined user experience: powerful, but easy to use and pleasant to look at.
- A cryptographic registration system, so the software could ship as freeware with one model enabled, or be purchased to unlock the rest.
-
Release
By breaking a big problem into smaller ones and building feature by feature, we shipped what I believe is a world-class, cross-platform scientific product with industry-first features. You can try it free or learn more about TS-CHEM at TransportStudio.com.
Have a project like this?
TS-CHEM is one of the applications I am most proud of, and a good example of what Xojo and a careful, collaborative process can do. If you have a technical or scientific application in mind, I would love to hear about it. You can also read more about my freelance Xojo work.
Contact me for a free estimate →