Skip to content
ohlinchaPublic

About

Open software for gas sorption (BET, pore size) on the TriStar 3000 and SmartPrep

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LibreSorb

Open software for gas sorption: degassing, adsorption and desorption isotherms, BET surface area and pore size. It is written for the TriStar 3000 analyser (three ports) and the SmartPrep degasser (six stations), as a shared instrument with many users. Cross-platform (Windows, macOS, Linux), in the family of LibreUVVis and LibreIR.

Latest release: 0.7.1 (5 December 2026): installers for Windows, macOS and Linux.

Analysis: a port's isotherm as it is measured

Status (0.7.1)

  • Simulator: complete. The built-in simulator runs everything, without an instrument: six degas stations (ramp, soak, cool down), three analysis ports (evacuation, free space, P0, the dosed points and desorption) and every result. LibreSorb --demo opens it with a demo user's samples degassing, analysing and finished.
  • Calculations: checked. BET, single-point BET, Langmuir, t-plot (Harkins–Jura, Halsey, Broekhoff–de Boer, STSA carbon black), total pore volume and BJH (adsorption or desorption). They give the same numbers as the analyser's own reports on the lab's archive of samples, to the printed digits.
  • Micropore methods (0.2): checked where possible. Dubinin–Radushkevich and Dubinin–Astakhov (with the Medek pore-size distribution) match the analyser's reports (the 16 in the archive with a Dubinin result). The MP method and the αs plot follow the analyser's manual and the literature; the archive has no report with a result for them, so they are not checked against the analyser.
  • Assessment (0.3): every sample gets a plain reading of its isotherm with advice: the IUPAC 2015 isotherm and hysteresis type and what they indicate; which results suit it and which mean little (e.g. BJH on a non-porous or macroporous sample); the ISO 9277 consistency criteria for the BET range, with the longest range that meets them; a loop that closes at the cavitation limit (P/P0 ≈ 0.42 for N2), whose BJH desorption peak near 4 nm is an artefact; too little surface in the tube for N2; and what to change in the next measurement. On the Isotherm tab and in the PDF, CSV and JSON. The thresholds are heuristics, listed in engine/README.md.
  • KJS (0.3): BJH with the Kruk–Jaroniec–Sayari correction (Kelvin radius + t + 0.3 nm, KJS thickness curve) for silicas, on the adsorption branch.
  • Real instruments: read-only, and untested on the hardware. With serial ports set (Administration ▸ Settings), the program reads the analyser's and the degasser's status. Starting a degas or an analysis on the real instruments is switched off in this version, until the first tests on the instruments.
  • Serial connections recover by themselves (0.7.1): a port that is missing or busy at start, a pulled cable or USB adapter (found again under a new name by its serial number), an instrument that restarts or stops answering, and corrupted frames: the program reopens the port and resets the link, retrying without end. Every byte is logged to logs/traffic/. Tested against simulated instruments on a virtual cable.
  • Import: the analyser's sample files (.SMP): the isotherm, mass, free space, P0, adsorptive and degas.
  • Standard methods (0.4): the built-in methods are the lab's own: the N2 isotherm table used in 90 % of 6167 archived analyses (41 adsorption, 36 desorption points), BET only (11 points), micropores from P/P0 0.0032, and the five most used degas programmes. A method used for the first time is kept in the user's own methods.
  • Example samples (0.4): File ▸ Load example samples adds synthetic isotherms, one per IUPAC type and a low-area pulp, to look around the results and the assessment without an instrument.
  • NLDFT (0.5): pore-size distributions from our own N2 (77 K) kernels: carbon slit pores and silica cylindrical pores, each for the equilibrium and the adsorption branch, with the smoothing chosen by generalised cross-validation (Results ▸ NLDFT; calc --nldft KERNEL). By default the kernel is chosen from the isotherm: silica cylinders when there is a hysteresis loop, carbon slits for type I. The kernels recover known distributions from their own isotherms but are not yet compared with published kernels or measured reference materials.
  • Material (0.6): optional, on the degas and analysis forms and in Results ▸ NLDFT: carbon, silica, oxide, zeolite, MOF, clay, iron/Mn oxide, other mineral, cellulose, polymer. It proposes a degas and an analysis method, chooses the NLDFT kernel family, and adds to the assessment what matters for the material (e.g. a degas too hot for polymers, clays or iron oxides; CO2 for carbon ultramicropores; argon for zeolites). The list follows a survey of the lab's 6167 archived analyses.
  • Comparing samples (0.7): Ctrl-click up to 8 samples in Results to overlay their isotherms, t-plots, αs plots, BJH and NLDFT distributions and f-ratios, with one line per sample in the table. f-ratio: the isotherm divided by a non-porous reference's. Heat of adsorption: the isosteric heat (Clausius–Clapeyron) from isotherms of one sample at two or more temperatures. File ▸ Import a folder of sample files reads a whole archive of .SMP files (subfolders included) and skips those already imported, so old analyses can be recalculated with every method here.

