Skip to content

Using the App

Mk-learning-python07 edited this page Sep 25, 2026 · 4 revisions

Using the app

Quick start

  1. Leave the default preset Zeolite 13X — CO₂/N₂ selected. Its isotherm parameters are the ones measured by Wilkins & Rajendran (2019).

  2. Choose Adsorption or Desorption in the Setup step.

  3. Click ▶ Run Simulation (header, or Next on Run setup; Ctrl + Enter works from anywhere).

    The feed flow can be entered in SLPM, SCCM, NLPM, NmL/min, SCFH, SCFM (with an editable reference temperature and pressure), LPM, mL/min, m³/h, mol/s or mmol/min, or directly as the interstitial velocity $v_0$; the Flow card shows the SLPM equivalent and the resulting $v_0$.

  4. The solve runs in a separate Python process, so the page stays responsive — edit fields while it works, or click ✕ Cancel to stop it.

  5. When it finishes the Results page opens. Read the Charts, Mass balance, Computed params and Raw data tabs.

The app follows your operating system's light or dark setting on first launch and remembers a manual choice after that — the toggle is in the header, and the charts follow it.

The layout

  • Header: Inputs / Results, theme, How to, Tour, Case menu, Run.
  • Inputs: Setup, Isotherms, Feed & column, Heat transfer, Mass transfer, Run setup (case name, $t_{run}$, $N_{grid}$). The feed composition, $t_{run}$ and $N_{grid}$ also have sliders. Back / Next or Alt + ← / →; Next on Run setup runs. Guided shows one step, All inputs shows every step.
  • Checks: a step shows a red count for improper inputs and a yellow ! for warnings; click it to jump to the field.
  • Isotherm preview: the Isotherms step plots both pure-component isotherms at $T_{feed}$ (solid) and at a chosen offset above it (dashed), with the feed partial pressures marked, and redraws as you edit.
  • Notes: an (i) button opens the explanation for a card; hovering a field shows what it means.
  • How to opens the guide on its own page; Esc closes it.
  • Case menu: load, save, export, case library, credits.

Results at a glance

The top of the Results page summarises the run: the breakthrough time (or, in desorption, the bed-clearing time), the loading of each component against its equilibrium value, and the peak bed temperature. Each tile opens the tab behind it. Below them, Can I trust this run? reports mole conservation for each component, marked green below 5 %, amber to 10 % and red above, and the outlet state against mixture equilibrium, marked green below 2 %.

The tabs

Charts. Outlet mole fraction (the breakthrough curve itself), normalised outlet molar flow, column temperature profiles at three fixed axial positions (25 / 50 / 75 % of the bed) plus an optional custom probe, outlet pressure, total outlet flow $Q_{out}$ in SLPM (with $Q_{feed}$ as a reference line), adsorbed loading in the last cell, and wall temperature. Every chart plots against real time or dimensionless $\tau$. Legends are placed automatically where they cover the least data.

Mass Balance. Three blocks, in order of importance.

  • Reference — the run and the equilibrium state it is judged against: mode, mixing rule, mass-transfer model, the integrator used, adsorbent mass, final bed temperature, $q_i^{\ast}$ at feed conditions and the equilibrium breakthrough times $t_{bt,i}$.
  • Loading, one card per component (the result). Moles accumulated in the bed divided by the mass of adsorbent, against the mixture equilibrium loading at feed conditions. This is the comparison that says whether the run reproduced the isotherm. It is a completeness measure, not an error: large on a short run, and the fix is a longer $t_{run}$. Two targets are given — isothermal at $T_{feed}$ and at the bed's actual final temperature — because they part company once wall heat loss has moved the bed off feed temperature. Below 5 % the bed reached equilibrium; 5–20 % it is still approaching; above 20 % the run ended well short.
  • Mole conservation (supporting check). One compact table for both components: $n_{in}$, $n_{out}$, $n_{in}-n_{out}$, the bed inventory change $n_{acc}$ (adsorbed phase plus interparticle gas $\varepsilon c$), and the closure $|n_{in}-n_{out}-n_{acc}|/n_{ref}$. For Component 1, which the bed retains, $n_{ref}=|n_{acc}|$. Component 2 is the balance gas: it passes through at many times its bed inventory with $n_{acc}\to0$, so $n_{ref}=n_{in}$. It is collapsed by default and opens itself when either component reaches 5 %. Below 5 %, conserved; 5–10 %, marginal — confirm the result against the loading check before using it; above 10 %, outside the expected envelope — save the case and report it. The finite-volume discretisation is conservative, so the residual reflects the time integration and the quadrature of the reported output only. A case saved before this release carries no Component 2 flux data; re-run it to fill the row.

