Reactions
Reactions¶
A reaction lives on an adsorbent (a solid), beside its isotherm and rate model. A catalyst is a solid with reactions, usually with an inert isotherm. Mix a catalyst and a sorbent in one layer by mass fraction to get a sorption-enhanced reactor. No other machinery is needed.
Each rate law gives the intrinsic rate \(r\) per kilogram of the solid that carries the reaction, in mol of reaction extent per kg per second. Component \(i\) is produced at \(\nu_i\,\eta\, r\) per kg of that solid (\(\nu_i < 0\) for a reactant, \(> 0\) for a product; \(\eta\) is the effectiveness factor). The rate laws other than expression are written in activities \(a_i\): partial pressures \(a_i = y_i P\) in bar (partial_pressure, the default) or concentrations \(a_i = y_i P/(RT)\) in mol/m³ (concentration).
| Rate law | Rate |
|---|---|
power_law |
\(r = k(T) \prod_i a_i^{n_i}\) |
reversible_power_law |
\(r = k(T) \prod_i a_i^{n_i} (1 - Q / K(T))\), \(Q = \prod_i a_i^{\nu_i}\) |
lhhw |
\(r = k(T) \prod_i a_i^{n_i} (1 - Q/K(T)) / \prod_k \mathrm{DEN}_k^{m_k}\), \(\mathrm{DEN}_k = 1 + \sum_j K_{kj}(T) \prod_i a_i^{e_{kji}}\) |
expression |
a user expression of T, P, c and p_<C>, c_<C>, y_<C> (and q_<C>, theta_<C>, theta_free, see Adsorbed species) |
The temperature-dependent constants all have the Arrhenius form:
| Symbol | Parameter (adsorbent[ID].reaction[ID].rate.*) |
Description | Unit |
|---|---|---|---|
| \(A\), \(E\) | pre_exp_factor, activation_energy |
Rate constant | mol kg⁻¹ s⁻¹ (activity)\(^{-\sum_i n_i}\); J mol⁻¹ |
| \(n_i\) | order[C] |
Reaction order; defaults to \(-\nu_i\) for reactants and 0 for products | – |
| \(A_K\), \(E_K\) | equilibrium_pre_exp_factor, equilibrium_energy |
Equilibrium constant (entered; there is no thermochemistry table) | (activity)\(^{\sum_i \nu_i}\); J mol⁻¹ |
| \(m_k\) | denominator[k].exponent |
Exponent of LHHW denominator \(k\) (default 1) | – |
| \(A_{kj}\), \(E_{kj}\) | denominator[k].adsorption[j].pre_exp_factor, denominator[k].adsorption[j].energy |
Adsorption constant of term \(j\) of denominator \(k\) | (activity)\(^{-\sum_i e_{kji}}\); J mol⁻¹ |
| \(e_{kji}\) | denominator[k].adsorption[j].exponent[C] |
Exponent of component \(i\) in term \(j\) of denominator \(k\) | – |
With \(K_{kj} = A_{kj} e^{-E_{kj}/RT}\), an adsorption constant that falls with temperature has \(E_{kj} < 0\) (an adsorption enthalpy). An lhhw rate has the switch rate.reversible (default on). With it off, the factor \((1 - Q/K)\) is dropped and the rate is \(k \prod_i a_i^{n_i} / \prod_k \mathrm{DEN}_k^{m_k}\).
Several denominators. An lhhw rate has one denominator per kind of site, numbered from 1. A new rate has one, with exponent 1 and no terms (\(\mathrm{DEN}_1 = 1\)). A two-site Langmuir–Hinshelwood rate, for example a steam-reforming rate on a metal site and a support site, is a product of two site balances, \(r = k f(p) / (\mathrm{DEN}_1^{m_1}\, \mathrm{DEN}_2^{m_2})\). Give it two denominators (rx.add_denominator(), or denominators=[4, 2] in add_reaction). The alternative, one denominator that holds every cross term of the product, is exact but long: 4 + 2 site terms expand to 14 terms. With one denominator the rate is computed exactly as before several were allowed, bit for bit. Each denominator's activities have the same floor as the rest of the rate, so a two-site rate with \(p_{\mathrm{H_2}}^{-1}\) in a support-site term stays finite at zero hydrogen.
New in 0.14
Several denominators: denominator[k].exponent and denominator[k].adsorption[j].*. The paths of the single-denominator layout, rate.denominator_exponent and rate.adsorption[j].*, still resolve to denominator 1, and decks saved with one denominator load unchanged.
The reversible factor is evaluated as the difference of two monomials, \(k\,[\prod_i a_i^{n_i} - K^{-1}\prod_i a_i^{n_i + \nu_i}]\), never through \(Q\), so a zero product activity gives a finite rate. Each activity is clipped at 0, and an activity raised to a negative power is floored (see Start-up of fast reactions); the two forms agree wherever no activity is clipped or floored.
The expression rate gives \(r\) in mol kg⁻¹ s⁻¹ directly and ignores the rate basis. Its variables are T [K], P [Pa], c = \(P/(RT)\) [mol/m³] and, for each component, p_<C> = \(y_C P\) in Pa (not bar), c_<C> [mol/m³] and y_<C> [–]. A partial-pressure law fitted in bar needs p_<C>/1e5.
Temperature and composition. Every rate is evaluated with the gas composition and pressure of the cell, at the catalyst temperature: the solid temperature under local thermal non-equilibrium, the gas temperature otherwise. With an external film the composition is that of the catalyst surface instead.
Effectiveness factor¶
The effectiveness factor \(\eta\) multiplies the intrinsic rate. There are three modes:
| Mode | \(\eta\) |
|---|---|
constant |
The effectiveness value (default 1). |
thiele |
The generalised Thiele modulus of a key reactant A, with one effective diffusivity \(D_\text{eff}\). |
dusty_gas |
The same modulus, with the diffusivity of A from the dusty-gas model along the composition path inside the particle. New in 0.19. |
The two diffusion modes compute \(\eta\) in each cell, for an isothermal particle without film resistance, from the generalised (Aris–Bischoff) modulus on the Aris length \(L = V_p/S_x\) of the particle:
| Symbol | Description | Unit |
|---|---|---|
| \(L\) | Aris length of the particle (table below) | m |
| \(\rho_p\) | Particle density of the solid (solid_density) |
kg m⁻³ |
| \(r_s\) | Intrinsic rate at the cell's gas state (the particle surface) | mol kg⁻¹ s⁻¹ |
| \(C_{A,s}\) | Concentration of A in the cell's gas | mol m⁻³ |
| \(C_{A,\text{end}}\) | Concentration of A where the path inside the particle ends | mol m⁻³ |
| \(\varepsilon_p\) | The adsorbent's particle_void_fraction |
– |
| \(r_p\) | The adsorbent's pore_structure.pore_radius (default 0 = not set) |
m |
The key reactant is key_component when it is a reactant of the reaction, else the first reactant. A reaction that runs backwards at the surface (\(r_s < 0\)) is treated the same way, with A as the product. Where the modulus cannot be formed (no reactant, \(r_s = 0\), a non-positive \(L\), \(\rho_p\) or \(D_\text{eff}\)), \(\eta = 1\).
Particle shape. The shape comes from the cell's layer, so a solid in two layers can have a different \(\eta\) in each:
| Layer | \(L\) | \(\eta_\text{shape}(\phi)\) | Small \(\phi\) |
|---|---|---|---|
| Packed spheres, radius \(R = d_p/2\) | \(R/3\) | \(\dfrac{1}{\phi}\left[\dfrac{1}{\tanh 3\phi} - \dfrac{1}{3\phi}\right]\) | \(1 - 0.6\,\phi^2\) |
| Packed cylinders, radius \(R = d_p/2\) (end faces excluded) | \(R/2\) | \(\dfrac{I_1(2\phi)}{\phi\, I_0(2\phi)}\) | \(1 - \phi^2/2\) |
| Monolith or laminate (slab) | the layer's diffusion length: the washcoat thickness, or half the wall or sheet | \(\dfrac{\tanh\phi}{\phi}\) | \(1 - \phi^2/3\) |
Each \(\eta_\text{shape} \to 1/\phi\) at large \(\phi\). For a first-order irreversible rate the sphere gives \(\eta = 3/\phi_1^2\,(\phi_1 \coth\phi_1 - 1)\) with \(\phi_1 = R\sqrt{k_v/D_\text{eff}}\).
New in 0.19
The shape of the layer. Before 0.19 the thiele mode took a sphere of radius \(d_p/2\) in every layer. Results in a layer of packed spheres are unchanged bit for bit; layers of cylinders and structured layers get the cylinder and slab forms.
The thiele mode¶
\(\tau\) is the reaction's own tortuosity (default 3) and \(D_{m,A}\) the Wilke molecular diffusivity of A in the cell's gas (Equation of State). \(D_\text{eff}\) is constant inside the particle. The other components follow the stoichiometric line \(C_j = C_{j,s} + (\nu_j/\nu_A)(C_A - C_{A,s})\) (clipped at 0): every component diffuses with the same effective diffusivity, and temperature and pressure are those of the surface. \(C_{A,\text{end}}\) is the concentration of A on that line where the rate is zero (the equilibrium, found by regula falsi) or, for a rate that does not change sign, where a concentration on the line reaches zero. The integral uses 8-point Gauss–Legendre quadrature. The model has no stoichiometric counter-diffusion.
New in 0.19
The adsorbent leaf adsorbent[A].pore_structure.pore_radius (m). Python: adsorbent.pore_structure.pore_radius, or pore_radius= in add_adsorbent.
Pores of 5–50 nm are partly in the Knudsen regime, and the molecular diffusivity alone gives an \(\eta\) that is too high. When the solid's pore_structure.pore_radius \(r_p\) is above 0, the diffusivity in \(D_\text{eff}\) is the Bosanquet mean of the Knudsen and molecular values, in each cell at the catalyst temperature \(T\):
\(M_A\) is the molar mass of the key reactant. The pore radius belongs to the solid, so all the reactions of the solid use it. A radius of 0 (the default) is "not set": \(D = D_{m,A}\), with identical results. A negative or non-finite radius is a deck error. A radius on a solid whose reactions have constant effectiveness is not used. The search range of the leaf is 0 to 10 µm.
The dusty_gas mode¶
New in 0.19
The dusty_gas mode, the adsorbent leaves pore_structure.tortuosity and pore_structure.permeability, and the reaction leaf viscous_flow. Python: rx.set_effectiveness("dusty_gas", key_component=...), adsorbent.pore_structure.tortuosity, adsorbent.pore_structure.permeability, rx.viscous_flow. An engine older than 0.19 reads the mode as unknown and runs the constant \(\eta\) (the effectiveness value, default 1) without an error.
The thiele mode gives every component the same diffusivity and ignores the change of the moles. The dusty_gas mode takes the transport inside the pores from the dusty-gas model (Mason and Malinauskas 1983): molecular (Stefan–Maxwell), Knudsen and viscous flux in parallel. For each component \(i\):
with the effective values \(D^e_{ij} = (\varepsilon_p/\tau)\, D_{ij}\), \(D^e_{K,i} = (\varepsilon_p/\tau)\, D_{K,i}\) (the formula above, with each component's molar mass) and \(B_0\).
| Symbol | Leaf | Description | Unit |
|---|---|---|---|
| \(\tau\) | adsorbent[A].pore_structure.tortuosity |
Particle tortuosity (default 3, range 1–10). The solid's, not the reaction's. | – |
| \(B_0\) | adsorbent[A].pore_structure.permeability |
Effective pellet permeability. 0 (the default) is \((\varepsilon_p/\tau)\, r_p^2/8\). Range 0 to \(10^{-10}\). | m² |
| \(r_p\) | adsorbent[A].pore_structure.pore_radius |
Mean pore radius; must be above 0. The first switch of a reaction to dusty_gas sets 10 nm on a solid that has none. |
m |
| – | adsorbent[A].reaction[R].viscous_flow |
On (the default): the full model. Off: the isobaric limit \(B_0 \to \infty\), \(\nabla P = 0\). | – |
| \(D_{ij}\) | – | Chapman–Enskog binary diffusivities of the cell, at its pressure | m² s⁻¹ |
| \(\mu\) | – | Gas viscosity of the cell, constant inside the particle | Pa s |
The two tortuosity and permeability leaves exist while a reaction of the solid uses dusty_gas; such a reaction shows viscous_flow and no effectiveness or tortuosity leaf.
Flux ratios. In a steady particle with one reaction, each flux is a fixed multiple of the flux of A: \(N_j = \alpha_j N_A\) with \(\alpha_j = \nu_j/\nu_A\) (\(\alpha_A = 1\), 0 for an inert). The dusty-gas equations then give \(\nabla p_i = -R_g T\, N_A\, H_i\) and \(\nabla P = -R_g T\, N_A\, G\), with
(isobaric: \(G = 0\) and \(H_i = F_i - (y_i/D^e_{K,i}) \sum_k F_k / \sum_k (y_k / D^e_{K,k})\)). So \(N_A = -D_{\text{eff},A}\,\nabla C_A\) with \(D_{\text{eff},A} = 1/H_A\), and the partial pressures inside the particle follow the path
The path. From the surface state, the path and the integral of the modulus are integrated together with fixed-step classical Runge–Kutta (RK4): 16 steps over the range of \(C_A\) of the stoichiometric line, then at most 16 more if the path has not ended. Fixed steps keep \(\eta\) a smooth function of the cell state, which the Jacobian needs. Inerts move along the path and \(P = \sum_i p_i\); \(D_{ij}\) is scaled with \(P_\text{surface}/P\) (\(D_{ij} P\) is constant) and \(C_A = p_A/(R_g T)\) at the catalyst temperature. The path ends at the first of: the rate changes sign (equilibrium), a component runs out, or \(H_A \le 0\) (a guard: \(\eta = 1\), reported once). The end inside the last step is found by regula falsi on the step's cubic Hermite interpolant, and that step is taken again with the length up to the end.
Limits of a binary or trace system: with equal \(D_{ij}\), an equimolar reaction and no Knudsen resistance, \(D_{\text{eff},A} = (\varepsilon_p/\tau) D\) and the two modes agree. A non-equimolar reaction with equal \(D_{ij}\) (isobaric) has \(D_{\text{eff},A} = D^e/(1 - y_A \sum_k \alpha_k)\). One component has \(D_\text{eff} = D^e_K + B_0 P/\mu\). A trace of A (\(y_A \to 0\)) gives the Bosanquet mean of the thiele mode, with Blanc's law \(1/D_{A,m} = \sum_j y_j/D_{Aj}\) for the mixture.
Limitations. The particle is isothermal. The pores have one mean radius (no pore-size distribution). There is no surface diffusion and no binary friction model. Each reaction is treated alone, with its own flux ratios: two reactions of a solid that share components (steam reforming and water-gas shift) each take the path they would have alone. A deck warning names such pairs, mixed viscous_flow settings on one solid, and an isobaric reaction where \(B_0 P/(\mu D^e_K) > 1\) (the viscous flux is not small). The error of these assumptions against an exact pellet solution is in Accuracy of the effectiveness models. A dusty_gas reaction without a key reactant or a pore radius, a negative or non-finite permeability, and a component without a molar mass or Lennard-Jones parameters are deck errors. The mode costs 1 to 7 times the thiele mode per reaction and cell (3.5 times over the three rates of a steam-reforming deck); a path that ends close to the surface, near equilibrium, is the cheapest.
Adsorbed species. Neither diffusion modulus has a meaning for an adsorbed reactant: a reaction with an adsorbed species, or a rate that reads the loading (q_<C>, theta_<C>, theta_free), takes the constant effectiveness only.
Accuracy of the effectiveness models¶
The test suite has a reference solution of the steady, isothermal pellet with the full dusty-gas model (core/test/fixtures/pellet_reference.h). It solves the balance of every gas component, \(\frac{1}{\xi^s}\frac{d}{d\xi}(\xi^s N_i) = R\,\rho_p \sum_r \nu_{ri}\, r_r\), on a graded grid of finite volumes. The fluxes come from the full dusty-gas equations at the local state, and the total pressure varies inside the pellet. All the reactions of the solid run at the same time, each with its own rate law. The solution is extrapolated from 200 and 400 cells (Richardson). It is accepted only when the two grids agree to \(10^{-4}\). The reference matches the closed-form first-order \(\eta\) of each shape to \(10^{-4}\), and its mass balance closes to \(10^{-12}\). \(\eta_r\) is \(\int r_r\, dV / (V\, r_r(\text{surface}))\).
The modes were compared with the reference over this grid (6300 points, all converged):
| Axis | Values |
|---|---|
| Reaction set | (i) butane → isobutane, first order (equal molar masses), 500 K; (ii) A → 3 B, first order, \(M_B/M_A = 1/8\), 600 K; (iii) CO₂ + 4 H₂ ⇌ CH₄ + 2 H₂O, reversible power law, first order in CO₂ and H₂, 600 K; (iv) Xu–Froment steam reforming, water-gas shift and global reforming on one solid (LHHW), 800 K |
| Pore radius | 2, 5, 20, 100, 1000 nm |
| Pressure | 1, 5, 30 bar |
| Surface composition | stoichiometric feed (set iv: CH₄ : H₂O = 1 : 1 with 2 % H₂, which the negative H₂ orders need); key reactant at 1 %; half converted; 95 % of the way to equilibrium (sets iii and iv) |
| Modulus | rates scaled so that the dusty_gas \(\phi\) of the first reaction is 0.1, 1, 3, 10 or 30 |
| Transport | full model; isobaric (viscous_flow off); \(B_0 = 0\) (reference only) |
| Shape | sphere; also cylinder and slab for sets (i) and (iii) |
\(\varepsilon_p/\tau = 1/6\), \(\mu = 2 \times 10^{-5}\) Pa s, and the \(D_{ij}\) are Chapman–Enskog values. The thiele mode uses the Wilke \(D_{m,A}\) at the surface. "Bosanquet" adds the Knudsen term of the key reactant. The tables give \(|\eta/\eta_\text{ref} - 1|\) as maximum / median over the full and isobaric points.
Set (i), equimolar with equal molar masses: thiele + Bosanquet and dusty_gas agree with the reference to \(10^{-8}\). Both are exact for a binary pair with equal Knudsen diffusivities. thiele without the Knudsen term is up to 370 % high in 2 nm pores.
Set (ii), A → 3 B with a light product:
| Mode | \(\phi \le 1\) | \(1 < \phi < 10\) | \(\phi \ge 10\) |
|---|---|---|---|
thiele |
51 % / 0.79 % | 236 % / 92 % | 1140 % / 121 % |
thiele + Bosanquet |
24 % / 0.21 % | 42 % / 2.8 % | 48 % / 3.0 % |
dusty_gas |
4.1 % / 0.053 % | 1.6 % / 0.088 % | 0.47 % / 0.014 % |
| path frozen at the surface slopes | 4.1 % / 0.053 % | 1.6 % / 0.088 % | 0.47 % / 0.014 % |
| stoichiometric line with the dusty-gas \(D_\text{eff}(C_A)\) | 4.7 % / 0.006 % | 11 % / 0.60 % | 14 % / 0.72 % |
Set (iii), CO₂ methanation (reversible):
| Mode | \(\phi \le 1\) | \(1 < \phi < 10\) | \(\phi \ge 10\) |
|---|---|---|---|
thiele |
51 % / 0.65 % | 233 % / 59 % | 1510 % / 70 % |
thiele + Bosanquet |
16 % / 0.21 % | 25 % / 11 % | 25 % / 12 % |
dusty_gas |
2.1 % / 0.079 % | 0.72 % / 0.42 % | 0.21 % / 0.029 % |
| path frozen at the surface slopes | 2.2 % / 0.080 % | 0.99 % / 0.49 % | 0.50 % / 0.056 % |
| stoichiometric line with the dusty-gas \(D_\text{eff}(C_A)\) | 16 % / 0.19 % | 25 % / 14 % | 25 % / 15 % |
For one reaction the dusty-gas reduction is exact (the flux ratios are fixed by the stoichiometry). The remaining error of dusty_gas is the generalised-modulus interpolation. It is largest near \(\phi = 1\), and in the stoichiometric and half-converted states, where \(D_{\text{eff},A}\) changes most along the path. It goes to zero as \(\phi^2\) at small \(\phi\) (set ii, sphere: \(1.5 \times 10^{-5}\), \(1.4 \times 10^{-4}\) and \(1.5 \times 10^{-3}\) at \(\phi\) = 0.01, 0.03 and 0.1). At large \(\phi\) it goes to zero as \(1/\phi\) in spheres and cylinders: their shape functions carry the curvature correction of a first-order rate (\(1.1 \times 10^{-3}\) at \(\phi = 30\), \(3 \times 10^{-4}\) at 100). In a slab it is \(10^{-7}\) at \(\phi \ge 30\). The tests assert only these limits: \(10^{-4}\) at \(\phi = 0.01\) and \(10^{-3}\) at \(\phi = 100\) in every shape, and \(10^{-5}\) in a slab at \(\phi \ge 30\). The values at \(\phi\) = 0.1 and 30 in spheres and cylinders (up to \(2 \times 10^{-3}\)) are measured, not asserted. The frozen surface path is almost as good as the integrated path. The stoichiometric line with the dusty-gas \(D_\text{eff}\) is not: the path, not only the diffusivity, carries the counter-diffusion. The viscous flux changes \(\eta\) by at most 2.3 % (isobaric against full), and \(B_0 = 0\) against the default \(B_0\) by at most 0.15 %.
Set (iv), three reactions on one solid. The modes treat each reaction alone, with its own flux ratios and key reactant (CH₄, CO, CH₄):
| Reaction | Mode | \(\phi \le 1\) | \(1 < \phi < 10\) | \(\phi \ge 10\) |
|---|---|---|---|---|
| SMR | thiele + Bosanquet |
85 % / 5.6 % | 112 % / 20 % | 123 % / 22 % |
| SMR | dusty_gas |
94 % / 6.4 % | 127 % / 37 % | 140 % / 26 % |
| SMR | one ratio for the solid (key CH₄) | 31 % / 2.6 % | 47 % / 18 % | 57 % / 19 % |
| WGS | thiele + Bosanquet |
51 % / 2.8 % | 69 % / 37 % | 74 % / 39 % |
| WGS | dusty_gas |
51 % / 2.8 % | 69 % / 38 % | 74 % / 40 % |
| WGS | one ratio for the solid (key CH₄) | 19 % / 3.0 % | 47 % / 29 % | 73 % / 32 % |
| Global | thiele + Bosanquet |
32 % / 5.7 % | 107 % / 12 % | 166 % / 11 % |
| Global | dusty_gas |
40 % / 11 % | 122 % / 38 % | 202 % / 51 % |
| Global | one ratio for the solid (key CH₄) | 45 % / 5.9 % | 52 % / 19 % | 64 % / 23 % |
Here the error comes from the coupling of the reactions, not from the transport model. Against a reference that runs the same reaction alone, dusty_gas has a median error of 0.02–2.2 % (SMR: 0.67 % at \(\phi \le 1\), 0.23 % at \(\phi \ge 10\)). In the pellet, the shift and the global reaction make more hydrogen than SMR alone. With H₂ orders of −2.5 to −3.5, every rate falls further inside than its own path predicts. The global reaction can even run backwards inside the pellet once the shift makes CO₂ (140 points with \(\eta_\text{ref} \le 0\), left out of the table). One flux ratio for the whole solid, \(\alpha_j = \omega_j/\omega_{\text{CH}_4}\) from the net production rates \(\omega\) at the surface, halves the median error of SMR. It is still not accurate. It is singular where the net production of the key reactant passes through zero: with CO as the key the error reaches 2000 % where the net CO production at the surface is small (median 125 % where it is below 5 % of the CH₄ consumption). The dusty_gas mode is the most accurate model for one reaction. For coupled networks such as Xu–Froment, none of the three modes is accurate to better than tens of percent at \(\phi > 1\).
RK4 steps. For sets (i)–(iii) the step error of the path is below \(10^{-4}\) at \(M = 4\) (set ii: \(6 \times 10^{-5}\) at \(M = 4\), \(2 \times 10^{-7}\) at \(M = 16\), against \(M = 32\)), far below the interpolation error. So \(M = 4\) already reaches the floor. The stiff LHHW rates of set (iv) need more steps: against \(M = 32\) the step error is at most 19 % at \(M = 4\), 4.8 % at \(M = 8\) and 0.7 % at \(M = 16\) (medians \(10^{-6}\) or less). The default \(M = 16\) is adequate.
Caveats. The reference has the same physics as the dusty_gas mode. The pellet is isothermal, the pores have one mean radius, there is no surface diffusion, and there is no film resistance. The reference measures the error of the reductions inside that model, not the error of the model against a real catalyst. The slow test PelletReferenceMap.FullGrid writes the raw grid to core/Results/pellet_reference/grid.csv and these tables to summary.md.
External film¶
New in 0.19
The reaction leaf adsorbent[A].reaction[R].external_film (none, correlation). Python: rx.external_film.
By default a rate sees the bulk gas of the cell: there is no gas-to-catalyst film resistance. With external_film set to correlation, the rate is evaluated at the catalyst surface. In each cell the surface concentration \(C_{A,s}\) of the key reactant A balances the film flux against the consumption of A:
| Symbol | Description | Unit |
|---|---|---|
| \(C_{A,b}\), \(C_{A,s}\) | Concentration of A in the bulk gas and at the catalyst surface | mol m⁻³ |
| \(\mathrm{Sh}\) | The cell's film Sherwood number: the layer's film_correlation in a packed layer (Packed-bed film correlations), the channel Sherwood number in a structured layer (Film coefficients in structured layers) |
– |
| \(D_{m,A}\) | Molecular diffusivity of A in the cell's gas | m² s⁻¹ |
| \(\ell\) | The particle diameter (packed), or the channel hydraulic diameter (structured) | m |
| \(a_{v,k}\) | The gas–solid area per bed volume \(a_v\) times the volume share of solid k in the cell's solids | m⁻¹ |
| \(\rho_{b,k}\) | Bulk density of the solid that carries the reaction | kg m⁻³ |
A is the key reactant (key_component when it is a reactant, else the first reactant), as for the effectiveness factor. The other gas components of the reaction follow A from the bulk along the stoichiometry, \(C_{j,s} = C_{j,b} + (\nu_j/\nu_A)(C_{A,s} - C_{A,b})\), clipped at 0: every component has the same film coefficient. The surface has the bulk pressure and the catalyst temperature. \(\eta\) is evaluated at the surface state in every mode, so the film and the pore diffusion act in series. The engine solves the balance in each cell by regula falsi between the bulk and the point where the rate vanishes on the line; a reaction that runs backwards is treated the same way with A as the product. For a first-order irreversible rate \(r = k\,C_A\) the result is the series resistance
When it matters. The film limits the rate when \(k_f a_{v,k}\) is not large compared with \(\rho_{b,k}\,\eta\, k\): fast catalysts, large particles, low flows, and ignition. For the lean methane combustion of Fernández et al. (2015) at 500 °C, \(k' \approx 0.06\) m³ kg⁻¹ s⁻¹ against \(k_f a_v/\rho_b \approx 0.9\) m³ kg⁻¹ s⁻¹, so the film changes the result by less than 1 K.
Limitations. Gas decks only: on a liquid deck correlation is a deck error. A reaction with an adsorbed species, or a rate that reads the loading, cannot have the film (deck error). The film is per reaction: two reactions of a solid that share a reactant each solve their own film balance. There is no film heat transfer term of the reaction here; the heat goes to the catalyst as before (under LTNE the solid–gas heat transfer is the particle heat transfer model). The cost is one scalar root per reaction and cell, each step evaluating \(\eta\); with thiele or dusty_gas that is several effectiveness evaluations per cell.
Source terms and heat of reaction¶
The reactions of solid \(k\) act at that solid's bulk density \(\rho_{b,k}\) (its mass per bed volume, see Mixed Adsorbent Layers). Component \(i\) gains, per unit bed volume,
\(S_i\) enters the component balance of \(i\), and the net \(\sum_i S_i\) enters the overall mole balance, so a mole-changing reaction drives the velocity field as adsorption does. Each reaction also releases
into the energy balance (the solid's under LTNE), with \(T\) the catalyst temperature; it is 0 in an isothermal run. \(\Delta H_r\) is per mol of extent, negative for an exothermic reaction. Two modes (heat_mode):
kirchhoff(the default): \(\Delta H_r(T) = \Delta H_\text{ref} + \sum_i \nu_i \int_{T_\text{ref}}^{T} C_{p,i}\, dT\), with the gas molar heat capacities the energy balance uses;constant: \(\Delta H_r = \Delta H_\text{ref}\) at every temperature.
\(\Delta H_\text{ref}\) is heat_of_reaction [J mol⁻¹] and \(T_\text{ref}\) is heat_reference_temperature (default 298.15 K). Under the default mode, enter the heat of reaction at \(T_\text{ref}\), not at the operating temperature.
Adsorbed species¶
New in 0.19
Adsorbed species in reactions ("<Component>*"), the reference capacities adsorbent[ID].reference_capacity[C], the expression names q_<C>, theta_<C> and theta_free, the log series "<C> Reaction Loading Source (<solid>)" and Simulation.coverage.
A reaction can consume and produce the adsorbed phase of its own solid. Write the species as the component name with a trailing *: "CarbonDioxide*" is CO₂ adsorbed on the solid that carries the reaction. An adsorbed species stays on that solid: a mixed layer has no spillover between solids. A component name cannot end in *.
An adsorbed species is a source in the loading balance of its solid \(k\):
\(J\) is the transfer flux of the pair's rate model and isotherm (see Kinetic Models). When the isotherm of the pair is inert, there is no transfer flux (\(J = 0\)): the loading changes only through the reactions (a reaction-only loading). Such a pair is an unknown of the run only when a reaction of the solid names its adsorbed species, and its rate model is then ignored. The registry then lists none of its kinetics[<C>].* entries, and the deck view shows none. With another isotherm, \(J\) and \(R\) add: physisorption and the reaction run in parallel, which the deck checks report as a warning.
The source of component \(i\) in the gas balances becomes its net generation over both phases,
so the gas sees \(-\rho_b J + \rho_b \nu_{\text{gas}}\, \eta\, r\). The reaction KPIs, the logged reaction_source, the reaction generation and the mass-balance CSS tests read \(S_i\), which now counts what the reactions put on the solid. The element balance treats \(C^*\) as \(C\). A reaction such as \(\mathrm{CO_2^* \rightarrow CO_2}\) is valid: a reactant and a product in either phase are enough.
Rates. In the power_law, reversible_power_law and lhhw kinds the activity of \(C^*\) is its coverage \(\theta_C = q_C / q_{\text{ref},C}\) on either basis (clipped at 0, and floored at \(10^{-10}\) when raised to a negative power). The orders and exponents of adsorbed species are ordinary registry leaves: rate.order[CarbonDioxide*], nu[CarbonDioxide*], rate.denominator[k].adsorption[j].exponent[CarbonDioxide*]. The rate constant's unit sums the gas orders only. These kinds have no vacancy species: write a rate with \((1 - \sum \theta)\) with the expression kind, whose extra variables are, for each adsorbed species of the solid,
| Variable | Description | Unit |
|---|---|---|
q_<C> |
Loading of C on the reaction's solid | mol kg⁻¹ |
theta_<C> |
Coverage \(q_C / q_{\text{ref},C}\) | – |
theta_free |
\(\max(0,\ 1 - \sum_C \theta_C)\) over the solid's adsorbed species | – |
A user variable with the same name takes precedence. An expression that names q_<C> or theta_<C> of a component no reaction of the solid has as an adsorbed species is a deck error.
Reference capacity. Each adsorbed species of a solid has a reference capacity \(q_{\text{ref},C}\), adsorbent[ID].reference_capacity[C] [mol kg⁻¹] (default 1, tunable). The first reaction of the solid that names \(C^*\) creates it, and it goes when the last one stops naming it. It is an expression, so a temperature-dependent capacity can be a user variable. A non-positive capacity of a species whose coverage a rate reads is a deck error.
Effectiveness. The Thiele and dusty-gas moduli have no meaning for an adsorbed reactant: a reaction with an adsorbed species, or a rate that reads the loading, takes the constant effectiveness only.
Heat. Enter \(\Delta H_r\) per mol of extent with the adsorbed species in their adsorbed state, \(\Delta H_r(\text{ads}) = \Delta H_r(\text{gas}) + \sum_C \nu_{C^*} \Delta H_{\text{ads},C}\). The heat of adsorption multiplies the transfer flux \(J\) only, so a reaction that consumes \(C^*\) is not charged a desorption heat as well. Under kirchhoff, an adsorbed species takes the adsorbed-phase heat capacity of the energy balance, \(\Delta C_p = \sum_i \nu_i C_{p,i} + \sum_C \nu_{C^*} C_{pa,C}\) (fluid.adsorbed_heat_capacity_mode).
Outputs. Each (solid, adsorbed species) pair logs \(R_{k,C}\) as "<C> Reaction Loading Source (<solid>)" (a CSV file of save_logs). The loading itself is the usual adsorbed concentration of the solid, and sim.coverage(adsorbent, component) divides it by the reference capacity.
A dual-function material (DFM) for CO₂ capture and methanation, after the coverage form of its literature model: CO₂ adsorbs at \(k_1 C_\mathrm{CO_2} \theta_\text{free}\), and the adsorbed CO₂ reacts with hydrogen. The solid has no isotherm, so every change of its coverage is a reaction.
import skarstrom as sk
dfm_sim = sk.Simulation.new(title="DFM capture and methanation")
for c in ("Nitrogen", "CarbonDioxide", "Hydrogen", "Methane", "Water"):
dfm_sim.add_component(c)
dfm = dfm_sim.add_adsorbent("DFM", solid_density=1500, heat_capacity=900,
thermal_conductivity=0.5, particle_void_fraction=0.4)
dfm_sim.bed.set_shape("cylinder", diameter=0.02)
dfm_sim.wall.set_material("ss316l")
dfm_sim.wall.set_boundary("zero_flux")
dfm_sim.add_layer("DFM bed", composition={"DFM": 1.0}, momentum="kozeny_carman", length=0.05,
cells=10, bed_void_fraction=0.4, particle_diameter=1e-3)
dfm_sim.initial_conditions.pressure = 1e5
dfm_sim.initial_conditions.temperature = 593
dfm_sim.initial_conditions.y["Nitrogen"] = 1.0
capture = dfm_sim.add_step("Capture", time=10)
capture.bottom.set_streams("inlet", [sk.Stream("Flue gas", flow=sk.velocity(0.05),
y={"Nitrogen": 0.9, "CarbonDioxide": 0.1}, temperature=593)])
capture.top.set_pressure("outlet", 1e5)
hydro = dfm_sim.add_step("Hydrogenation", time=10)
hydro.bottom.set_streams("inlet", [sk.Stream("Hydrogen", flow=sk.velocity(0.05),
y={"Hydrogen": 1.0}, temperature=593)])
hydro.top.set_pressure("outlet", 1e5)
uptake = dfm.add_reaction("Uptake", {"CarbonDioxide": -1, "CarbonDioxide*": 1}, kind="expression",
heat_of_reaction=-4e4)
uptake.rate.expression = "2e-2 * c_CarbonDioxide * theta_free"
sabatier = dfm.add_reaction("Surface Sabatier",
{"CarbonDioxide*": -1, "Hydrogen": -4, "Methane": 1, "Water": 2},
kind="power_law", basis="concentration")
sabatier.rate.pre_exp_factor = 1e-4 # r = k theta_CO2 c_H2 [mol/(kg s)]
sabatier.rate.order["Hydrogen"] = 1.0
dfm.reference_capacity["CarbonDioxide"] = 0.5 # [mol/kg]
dfm_sim.settings.advection_scheme = "upwind"
result = dfm_sim.run(cycles=1)
theta = dfm_sim.coverage("DFM", "CarbonDioxide", location="bottom")
print(result.status, round(float(theta.values.max()), 3))
To add an adsorbed entry one at a time, pass phase="adsorbed" (or the * key) to sim.edit.set_stoichiometric_coefficient. In C++, SetStoichiometricCoefficient takes a Phase (Phase::Gas or Phase::Adsorbed). The deck view writes each stoichiometry entry with its "phase" ("gas" or "adsorbed") and the plain component name.
Reactions in some steps only¶
New in 0.19
The step scope of a reaction is new in 0.19.
By default a reaction runs in every step of the cycle. A reaction can instead run in a list of steps. Outside these steps its rate is 0 for every rate kind. It adds no generation, no heat and no loading source there, and its logged rate is 0.
Use this when the literature model changes the rate expression from step to step. A dual-function material for capture and methanation is an example. CO2 uptake runs only in adsorption, the Temkin desorption only in the purge, and the hydrogen-assisted release only in the hydrogenation. If the uptake stays on in the hydrogenation step, it can cancel a large part of the release.
The scope holds step IDs, not names or positions. A rename or a reorder of the steps does not change it. RemoveStep removes the ID from every scope. DuplicateStep adds the copy to each scope that lists the original. A scope that lists no step gives the warning "reaction X is active in no step".
The integrator restarts at each step boundary, so the switch is not a discontinuity inside one integration. In cycle 0 the Jacobian pattern is learned again in each step. A reaction that starts in a later step thus gets its couplings in that step.
The scope is structural. It is not a registry value, and it has no --set path. Change it with the cascades SetReactionStepScope (set_reaction_step_scope) and SetReactionStepActive (set_reaction_step_active), or with rx.set_steps in Python. The first switches between all and listed. From all, listed lists every step, so the run does not change. The second adds or removes one step and makes the scope listed. Both are refused for an unknown step, reaction or solid, and then they leave the deck unchanged. The deck view gives each reaction "step_scope" ("all" or "listed") and "steps" (the step IDs).
Older engines
An engine older than 0.19 does not know the scope. It drops the scope when it loads the deck, and the reaction then runs in every step. Do not run a scoped deck with an older engine.
Building reactions in Python¶
New in 0.9
Adsorbent.add_reaction, the Reaction setters and sim.describe()["adsorbents"][i]["reactions"]. sk.to_script writes them.
Create the structure with ads.add_reaction(name, nu, kind=, basis=, effectiveness=, key_component=, adsorption_terms=, denominators=). Then set every value through the returned Reaction object. The values are the registry paths adsorbent[ID].reaction[ID].*.
import skarstrom as sk
sim = sk.Simulation.new(title="reformer")
for c in ("Methane", "Water", "CarbonMonoxide", "Hydrogen", "CarbonDioxide"):
sim.add_component(c)
ni = sim.add_adsorbent("Ni catalyst", solid_density=2000, heat_capacity=900,
thermal_conductivity=0.5, particle_void_fraction=0.4)
sim.add_adsorbent("Sorbent", solid_density=1500, heat_capacity=900,
thermal_conductivity=0.5, particle_void_fraction=0.4)
sim.bed.set_shape("cylinder", diameter=0.05)
sim.wall.set_material("ss316l")
sim.wall.set_boundary("zero_flux")
sim.add_layer("Layer 1", composition={"Ni catalyst": 0.3, "Sorbent": 0.7},
momentum="kozeny_carman", length=0.2, cells=10,
bed_void_fraction=0.4, particle_diameter=3e-3)
sim.initial_conditions.pressure = 1e5
sim.initial_conditions.temperature = 800
sim.initial_conditions.y["Water"] = 1.0
feed = sim.add_step("Feed", time=2.0)
feed.bottom.set_streams("inlet", [sk.Stream("Feed inlet", flow=sk.velocity(0.05),
y={"Methane": 0.2, "Water": 0.8}, temperature=800)])
feed.top.set_pressure("outlet", 1e5)
smr = ni.add_reaction("SMR", {"Methane": -1, "Water": -1, "CarbonMonoxide": 1, "Hydrogen": 3},
kind="lhhw", adsorption_terms=2, heat_of_reaction=206100.0)
smr.rate.pre_exp_factor = 1e3
smr.rate.activation_energy = 8e4
smr.rate.order["Hydrogen"] = 0.5
smr.rate.denominator[1].adsorption[2].exponent["Hydrogen"] = -1.0
wgs = ni.add_reaction("WGS", {"CarbonMonoxide": -1, "Water": -1, "CarbonDioxide": 1, "Hydrogen": 1},
kind="reversible_power_law", basis="concentration",
effectiveness="thiele", key_component="CarbonMonoxide")
sim.kpi.track_reaction("Methane", products=["Hydrogen"])
print(sk.to_script(sim)[:200])
A two-site rate takes one denominator per site. Here the metal site has two terms and the support site one (\(K\, p_\mathrm{H_2O}/p_\mathrm{H_2}\)):
two = ni.add_reaction("SMR two-site", {"Methane": -1, "Water": -1, "CarbonMonoxide": 1, "Hydrogen": 3},
kind="lhhw", denominators=[2, 1])
two.rate.denominator[1].adsorption[1].exponent["Methane"] = 1.0
two.rate.denominator[1].adsorption[2].exponent["Hydrogen"] = 1.0
support = two.rate.denominator[2].adsorption[1]
support.pre_exp_factor = 3.14e8
support.energy = 126.9e3
support.exponent["Water"] = 1.0
support.exponent["Hydrogen"] = -1.0
print(sim.describe()["adsorbents"][0]["reactions"][-1]["denominators"]) # [2, 1]
A film between the gas and the catalyst (External film) is one switch:
wgs.external_film = "correlation"
print(sim.get(wgs.path("external_film"))) # 1 (correlation; 0 is none)
The SMR heat of reaction, 206 100 J mol⁻¹, is the standard value at 298.15 K: with the default kirchhoff mode the engine corrects it to the bed temperature (800 K here) through the gas heat capacities, so it is not entered at 800 K.
The structure setters of a Reaction replace what was there. A new rate law keeps the parameters that it shares with the old one.
| Call | Effect |
|---|---|
ads.add_reaction(name, nu, kind="power_law", basis=None, effectiveness=None, key_component=None, adsorption_terms=0, denominators=None, **values) |
A new reaction. kind is one of skarstrom.build_kinds()["reaction_rate"]. adsorption_terms adds terms to denominator 1 of an lhhw rate; denominators gives one denominator per entry, with that many terms (New in 0.14.). values set fields such as heat_of_reaction. |
rx.set_kind(kind) |
A new rate law. |
rx.set_stoichiometry({component: nu}) |
Replace the stoichiometry. |
rx.set_basis("partial_pressure" \| "concentration") |
The activity of the rate. |
rx.set_effectiveness("constant" \| "thiele" \| "dusty_gas", key_component=None) |
The effectiveness model. The Thiele and dusty-gas models need a reactant of the reaction as key_component. "dusty_gas": New in 0.19. |
rx.external_film = "correlation" |
The gas-to-catalyst external film; "none" (the default) evaluates the rate at the bulk gas. New in 0.19. |
rx.add_denominator() / rx.remove_denominator(k) |
The denominators of an lhhw rate (one per kind of site). They are numbered from 1. The last one cannot be removed. New in 0.14. |
rx.add_adsorption_term(denominator=1) / rx.remove_adsorption_term(j, denominator=1) |
The terms of a denominator of an lhhw rate. They are numbered from 1. |
rx.set_steps(["Adsorption", ...]) / rx.set_steps(None) |
Run the reaction only in these steps (names, IDs or step objects), or in every step (None). An empty list runs it in none of them and gives a warning. New in 0.19. |
rx.steps |
The names of the steps of the scope, in cycle order, or None for every step. New in 0.19. |
ads.remove_reaction(reaction) |
Remove a reaction. IDs are not reused. |
ads.reactions |
The reactions: ads.reactions["SMR"], ads.reactions.by_id(1). |
skarstrom.to_script(sim) writes the reactions, their step scopes (by step name), their rate-law values, their denominators and their adsorption terms. Running the script gives the same deck. The raw operations (sim._build("add_reaction", ...)) are the C++ functions of adsim/objects/deck_builder.h. The reaction KPIs are in Performance Metrics.
Editing reactions from a front end¶
New in 0.18
The reaction edit cascades of adsim/objects/deck_edit.h and their sim.edit methods.
A front end (or a script) that edits a deck one change at a time uses the edit cascades. Each takes simple arguments (the solid's adsorbent ID, the reaction ID, a name, one coefficient, a kind), so each can be one operation of an editor. The stoichiometry is set one entry at a time. A refused edit raises ValueError with the engine's message and changes nothing. Values (rate constants, orders, exponents, heats of reaction) are set through the registry as usual.
rid = sim.edit.add_reaction(ni, "Methanation", kind="power_law") # empty stoichiometry
for c, nu in {"CarbonMonoxide": -1, "Hydrogen": -3, "Methane": 1, "Water": 1}.items():
sim.edit.set_stoichiometric_coefficient(ni, rid, c, nu) # new entries take the default order
sim.edit.set_reaction_kind(ni, rid, "lhhw") # shared parameters are kept
k = sim.edit.add_reaction_denominator(ni, rid) # a second kind of site: k = 2
sim.edit.add_reaction_adsorption_term(ni, rid, k)
sim.edit.set_reaction_effectiveness(ni, "Methanation", "thiele", "CarbonMonoxide")
sim.edit.rename_reaction(ni, rid, "CO methanation")
sim.edit.set_stoichiometric_coefficient(ni, rid, "Water", 0) # 0 removes the entry and its order
sim["adsorbent[Ni catalyst].reaction[CO methanation].rate.pre_exp_factor"] = 1e2
sim.edit.remove_reaction(ni, rid)
Cascade (C++, sim.edit.*) |
Effect |
|---|---|
AddReaction (add_reaction(adsorbent, name="", kind="power_law")) |
A reaction with an empty stoichiometry, the partial-pressure basis and a constant effectiveness. An empty name gives "Reaction N"; a name the solid already has is made unique. Returns the reaction ID. |
RemoveReaction (remove_reaction) |
Remove a reaction. IDs are not reused. |
RenameReaction (rename_reaction) |
Refused for an empty name or a name another reaction of the solid has. |
SetReactionKind (set_reaction_kind) |
A new rate law; the parameters the two kinds share keep their values. |
SetStoichiometricCoefficient (set_stoichiometric_coefficient) |
One coefficient. A new entry gets the default order (\(-\nu\) for a reactant, 0 for a product); a changed coefficient keeps the order. 0 removes the entry and its order. A Thiele key reactant that stops being a reactant is cleared. Refused for a component the deck does not have. phase="adsorbed" sets the entry of the adsorbed species and seeds or prunes its reference capacity; refused on a Thiele reaction (New in 0.19.). |
SetReactionBasis (set_reaction_basis) |
partial_pressure or concentration. |
SetReactionEffectiveness (set_reaction_effectiveness) |
constant, or thiele or dusty_gas (New in 0.19.) with a key reactant (empty: the first reactant). |
SetReactionStepScope (set_reaction_step_scope(adsorbent, reaction, "all" \| "listed")) |
The steps of the reaction: every step, or the listed ones. New in 0.19. |
SetReactionStepActive (set_reaction_step_active(adsorbent, reaction, step, active=True)) |
Run the reaction in a step, or not. The scope becomes listed. Refused for an unknown step. New in 0.19. |
AddReactionDenominator / RemoveReactionDenominator |
The denominators of an lhhw rate, from 1. The last one cannot be removed. |
AddReactionAdsorptionTerm / RemoveReactionAdsorptionTerm |
The terms of denominator k, from 1. |
The LHHW cascades are refused for a rate that is not lhhw. The reaction KPIs name components, not reactions, so these edits do not change them. Removing a component removes it from the reaction KPIs.
Start-up of fast reactions¶
New in 0.9
The Jacobian treatment of reaction mole fractions below and the REACTION_STIFF run-health warning are not
in 0.8. In 0.8 a fast reaction started from a bed without its products can fail with "too much work".
A catalyst often converts many times more than the flow brings: a steam-reforming catalyst at 450 °C can react 104 to 106 times the methane fed, so the gas reaches equilibrium within microseconds of meeting the catalyst. This is stiff, and the integrator (BDF) handles stiffness with long steps only when its iteration matrix holds the reaction's coupling correctly.
Start-up is where that is hardest. A bed that holds no product yet (steam and argon before a methane feed)
has components whose mole fractions sit far below their absolute tolerance (10-8): the products,
and the reactants ahead of their front. The rate laws clip each activity at 0 and floor an activity raised
to a negative power (kMinActivityBar, 10-10 bar; kMinActivityConcentration, 10-6
mol/m³), and several kinetics raise a product to a negative power (H2 at −2.5 in the Xu-Froment
steam-reforming rate). The difference quotients of the Jacobian perturb each mole fraction by its error
weight, about 10-8, in the direction it is moving. For a mole fraction far below that:
- a falling mole fraction is perturbed below zero, where the rate is clipped, so even a linear term's slope is underestimated by the ratio of the mole fraction to the perturbation;
- a power below 1 has an unbounded slope at zero, and the secant across 10-8 is far flatter than the tangent (25 times for y−2.5 at y = 10-9).
The Newton iteration then fails to converge on the fast reaction and the integrator keeps its step at the reaction's time scale: a run that should take a second takes minutes, or fails with "too much work".
The engine therefore treats the mole fraction of every component that a reaction in the cell involves (its
stoichiometry, an order or an exponent of its rate law) specially in the Jacobian: it is perturbed away from
zero whenever the usual perturbation would cross it, and, when the rate raises it to a power below 1, by
10-4 of its own value (or of the activity floor's mole fraction for a negative power) when that is
smaller. Decks without reactions, and every other unknown, keep the usual perturbation bit for bit. The
expression kind cannot report its powers; its components are perturbed away from zero only.
On a Xu-Froment steam-reforming bed (three reversible LHHW rates, 3.94 % CH4, steam to carbon 4,
0.1 % H2 in argon at 450 °C and 1.5 bar, a 4.2 cm bed fed for 1200 s,
core/test/integration/test_reaction_startup.cpp), started from steam and argon only:
| Start | Wall time | Steps | Newton convergence failures |
|---|---|---|---|
| Steam and argon, usual perturbation (0.8) | 52 s | 11 600 | 5 522 |
| Steam and argon, reaction treatment | 0.7 s | 509 | 20 |
| Gas at the equilibrium of the feed | 0.23 s | 123 | 0 |
The outlet methane conversion before breakthrough is the same from either start, and equals the gas-phase equilibrium of the feed (0.529).
When the step still collapses¶
When a reaction still holds the step far below the flow's time scale, the run-health warning
REACTION_STIFF names the reaction and the component whose near-zero mole
fraction drives it. Remedies, from the least intrusive:
- Start the bed nearer the reaction's state. Give the initial gas (
initial.y[<Component>]) a little of the product the warning names, or set it to the gas-phase equilibrium of the feed at the bed's temperature and pressure: the first breakthrough is then the reacted gas at once. Decks of fast reforming catalysts that fail from a product-free bed run in seconds from the equilibrium gas. - Put a trace of the product in the feed (0.1 % H2 in a reformer feed is common practice for this reason).
- Check the rate law. A negative order on a component that is absent at the inlet makes the rate grow without bound as the component goes to zero, up to the activity floor; make sure the orders, the denominator exponents and the units of the constants (bar, not Pa, on the partial-pressure basis) are those of the source.
Validation¶
The reaction models are validated against the reverse-flow catalytic oxidation of lean methane of Fernández et al. (2015): the light-off of a Pd monolith catalyst, the axial temperature profiles of a bench reverse-flow reactor and its ignition/extinction map. See Validation. The steady catalytic bed is the bundled example Fernandez2015_LightOff.
The reactions of the adsorbed phase and the per-step scope are validated against the cyclic CO2 capture and methanation on a NiRu–Ca/Al dual-function material of Dolat et al. (2025): the CO2 breakthrough at 380 °C and the CH4, H2O and CO2 outlet of the hydrogenation step at 220, 300 and 380 °C. See Validation. The chained three-step cycle is the bundled example Dolat2025_DFM_Cycle.
New in 0.19
The example decks Fernandez2015_LightOff and Dolat2025_DFM_Cycle.