The window

Three views, switched in the top bar. Nothing in the window needs scrolling at 1536×864 (125 %).

  • Degas: the six stations, the selected station's temperature (planned and measured), and the sample and degas programme (stages of temperature, ramp rate and soak time) with Start, Skip to the next stage and Stop. A degassed sample can go on any free analysis port; a planned port is optional. The mass is entered before degassing and, if wanted, again after.
  • Analysis: the three ports, the dewar and P0, the isotherm as it is measured, and the sample, mass and analysis method with Start, Skip step and Stop. The whole method is on one sheet (All method settings…): evacuation, free space, P0, equilibration, dosing, adsorptive and the pressure table, with the points used for BET, t-plot, BJH and total pore volume.
  • Results: everyone's samples or your own, the isotherm, BET, Langmuir, t-plot, αs, BJH, Dubinin and MP plots, and the results with their settings. Fit ranges are typed; dragging the edges on the plot changes the typed values. Export as CSV or PDF.

Degas: six stations, planned and measured temperature

Results: BET with its fit range

Results: the assessment of an isotherm, with advice

Results: Dubinin–Radushkevich plot

The analysis method on one sheet

Users sign in from a list (new users add themselves); each user has a folder with their samples and methods. The administrator (password) sees the usage log with each session's log, reported problems, users (rename, merge, retire) and the settings: data folder, serial ports and automatic sign-out. Runs on the instruments go on after a user signs out.

Install

On Debian 13 and Ubuntu 24.04 the simplest way is the APT repository, which also brings updates with sudo apt upgrade:

sudo apt install -y curl
sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSL https://ohlincha.github.io/apt/ohlincha.gpg -o /etc/apt/keyrings/ohlincha.gpg
echo "deb [signed-by=/etc/apt/keyrings/ohlincha.gpg] https://ohlincha.github.io/apt trixie main" \
  | sudo tee /etc/apt/sources.list.d/ohlincha.list
sudo apt update && sudo apt install libresorb

On Ubuntu 24.04 write noble instead of trixie.

Installers for Windows, macOS and Linux (.deb for Debian 13 and Ubuntu 24.04) are on the releases page. The Windows and macOS builds are not signed: Windows asks to confirm (More info ▸ Run anyway); on macOS, right-click ▸ Open the first time.

Controller program (firmware). After it is switched on, the TriStar 3000 needs its controller program loaded from the PC. That program belongs to the manufacturer and is not included in LibreSorb, so you need your own copy, from the manufacturer's software installed for the analyser. LibreSorb does not load it yet: start the manufacturer's software once after switching the analyser on, then close it and use LibreSorb. A later version will load it from your own installation (you will give the file's location under Administration ▸ Settings).

Command line

LibreSorbCLI simulate --name test --method full              # a simulated degas and analysis, results as JSON
LibreSorbCLI calc sample.smp --bet 0.05 0.30 --bjh adsorption   # results from a sample file (.smp, .json, or a CSV of P/P0, quantity)
LibreSorbCLI calc sample.smp --nldft silica-cyl-ads              # with an NLDFT pore-size distribution
LibreSorbCLI import sample.smp --out sample.json             # a sample file as LibreSorb's own sample

See AGENTS.md for the JSON output. engine/ holds the Python reference implementation of the calculations, which the C++ code was checked against.

Build

C++17 and Qt 6 (Core, Gui, Widgets, SerialPort, Network). cmake -S . -B build -G Ninja && cmake --build build && ctest --test-dir build. On Debian or Ubuntu: apt install qt6-base-dev qt6-serialport-dev.

Protocols

protocols/tristar-3000.md and protocols/smartprep.md describe the serial links in our own words. The analyser's controller program is the manufacturer's: it is not, and will not be, part of this repository or of the installers.

About

C. André Ohlin, Umeå University. MIT licence.

Not affiliated with or endorsed by any instrument manufacturer; product names are used only to state compatibility.

About

Open software for gas sorption (BET, pore size) on the TriStar 3000 and SmartPrep

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages