Running the Solver

Once the fluid, adsorbents, column and cycle are defined, open Solver in the Navigator to run the simulation. Skarstrom integrates the coupled governing equations in time as a system of differential-algebraic equations (DAEs) using a variable-order, variable-step implicit method (SUNDIALS IDA), taking the bed through every step of every cycle.

Running, stopping and monitoring

  • Run / Cancel — the button runs the solver in the background (in a web worker, so the workspace stays responsive); it becomes Cancel while running, letting you interrupt a run cleanly. Before starting, the model is validated and all expressions are evaluated; if validation fails the run is marked Failed with a message, and the workspace offers one-click fixes for the common causes.
  • Progress bar — shows the fraction of (cycles × steps) completed.
  • Status — one of Not Started, In Progress, Completed, Failed, or Cyclic Steady State (reached CSS before the cycle limit).
  • Solver Log — a timestamped, auto-scrolling log. The Log Level (Low, Medium, High) controls detail: Low reports essential milestones, Medium adds per-cycle and per-step progress and CSS checks, High adds diagnostics. On completion the log reports the runtime and solver statistics (steps taken, residual evaluations, non-linear iterations, error-test and convergence failures).

You can watch the results build up as the run progresses by opening the plotting tabs.

Run warnings

When a run completes, the last logged cycle is checked step by step, and any warnings are written to the Solver Log, where they are marked Warning; the status line next to the progress bar says how many there are (click it to open the log). Each names the step and cycle, with Open step to go to it:

  • Approach to fluidisation above 1: the upward pressure drop exceeds the weight of the bed, which would lift unless it is held down. The warning gives the height above the bottom of the bed and the time into the step at which it peaks. It is most likely in fast pressurisation from the bottom, blowdown through the top, or a high feed velocity; lower the flow or slow the pressure change. Always checked.

Before a run, the log also warns when a step starts with a step change in a boundary pressure.

None of these stops a run, and each can be switched off for the deck on the Solver window's Warnings tab (or with Turn off on a warning in the log), for example fluidisation for a bed that is held down. The switches are saved with the deck.

Solver settings

The solver parameters are on the Solver Settings tab of the Solver panel. The defaults are robust for typical PSA/TSA problems; adjust them only when a run struggles to converge or you need tighter accuracy. The Numerics page explains what each one does inside the integrator.

SettingDefaultMeaning
Advection SchemeUpwindHow the convective term reconstructs the gas composition at cell faces. Upwind is first-order and robust; WENO and van Leer are higher-order and need several times fewer cells for the same accuracy. A loaded deck keeps the scheme it was saved with.
Maximum Time Step0 (no limit)Largest step the integrator may take; 0 leaves the step size to IDA's error control. Lowering it can stabilise stiff, fast-transient steps. Results are logged from IDA's interpolant, so the logged trajectory does not depend on it. Decks saved with the old default of 2 s load with no limit.
Minimum Time Step1×10⁻¹⁵ sSmallest permitted step.
Initial Step Size1×10⁻¹⁰ sFirst step attempted.
Relative Tolerance1×10⁻⁶Relative accuracy target per variable. Tighten for more accuracy, loosen to speed up a hard run.
Maximum BDF Order5Highest order of the backward-differentiation formula (1–5).
Maximum Nonlinear Iterations Per Step15Newton iterations allowed per step before the step is retried smaller.
Nonlinear Convergence Coefficient0.1Safety factor on the Newton convergence test (0–1).
Maximum Convergence Failures200Non-linear-solver failures tolerated before giving up.
Maximum Error Test Failures40Local error-test failures tolerated before giving up.
Maximum Number of Steps100000Cap on total integrator steps.
Maximum Number of Cycles to Log10How many recent cycles of full profile data are retained for plotting.

Absolute tolerances are set internally on a per-variable basis (10⁻⁸ for concentrations, mole fractions and loadings, 10⁻⁶ for pressure and velocity, 10⁻⁴ K for temperatures), so only the single Relative Tolerance is exposed. See Numerics.

Troubleshooting convergence

  • The run fails early with a message about consistent initial conditions. The solver could not reconcile the initial conditions with the first step's boundary conditions. Make the initial pressure, temperature and composition physically consistent with what the first step imposes.
  • The run stalls or reports many convergence/error-test failures. Reduce the Maximum Time Step and/or loosen the Relative Tolerance slightly; check for very stiff inputs (e.g. an extremely large mass-transfer coefficient or a near-instant pressure ramp). Increasing the Number of cells gradually rather than in one large jump also helps.
  • Results look under-resolved. Increase the layer Number of cells and re-run; confirm the results stop changing. A higher-order Advection Scheme (WENO or van Leer) reaches the same accuracy with far fewer cells than Upwind.

Once a run completes, retain enough cycles (via Maximum Number of Cycles to Log) to inspect the approach to cyclic steady state and to compute performance metrics.