Running the Solver
Once the fluid, adsorbents, column and cycle are defined, open the Solver window 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
- Start / Stop — the button runs the solver on a background thread; it becomes Stop 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.
- 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.
Solver settings
The solver parameters are on the Solver Options tab (also available as the Solver Data window). The defaults are robust for typical PSA/TSA problems; adjust them only when a run struggles to converge or you need tighter accuracy.
| Setting | Default | Meaning |
|---|---|---|
| Maximum Time Step | 2 s | Largest step the integrator may take. Lowering it can stabilise stiff, fast-transient steps. |
| Minimum Time Step | 1×10⁻¹⁵ s | Smallest permitted step. |
| Initial Step Size | 1×10⁻¹⁰ s | First step attempted. |
| Relative Tolerance | 1×10⁻⁶ | Relative accuracy target per variable. Tighten for more accuracy, loosen to speed up a hard run. |
| Maximum BDF Order | 5 | Highest order of the backward-differentiation formula (1–5). |
| Maximum Nonlinear Iterations Per Step | 15 | Newton iterations allowed per step before the step is retried smaller. |
| Nonlinear Convergence Coefficient | 0.1 | Safety factor on the Newton convergence test (0–1). |
| Maximum Convergence Failures | 200 | Non-linear-solver failures tolerated before giving up. |
| Maximum Error Test Failures | 40 | Local error-test failures tolerated before giving up. |
| Maximum Number of Steps | 100000 | Cap on total integrator steps. |
| Maximum Number of Cycles to Log | 10 | How many recent cycles of full profile data are retained for plotting. |
Absolute tolerances are set internally on a per-variable basis (pressure, temperature, mole fraction, loading each have appropriate scales), so only the single Relative Tolerance is exposed.
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.
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.