Skip to content

Tutorial: TSA regeneration (illustrative)

Illustrative deck, not a validated reproduction. No temperature swing experiment is bundled with Skarstrom yet, so this tutorial uses a deck built for the documentation. The adsorbent is a cited library entry and the column is that of the Perez (2019) experiments, but the operating conditions (feed velocity, step times, medium temperatures and heat transfer coefficients) are round numbers we chose, and the heating step takes the isotherm above its 298–348 K fit range. Use it to learn the workflow, not as design data.

Goal. Capture CO₂ from a 15 % CO₂ / 85 % N₂ flue gas with a four-step, indirectly heated temperature swing adsorption (TSA) cycle: adsorb cold, heat the bed to release CO₂, cool it down again, re-pressurise. You will heat and cool the column with a per-step heating medium: steam or hot oil at 150 °C, then cooling water at 25 °C, both flowing through a jacket on the wall and an internal heat exchanger in the packing. You will run to cyclic steady state, read purity, recovery and the thermal energy and cooling duty per kilogram of CO₂, and see why a 100 °C jacket alone would not do on this column.


1. Load the deck

import skarstrom

sim = skarstrom.examples.Illustrative_TSA_13X.load()
print(sim.steps.names)  # ['Adsorption', 'Heating', 'Cooling', 'Pressurisation']

The deck is generated by the IllustrativeTSA13X test in core/test/integration/test_tsa_example.cpp, which builds it in code (the clearest example of setting up a heating medium in C++), re-saves it to examples/decks/ and checks that it still runs. examples/tsa_illustrative.py builds the same deck in Python, runs it and plots the bed temperatures.

2. Walk through the setup

Fluid. CarbonDioxide and Nitrogen.

Adsorbents. One material, Zeolite 13X (Perez 2019), added unchanged from the curated library (AddLibraryAdsorbent in C++; skarstrom.adsorbent_path("zeolite_13x_perez2019") gives the file). It carries the competitive dual-site Langmuir isotherm (concentration form) from Table 2 of Estupiñan Perez et al. (2019), a macropore-controlled linear driving force with tortuosity 3, and heats of adsorption of 30.85 kJ/mol (CO₂) and 15.93 kJ/mol (N₂). The library entry states the isotherm was fitted at 298–348 K and 0–1 bar.

Column.

  • Geometry: a cylinder of 0.032 m diameter, ambient temperature 298 K. One layer, 13X: 0.30 m long, 30 cells (with the default WENO advection the recovery is grid-converged on about 20), bed voidage 0.41, particle diameter 1.5 mm, momentum model Ergun (the default for a new layer; the Perez2019 decks use Darcy (Kozeny–Carman), see What to try next).
  • Energy Balance: non-isothermal, local thermal equilibrium, adsorbed-phase heat capacity 30.7 J mol⁻¹ K⁻¹. The layer uses constant internal (bed-to-wall) and external (wall-to-ambient) heat transfer coefficients of 8.6 and 10 W m⁻² K⁻¹ and an axial thermal conductivity of 0.0903 W m⁻¹ K⁻¹, as in the Perez2019 decks.
  • Wall: material SS316L (density, heat capacity and conductivity come from the wall material library), 3.1 mm thick. That is about 0.8 kg of steel, with a heat capacity of about 400 J/K, more than the 0.16 kg of zeolite it holds.

Cycle. Four steps, 2430 s per cycle:

Step Time Bottom (feed end) Top Heating medium
Adsorption 600 s Flow inlet Flue gas: 0.05 m/s superficial, 15 % CO₂, 298 K Pressure outlet, 1 bar none (ambient)
Heating 900 s Pressure outlet, 1 bar: CO₂ product Closed 150 °C
Cooling 900 s Closed Closed 25 °C
Pressurisation 30 s Pressure inlet, linear ramp to 1 bar, feed gas at 298 K Closed none (ambient)

The Heating and Cooling steps each have a heating medium. It is a fluid at a set temperature that reaches the column in two ways:

  • Jacket, on the wall's outer face, with \(h_m\) = 500 W m⁻² K⁻¹. This is a typical figure for condensing steam or a pumped liquid in a jacket. While the step runs it replaces the ambient exchange. The heat still has to cross the wall and then the 8.6 W m⁻² K⁻¹ bed-to-wall coefficient, which is what limits it.
  • Internal heat exchanger, tubes in the packing, with \(a_x\) = 50 m² of surface per m³ of bed and \(h_x\) = 40 W m⁻² K⁻¹. 50 m²/m³ is about one 10 mm tube per 8 cm² of cross-section. 40 W m⁻² K⁻¹ is within the 20–100 W m⁻² K⁻¹ usual for a gas-filled packed bed on an immersed surface. Together, \(a_x h_x\) = 2000 W m⁻³ K⁻¹ heats the bed with a time constant of about five minutes. The model counts the tubes' heat transfer but not the space they take up.

In Python these are the step's medium fields: sim.steps["Heating"].medium.temperature, .heat_transfer_coefficient, .exchanger_area_per_volume and .exchanger_heat_transfer_coefficient. Their parameter paths are step[Heating].medium.*.

A medium is not a fixed duty. Its heat flow is proportional to how far the column is from the medium temperature, so the bed approaches 150 °C and never passes it. An energy source is different: it adds a fixed power for as long as the step lasts, whatever the bed temperature.

Heating vents the bed counter-currently, through the feed end, so the CO₂ comes out where it is most concentrated and the top of the bed stays clean for the next adsorption step. Cooling with both ends closed lets the pressure fall as the gas cools and CO₂ readsorbs; the pressurisation step then refills the bed with feed.

Cyclic steady state. Mass Balance (Per-Component), tolerance 0.005, minimum 5 cycles, at most 60 cycles.

KPI configuration. CO₂ is tracked. Feed: the Flue gas stream of Adsorption and the pressure inlet of Pressurisation. Product: the Heating pressure outlet.

3. Run

result = sim.run()
print(result.status, result.css_cycle + 1, f"{result.wall_time_s:.1f} s")
# reached_css 27 4.9 s

CSS is reached at cycle 27, with no step retries, in about 5 s natively.

4. Interpret the results

KPIs. At cycle 26 (the twenty-seventh cycle, counted from 0):

k = next(k for k in sim.kpis(cycle=-1) if k.component == "CarbonDioxide")
KPI Value
CO₂ purity 86.31 %
CO₂ recovery 95.97 %
Production rate 6.05 × 10⁻⁵ mol/s
Productivity (mass) 1.64 × 10⁻⁵ kg CO₂ per kg adsorbent per second
Electrical energy 0
Thermal energy 10.87 MJ per kg CO₂
Cooling duty 10.73 MJ per kg CO₂
print(k.electrical_energy, k.thermal_energy, k.cooling_duty)    # J/kg
print(k.step_thermal_energy, k.step_cooling_duty)                # each step's share

The electrical energy counts compressor and vacuum-pump work, so it is zero here.

The thermal energy is the heat the medium put into the column, the logged medium duty. Over the Heating step that is 70.3 kJ per cycle. The CO₂ produced is 6.05 × 10⁻⁵ mol/s × 2430 s = 0.147 mol (6.47 g), which gives 10.87 MJ per kg of CO₂ (10.87 GJ/t; see energy units).

The cooling duty, 69.4 kJ per cycle or 10.73 MJ/kg, is the heat the cooling water took out during Cooling. It is reported separately, not subtracted from the thermal energy; in a real plant it would come on top of it. step_thermal_energy puts all the heat on Heating and step_cooling_duty all the cooling on Cooling.

Of the 70.3 kJ, only 13.9 kJ enters through the internal exchanger; the other 56.4 kJ comes through the jacket. Most of the jacket's heat warms the steel wall from about 300 K to 423 K (400 J/K × 123 K ≈ 49 kJ), and the cooling water takes it out again in the next step. On a small laboratory column, cycling the wall's temperature costs more energy than the bed itself. In C++ the split is on each step's log (StepHeatDuty::exchanger_heat_in; see medium duty).

Why 150 °C, and why the exchanger. We first tried the medium at 100 °C. With 13X at 1 bar the bed has to get well above 373 K to give up its CO₂. Through a jacket the bed can never pass the medium temperature, and the 8.6 W m⁻² K⁻¹ bed-to-wall coefficient slows its approach. The same cycle with other media (25 °C cooling water in every row; Ergun, last cycle):

Heating medium Purity Recovery Thermal energy Hottest bed temperature
100 °C, jacket only (\(h_m\) = 500) 52 % 13 % 44 MJ/kg 354 K
100 °C, jacket + exchanger 76 % 44 % 14.7 MJ/kg 370 K
150 °C, jacket only 79 % 51 % 18.8 MJ/kg 388 K
150 °C, jacket + exchanger (deck) 86 % 96 % 10.9 MJ/kg 421 K

A 100 °C jacket alone mostly heats and cools the wall. The bed only reaches 354 K, recovers little CO₂ and costs 44 MJ per kilogram. Raising \(h_m\) does not help, because the bed-to-wall coefficient limits the heat flow, not the jacket. The internal exchanger heats the bed directly, and the hotter medium lets the bed reach 421 K, where 13X releases most of its CO₂.

Temperatures. The axial temperature profile at the end of each step of the last cycle:

for i, name in enumerate(sim.steps.names):
    T = sim.profile("temperature", cycle=-1, step=i)
    print(f"{name:15s} {T.values[-1].min():6.1f} - {T.values[-1].max():6.1f} K")
  • at the end of Adsorption the bed runs from 299 K at the feed end to 327 K at the top: the heat of adsorption travels ahead of the CO₂ front;
  • at the end of Heating it is at 413–421 K, just short of the medium's 423 K, and the wall is at 423 K;
  • at the end of Cooling it is back to 300 K, close to the cooling water's 298 K.

sim.series("temperature", z=0.15) gives the temperature at one position over the last cycle. To watch it settle into the same loop every cycle, raise settings.max_cycles_to_keep (default 1) before the run and read cycle=0, 1, …

Product quality. The CO₂ mole fraction leaving the bottom during Heating (step index 1):

y = sim.stream_series(1, "Heating Pressure Boundary Bottom", "mole_fraction", "CarbonDioxide")
F = sim.stream_series(1, "Heating Pressure Boundary Bottom", "molar_flow_rate")

The first gas out of the bed is the feed left in the voids, 15 % CO₂. The outlet then enriches as the bed heats: 77 % CO₂ after 150 s, 96 % after 300 s, 98 % after 450 s and 99 % from 600 s to the end of the step. The diluted gas from the start of the step is why the overall purity is 86 % even though most of the CO₂ leaves at above 95 %. The molar flow on the same stream grows as desorption speeds up.

5. What to try next

  • Change the medium. The medium's temperature and coefficients are registry parameters: sim.steps["Heating"].medium.temperature = u.Quantity(120, "degC") in Python, or --set "step[Heating].medium.temperature=393.15" on the command line. The thermal energy KPI follows. Setting step[Heating].medium.exchanger_area_per_volume to 0 gives the jacket-only rows of the table above. Setting the jacket coefficient step[Heating].medium.heat_transfer_coefficient to 0 leaves the exchanger alone: the wall then no longer swings through 125 K each cycle.
  • Use an electric heater instead. Disable the medium and give the step an energy source on the 13X layer, for example sim.steps["Heating"].add_energy_source("13X", power=30), with a negative power on Cooling. A source puts in a fixed power whatever the bed temperature, so the bed keeps heating for as long as the step lasts. An earlier version of this deck used +30 W and −12 W: 84 % purity, 67 % recovery and 6.1 MJ/kg. A fixed duty puts its heat straight into the bed (under LTE, as in this deck; under LTNE it heats the gas, Energy Balance) and does not swing the wall's temperature, so it costs less heat per kilogram, but it has no upper temperature limit.
  • Discard the diluted start of the heating step. Split Heating into two steps, say 150 s and 750 s, each with the 150 °C medium, and mark only the second step's outlet as Product in the KPI configuration so the first is vented. Purity should rise and recovery fall. Splitting steps is a deck edit (see the C++ test that builds this deck); from Python you can estimate the effect from the stream logs, integrating the Heating outlet flows from 150 s onwards.
  • Heat with a hot purge instead. Disable the Heating medium and give the step a top Flow inlet of N₂ whose Temperature Profile is Linear from 298 K to 423 K (see inlet temperature profiles). The purge sweeps CO₂ out faster but dilutes the product.
  • Add a vacuum. Lower the Heating outlet pressure (a temperature–vacuum swing; step[Heating].bottom.pressure) and give that boundary a vacuum pump with power calculation so the electrical energy KPI picks up the pump work.
  • Use a direct air capture sorbent. The library's APDES-NFC amine sorbent has a temperature-dependent Toth isotherm for CO₂ from Stampi-Bombelli et al. (2020). Its rate constant is 2 × 10⁻⁴ s⁻¹, so adsorption steps last hours rather than minutes.
  • Compare the momentum models. Switch the layer's momentum model (layer[13X].momentum_model) to Darcy (Kozeny–Carman), as in the Perez2019 decks. At 0.05 m/s through 1.5 mm particles the inertial (Burke–Plummer) term of Ergun is small, so the results barely move: in our native run the cycle again reached CSS at cycle 27, with a CO₂ purity of 86.31 % and a recovery of 95.97 %. Both models cross this cycle's abrupt step switches without a solver retry.
  • Sweep the heating time (step[Heating].time) in a parametric study and plot recovery against the thermal energy (k.thermal_energy).

6. Humid feeds

New in 0.9

This section and the Illustrative_Humid_DAC_Breakthrough deck.

Ambient air carries far more water than CO₂: at 20 °C and 49 % relative humidity, \(y_{H_2O} = 0.0115\) against 400 ppm of CO₂. On amine sorbents the water adsorbs too, releases its heat of sorption and raises the CO₂ capacity. To model it:

  • Add water as a component. Its fluid name is Water (sim.add_component("Water")); give it a mole fraction in the feed and in the initial conditions. The gas heat capacity of water uses its vapour-phase ideal-gas value, so a humid feed carries the right sensible heat even below the boiling point.
  • Give the sorbent a water isotherm. Use gab (or gab_young), which works in relative humidity with \(p_{sat}(T)\) from CoolProp (GAB and BET), and a rate model for water.
  • Pick a coupled kind for CO₂. toth_humid or toth_wadst read the water actually adsorbed in the same cell (CO₂ with adsorbed water); keep the mixing rule none.
  • Energy balance. Water needs its own heat_of_adsorption["Water"], usually near the heat of condensation plus a few kJ/mol. With a feed 30 times richer in water than in CO₂, the water heat dominates the temperature trace of the adsorption step, and on heating the water desorbs too, so the thermal energy KPI pays for it.

The library entry APDES-NFC has all of this. The illustrative deck Illustrative_Humid_DAC_Breakthrough (built by core/test/integration/test_humid_dac_breakthrough.cpp; not a validated reproduction) feeds humid air at the paper's 0.01 m/s through a 0.2 m long, 8 cm column of it for 33 h. Water leaves the bed first (half the feed water at the outlet after about 45 min); the middle of the bed warms by about 7 K as the water front passes and is back at ambient long before CO₂ breaks through (50 % after about 25 h). Behind the fronts the CO₂ loading is the humid 2.07 mol/kg; the same deck with a dry feed holds 0.82 mol/kg and the CO₂ breaks through after about 9.6 h.

import skarstrom

sim = skarstrom.examples.Illustrative_Humid_DAC_Breakthrough.load()
result = sim.run()
print(result.status, result.healthy)
for component in ("Water", "CarbonDioxide"):
    y = sim.series("mole_fraction", component, location="top")
    print(f"{component}: outlet y = {y.values[-1]:.3g} at t = {y.time[-1] / 3600:.0f} h")