Computed params. Every dimensionless group, the feed-condition diffusivities, Péclet numbers, minimum fluidisation velocity and Archimedes number, the equilibrium factor $\beta$, equilibrium loadings, and the equilibrium breakthrough times $t_{bt,i}$ — the stoichiometric time of local-equilibrium theory, which assumes infinitely fast mass transfer and no dispersion. Dispersion and mass-transfer resistance spread the simulated front either side of it; $t_{bt,i}$ locates the front's centre of mass, not its first appearance.

Raw Data. The full time series, copyable and exportable.

Save / Load Case (Case menu). Save case writes a self-contained .json with every input, the isotherm and mass-transfer configuration, and — if a run has completed — the complete output time series. Load case restores all of it and redraws the charts without re-solving; it first states what a case file is and offers a template built from the setup currently on screen. Keep these in your own folder to build a library of validation cases; the Case library tab also keeps a quick-access copy in the browser.

Export Report (Case menu). Produces a formatted document — operating conditions, isotherm and mass-transfer setup, mass balance, IAST check, governing equations, embedded chart images with an automatic reading of each figure, and full citations — which opens in a new tab. Use the browser's Print dialog to save it as PDF.

Logs. A timestamped record of the run. An advanced view shows the full backend output for diagnosis.

Experimental validation

The Experimental validation tab on the Results page is always there; upload from it before or after a run. Upload measured breakthrough data as .csv, .xls or .xlsx. The upload button first states the expected layout and offers a template CSV to paste your data into — start there rather than guessing at the headers.

Columns are matched by header name: a time column, plus any of outlet mole fraction, outlet flow rate, and temperature. Up to four thermocouples named T1…T4 are supported and paired in order with the four simulated axial temperature traces.

Units are chosen on the same tab (q_out unit, T unit) or in the upload window, and the template is written in them. Outlet flow defaults to the same unit as $Q_{feed}$ — SLPM, SCCM, NLPM, LPM, mol/s and the rest, with the feed's reference $T$, $P$ — and temperature may be °C, K or °F. A unit in the header, such as q_out [SCCM] or T1 [K], overrides the setting. Values are converted to SLPM and °C on upload; the status line, the log and the report state the units read.

Supply the outlet flow column as well as the mole fraction. It is essential: the composite retention time integrates $Q(t)y(t)$, so without it no $q^{\ast}$ is reported at all — a constant outlet flow is not a safe assumption. The app says so at upload.

Once uploaded, the points overlay on the corresponding charts — with both y_out and q_out present, the normalised outlet molar flow chart as well — and the Experimental validation tab reports RMSE, MAE and $R^2$ against your measurements. Clear Validation Data removes the overlay.

Equilibrium loading from the measured run

The same tab closes the mass balance on your uploaded trace to get $q^{\ast}$ directly from the measured flows and compositions — no isotherm, no simulation (Wilkins, Sawada & Rajendran 2022):

$$q^{\ast}_{i,ads}=\frac{Py_{i,in}}{RT}\frac{Q_{in}}{m_{ads}}\left[\bar{t}_{comp,ads}-\bar{t}_{blank,ads}+\bar{t}_{pync}\right]$$

with the composite retention time integrated from your own effluent trace, $\bar{t}_{comp,ads}=\int_0^{t_\infty}\left(1-Q(t)y_i(t)/Q_{in}y_{i,in}\right)\mathrm{d}t$, and the desorption forms of both used automatically when the operating mode is desorption.

Two numbers are not in the CSV and you supply them: the blank-column retention time $\bar{t}_{blank}$, which cannot be recovered from this file and has to be measured on a blank run, and the skeletal density $\rho_{sk}$, pre-filled as $\rho_s/(1-\varepsilon_p)$ and overwritable with a helium-pycnometry value. The pycnometric correction $\bar{t}_{pync}=m_{ads}/(\rho_{sk}Q_{in})$ is computed for you.

Each card shows the equation behind its number. The result is reported against the mixing rule the run uses (IAST or extended Langmuir), evaluated on your fitted pure-component isotherms at the same $P$, $T$ and feed composition; with extended Langmuir, the IAST value is shown alongside for reference. Neither number depends on the column model or the solver, so the difference between them measures the isotherm fit and nothing else. If the feed inputs do not match the uploaded run, no loading is reported until $y_{feed}$, $Q_{feed}$, $T_{feed}$ and $P_{feed}$ are set to the run's values. Three further conditions that bias the result are flagged rather than left implicit: a missing flow column, a record that ends before the effluent returns to the feed value (the integral is truncated, so $q^{\ast}$ is an underestimate), and a blank time left at zero (the answer is an upper bound, not a result).

Clone this wiki locally