T = sim.series("temperature", z=0.1)
print(f"mid-bed temperature peak {T.values.max():.1f} K at {T.time[T.values.argmax()] / 60:.0f} min")
# completed True
# Water: outlet y = 0.0115 at t = 33 h
# CarbonDioxide: outlet y = 0.000399 at t = 33 h
# mid-bed temperature peak 300.1 K at 11 min

To try the dry case, set the feed's water to zero and the nitrogen to the balance (sim.steps[0].bottom.y["Water"] = 0 and sim.steps[0].bottom.y["Nitrogen"] = 0.9996).

7. A humid cycle that crosses saturation

New in 0.16

This section and the Illustrative_Humid_DAC_TVSA deck.

The deck Illustrative_Humid_DAC_TVSA (built by examples/illustrative_humid_dac_tvsa.py; illustrative, not validated) puts the humid feed of §6 through a temperature–vacuum swing cycle on the same APDES-NFC library adsorbent, in a 0.1 m long, 8 cm column:

  1. Adsorption, 4 h: humid air (400 ppm CO₂, 49 % RH at 20 °C) at 0.01 m/s.
  2. Evacuation, 2 min: the top closed, the bottom pulled down to 0.2 bar.
  3. Heating, 30 min: a 95 °C medium in a jacket and an internal exchanger heats the bed at 0.2 bar. Water and CO₂ leave the bottom as the product.
  4. Cooling, 20 min: both ends closed, 20 °C water in the same jacket and exchanger.
  5. Pressurisation, 2 min: humid air back to 1 bar through the bottom.

The feed, column diameter and wall heat transfer are those of the breakthrough deck of §6. The step times, the vacuum level and the media are round numbers chosen for the example, not values from a paper, and the heating step takes the CO₂ isotherm above its 296–343 K fit range.

The cycle exists to show the SUPERSATURATION run-health warning on a realistic cycle. The heating step leaves water-rich gas in the bed. In the cooling step the jacket cools the thin steel wall faster than the packing gives up its heat, and the water partial pressure passes the saturation pressure at the wall temperature: up to 2.6 times saturation at the top of the column in the first cycles, and 1.4 times at cyclic steady state (reached at cycle 12). The gas itself comes close but stays just below saturation (0.96 to 1.00 in the first cycles, 0.91 at steady state). It is highest in the pressurisation step, where the feed compresses the vapour left in the bed. Readsorption on the GAB water isotherm pins the gas just below saturation: the sorbent takes the water back up as the bed cools and as the feed compresses the gas.

Condensation is not modelled. No liquid forms on the wall or in the bed, no heat of condensation is released and the GAB isotherm continues smoothly past saturation. The warning tells you that the run has left the model's range: the results after the crossing (here the cooling energy and the water that the next adsorption step takes up) are not physical. The run status stays completed, so examine the warnings yourself:

import skarstrom

sim = skarstrom.examples.Illustrative_Humid_DAC_TVSA.load()
result = sim.run(cycles=3)
print(result.status, result.healthy)
for w in result.warnings:
    if w.code == "SUPERSATURATION":
        print(w.component, w.step_name, round(w.value, 2))
for c in sim.run_health().cycles:
    print(c.cycle, round(c.supersaturation_gas, 3), round(c.supersaturation_wall, 3))
# completed False
# Water Cooling 2.56
# 0 0.999 2.125
# 1 0.982 2.389
# 2 0.961 2.56

To keep the wall above its dew point, cool through the internal exchanger alone: with step[Cooling].medium.heat_transfer_coefficient set to 0 the wall cools slowly with the bed, and in our run no warning fired (wall 0.49, gas 0.89 at steady state). A warmer cooling medium is not enough: at 35 °C the wall still reaches 1.57 times saturation in the cooling step, and at 50 °C it reaches 1.13 in an early pressurisation step, where the feed compresses the warm vapour left in the bed. Where a cycle must cross saturation, a model of liquid hold-up is needed before its results can be trusted.