Skip to content

Equation of State

Equation of State and Gas Properties

The gas phase is treated as an ideal-gas mixture. This page lists exactly how each gas property in the model is obtained, following core/src/objects/fluid.cpp, core/include/adsim/objects/fluid.h and the property updates in core/src/equations/adsorbent_equations.cpp.

Ideal gas law

In every cell the total molar concentration \(C\), the pressure \(P\) and the gas temperature \(T\) are tied by

\[ C = \frac{P}{R\thinspace T} \]

This is one of the residuals the solver satisfies at every time step (the Concentration equation), and the same relation is used wherever a concentration is needed at a cell face or a boundary, with the face pressure and temperature taken as the mean of the two neighbouring cells. Component concentrations follow from the mole fractions, \(c_i = y_i\thinspace C\). There is no compressibility factor, so the model is meant for pressures and temperatures where the gas is close to ideal; at high pressure, such as the 15 bar of the Casas (2012) decks, check that the ideal-gas error is acceptable for your gas.

Symbol Description Unit
\(C\) Total gas molar concentration mol m⁻³
\(c_i\) Molar concentration of component \(i\) mol m⁻³
\(y_i\) Mole fraction of component \(i\) –
\(P\) Pressure Pa
\(T\) Gas temperature K
\(R\) Gas constant, 8.314462618 J mol⁻¹ K⁻¹ J mol⁻¹ K⁻¹

The EOS object and what a second EOS must give

The balances and the concentration isotherms do not write the ideal-gas law themselves. They get every concentration and every derivative of \(\ln C\) from one equation-of-state (EOS) object, IdealGasEOS in core/include/adsim/equations/equation_of_state.h. The object is a plain struct of inline functions, chosen at compile time (EquationOfState). There is no virtual call, because the functions run in the per-cell loops of the residual.

The overall balance is solved in the form "balance divided by \(C\)". With \(C = C(T, P)\), the accumulation \(\partial (\varepsilon C)/\partial t\) divided by \(C\) becomes

\[ \varepsilon\left(\frac{\partial \ln C}{\partial P}\frac{\partial P}{\partial t} + \frac{\partial \ln C}{\partial T}\frac{\partial T}{\partial t}\right) \]

and a face flux \(C_f u_f\) becomes \(u_f\thinspace C_f / C_c\), with \(C_c\) the concentration of the cell. The component balance has the same form with \(y_i\). Thus an EOS must give these quantities per cell:

Quantity Ideal gas (the engine) Weakly compressible liquid (example)
Total concentration \(C(T, P)\) \(P/(R T)\) \(1/v(T, P)\), \(v = v_0[1 + \alpha_P (T - T_0) - \beta_T (P - P_0)]\)
\(\partial \ln C / \partial P\) \(1/P\) \(\beta_T\)
\(-\partial \ln C / \partial T\) \(1/T\) \(\alpha_P\)
Pressure-work coefficient \(T (\partial \ln v / \partial T)_P\) (energy balance, \(\varepsilon\thinspace\partial P/\partial t\) term) \(1\) \(\alpha_P T\)
Concentration of component \(i\) \(P y_i/(R T)\) \(x_i C\)
Face-to-cell ratio \(C_f / C_c\) (convective and dispersive fluxes) \((T_c/P_c)(P_f/T_f)\), \(R\) cancels \(v_c / v_f\)
Source scaling \(1/C_c\) \(R T / P\) \(v\)

Each function takes the factor that multiplies its quantity and returns the whole product. The order of the floating-point operations is the order of the expressions that the object replaced. Thus the object changes no result of the ideal-gas engine, to the last bit (test_eos_gas_bitwise.cpp examines the functions against the old expressions, and their derivatives against central differences of \(C(T, P)\)). The callers keep the floors of \(P\) and \(T\) in the denominators.

On a liquid deck, the boundary conditions (boundary_conditions.cpp, flow_boundary_value.cpp), the initial state (equation.cpp), the reaction rates in concentration form (reaction.cpp, reaction_kinds.cpp), the concentration-basis terms of the mass-transfer models (mass_transfer_model.cpp), the column inventory and stored energy of the KPIs (kpi_quadrature.cpp) and the boundary flows rebuilt from the logged state (kpis.h) take the EOS of the deck. The compressor, the vacuum pump and the linear valve law (compressor.cpp, valve.cpp) stay on the gas law, and a liquid deck refuses them; a liquid deck takes the liquid valve law and the liquid pump instead (see Liquid fluid). The saturation concentration \(p_\text{sat}/(R T)\) of the condensation terms is a vapour property, so it stays on the gas law.

Liquid fluid

New in 0.19

fluid.phase and the fluid.liquid_* and fluid.solute_molar_volume parameters.

A deck can set the phase of the fluid in the bed to liquid (fluid.phase = liquid; the default is gas). The balances then use a weakly compressible liquid: the molar volume is linear in temperature and pressure about a reference state,

\[ v(T, P) = v_0\left[1 + \alpha_P (T - T_0) - \beta_T (P - P_0)\right], \qquad C = \frac{1}{v} \]

with the derivatives of this \(C(T, P)\), so a closed volume conserves its moles exactly:

Quantity Liquid
\(\partial \ln C / \partial P\) \(\beta_T v_0 / v\)
\(-\partial \ln C / \partial T\) \(\alpha_P v_0 / v\)
Pressure-work coefficient \(T (\partial \ln v / \partial T)_P\) \(\alpha_P T v_0 / v\)
\(C_f / C_c\) \(v_c / v_f\)
Source scaling \(1 / C_c\) \(v\)

At the reference state the coefficients are \(\beta_T\) and \(\alpha_P\). A closed bed that is heated keeps \(v\) constant, so its pressure rises by \(dP = (\alpha_P / \beta_T)\thinspace dT\): about 5.7 bar per kelvin for water at 25 °C. The fluid is close to incompressible, so the velocity of a liquid fed at a constant rate is the same along the bed, and the pressure drop is the momentum model's value at that velocity.

The solvent. The first component of the deck is the solvent. It must have liquid data (see Liquid properties and latent heat). \(v\) does not depend on composition: every component has the solvent's molar volume, and the mole fraction \(x_i\) of a component in the liquid is the \(y_i\) of the deck, so \(c_i = x_i C\). This is accurate for a dilute solution.

Choosing the solvent. sim.edit.set_solvent(name) makes another component of the deck the solvent: it moves that component to the first position. sim.edit.move_component(name, index) moves a component to any position (0-based) on a gas or a liquid deck. The two edits keep every setting of each component (mole fractions, isotherms, rate models, heats of adsorption, heat capacities, solute data, user components, reactions, KPIs), because the deck stores them by component name. Only the order changes. The fluid's liquid constants below keep their values: a value of 0 then takes the new solvent's data. A user component cannot become the solvent, and set_solvent is refused on a gas deck.

New in 0.19

sim.edit.set_solvent and sim.edit.move_component (SetSolvent and MoveComponent in deck_edit.h).

The constants. Each is a fluid parameter. A value of 0 (the default) takes it from the solvent's liquid data at \((T_0, P_0)\):

Parameter Symbol Unit Default
fluid.liquid_reference_temperature \(T_0\) K 298.15
fluid.liquid_reference_pressure \(P_0\) Pa 10⁵
fluid.liquid_molar_volume \(v_0\) m³ mol⁻¹ 0: the solvent's molar volume at \((T_0, P_0)\)
fluid.liquid_expansivity \(\alpha_P\) K⁻¹ 0: the solvent's expansivity at \(T_0\)
fluid.liquid_compressibility \(\beta_T\) Pa⁻¹ 0: the solvent's compressibility at \(T_0\)
fluid.liquid_association_factor \(\phi\) - 0: 2.6 water, 1.9 methanol, 1.5 ethanol, 1 otherwise
fluid.solute_molar_volume[<component>] \(V_{A}\) m³ mol⁻¹ 0: the saturated-liquid volume at the normal boiling point, or 3 × 10⁻⁵ without liquid data

Set \(\alpha_P\) and \(\beta_T\) yourself when the pressure response matters: the fits of the liquid data have the errors given below.

Properties. On a liquid deck, every cell takes the solvent's liquid properties at the cell temperature:

  • Heat capacity: the solvent's \(C_{p,L}(T)\), as the molar heat capacity of every component, mixed as in Mixture properties. The constant gas heat capacity mode still applies the user's constants.
  • Viscosity and conductivity: the solvent's \(\mu_L(T)\) and \(k_L(T)\). The constant viscosity mode still applies the user's value.
  • Diffusivity: the Wilke–Chang diffusivity of each component in the solvent, \(D_i = 7.4\times10^{-8} (\phi M_B)^{1/2} T / (\mu_B V_{A,i}^{0.6})\) (in cm² s⁻¹ with \(M_B\) in g mol⁻¹, \(\mu_B\) in cP and \(V_A\) in cm³ mol⁻¹), in place of the Chapman–Enskog mixture rule.
  • Density: \(\rho = \sum_i c_i M_i\) with the liquid \(C\).

The heat-transfer correlations (bed to wall, axial heat dispersion, particle heat transfer) keep their gas forms. The solver log warns when a liquid deck uses one of them; give these terms constant coefficients.

Reactions and mass transfer. Reaction rates on the concentration basis use \(c_i = x_i C\), and so does an expression rate's \(c\). A Thiele effectiveness uses the liquid \(C\) and leaves out the Knudsen term (there is no Knudsen regime in a liquid-filled pore). The Kirchhoff heat of reaction integrates the solvent's \(C_{p,L}\), as the energy balance does. The capacity factor of the mass-transfer resistances (slope, secant) evaluates the isotherm at the liquid \(c\).

What a liquid deck refuses. The deck checks stop a liquid deck with:

  • an isotherm kind that reads the partial pressure (see Isotherms of a liquid fluid), a heat of adsorption from the isotherm, the dual-site Langmuir water factors, or the isosteric_rt convention;
  • a mass-transfer coefficient with Knudsen diffusion;
  • a reaction on the partial-pressure basis, or with the dusty-gas effectiveness;
  • a valve on the linear law, a compressor or a vacuum pump on a stream or a pressure end, or a pump-driven stream (changed in 0.19: a valve on the liquid ISA law and a liquid pump on a set-flow stream or a pressure end are accepted);
  • condensation on the wall or the solid;
  • a solvent without liquid data.

A closed, heated liquid. A closed liquid cannot expand, so heating it raises its pressure by \((\alpha_P/\beta_T)\thinspace dT\). The solver log warns for each step that closes both bed ends of a liquid deck and heats it (a heating medium above the initial temperature, an energy source, a wall held above it, or an exothermic heat of adsorption). The warning gives the rate in bar per kelvin, and the rise for the medium's or the wall's temperature.

The KPIs of a liquid deck (inventory, boundary flows, stored energy) use the liquid \(C\), and a liquid deck has the breakthrough KPIs (New in 0.19). The stored energy of the liquid is \(\varepsilon (C u)\) with \(u = h - P v\) and the exact enthalpy of the equation of state, \(h = \int C_{p,L}\thinspace dT + v_0 \left[(1 - \alpha_P T_0)(P - P_0) - \tfrac{1}{2}\beta_T (P - P_0)^2\right]\). Its differential \(dh - v\thinspace dP = C_{p,L}\thinspace dT - \alpha_P v_0 T\thinspace dP\) is the temperature-form energy balance with its pressure work, so the cycle energy balance of a closed, heated liquid bed closes to the solver's tolerance.

The run-health check SUPERSATURATION and its deck warning do not apply to a liquid deck. They compare the partial pressure \(P y_i\) of a vapour with its saturation pressure, and in a liquid that test is meaningless: the solvent at 1 bar is far above its own \(p_\text{sat}\) (water: 3.2 kPa at 25 °C), so every liquid deck would warn.

import skarstrom as sk
sim = sk.Simulation.new(title="liquid")
sim.add_component("Water")
sim.add_component("Methanol")
sim.fluid.phase = "liquid"
sim.fluid.liquid_compressibility = 4.5e-10   # [1/Pa]; 0 takes the water data
print(sim.fluid.phase, sim.get("fluid.liquid_compressibility"))
sim.edit.set_solvent("Methanol")              # Methanol is now the first component and the solvent
sim.edit.move_component("Methanol", 1)        # and back: Water is the solvent again
print(sim.components)

User components, trace solutes and mass units

New in 0.19

User components (sim.add_user_component, fluid.user_component[<name>].*), fluid.solute_diffusivity, fluid.component_abstol, settings.trace_tolerance_factor, the mass-concentration units of the compositions and the mass_concentration and mass_loading series.

User components. A liquid deck can use a solute that is not in the component table (PFAS, phenol, dyes). Define it with its molar mass, and its molar volume at the normal boiling point \(V_A\) (for the Wilke–Chang diffusivity) or a constant diffusivity. The formula is for display only. A user component:

  • is for a liquid deck only, and cannot be the solvent (the first component);
  • has a name of 1 to 40 letters, digits and the characters _ . : + -, which starts with a letter or a digit (for example 6:2-FTS);
  • must not have the name, formula or CoolProp alias of a table component (the comparison ignores case);
  • needs a molar mass > 0, and \(V_A > 0\) or a diffusivity > 0;
  • has no saturation curve, no liquid data and no ideal-gas heat capacity. It cannot condense, and on a liquid deck it takes the solvent's heat capacity as every component does.

sim.edit.edit_user_component changes the molar mass, formula, \(V_A\) or diffusivity. sim.remove_component removes the component and its definition (refused while a reaction uses it). There is no rename.

Diffusivity override. fluid.solute_diffusivity[<component>] (m² s⁻¹) replaces the Wilke–Chang value of any component of a liquid deck, a table component too. 0 (the default) keeps Wilke–Chang.

Trace solutes. A liquid deck gives each component its own absolute tolerances. The mole fraction of component \(i\) has \(s\thinspace x_{\text{ref},i}\) and its loading \(s\thinspace q^*(x_{\text{ref},i})\), where:

  • \(x_{\text{ref},i}\) is the largest inlet or initial mole fraction of \(i\) in the deck;
  • \(q^*\) is the isotherm of each solid with \(i\) alone at \(x_{\text{ref},i}\) in the solvent, at the temperature where it is fed;
  • \(s\) is settings.trace_tolerance_factor (default 10⁻⁴).

Each tolerance is between 10⁻³⁰ and 10⁻⁸, the scalar tolerance of a gas deck. A component that no inlet or initial state has keeps 10⁻⁸. fluid.component_abstol[<component>] > 0 replaces \(s\thinspace x_{\text{ref},i}\) (and the loading's tolerance by component_abstol \(q^*/x_{\text{ref}}\)). Thus 1 ng/L of a solute (\(x \approx 4\times10^{-17}\) for PFOA in water) is resolved: with the gas tolerance of 10⁻⁸ the error test ignores it. A gas deck keeps the scalar tolerances.

Mass units. On a liquid deck the inlet, boundary and initial mole fractions (endpoint[ID].y[<component>], initial.y[<component>]) also take and give a mass concentration (kg/m3, g/L, mg/L, ug/L, ng/L). The conversion is at the EOS reference state, \(c_{m,i} = x_i M_i / v_0\), and is exact there because \(v\) does not depend on composition. The deck stores \(x_i\). The series mass_concentration (\(x_i C(T, P) M_i\) with the cell's \(C\), kg/m3) and mass_loading (\(q_i M_i\), kg/kg; 10⁻³ kg/kg is 1 mg/g) are logged on liquid decks.

from skarstrom import ureg as u
sim.add_user_component("PFOA", 414.07 * u.g / u.mol, molar_volume=3.6e-4, formula="C8HF15O2")
sim.set("initial.y[PFOA]", 1 * u.ng / u.L)            # stored as a mole fraction
print(sim.get("initial.y[PFOA]"), sim.get("initial.y[PFOA]", unit="ng/L"))
sim.fluid.solute_diffusivity["PFOA"] = 5e-10           # [m2/s]; 0 = Wilke-Chang
sim.edit.edit_user_component("PFOA", formula="C7F15COOH")

Where the component constants come from

Components are chosen by their CoolProp fluid names in the deck's fluid package. The engine does not call CoolProp. The fixed constants of each component are in a table, core/include/adsim/objects/component_properties.h. The script scripts/gen_component_properties.py writes this table from the CoolProp fluid files:

  • Molar mass \(M_i\) of each component.
  • Formula, CAS number and aliases (the component manifest).
  • Critical point, triple point and vapour-pressure equation (the saturation pressure of the GAB isotherms; see Isotherms).

The heat capacity, viscosity and thermal conductivity come from polynomials; see below.

New in 0.10

The table replaces the CoolProp calls of earlier engines. The values are the same.

Gas heat capacity

The heat capacity of each pure component is its ideal-gas heat capacity \(C_{p0,i}(T)\), evaluated at the local gas temperature in every cell at every residual evaluation, from the NASA 7-coefficient polynomials:

\[ \frac{C_{p0,i}}{R} = a_0 + a_1 T + a_2 T^2 + a_3 T^3 + a_4 T^4,\qquad \frac{H_{0,i}}{R\thinspace T} = a_0 + \frac{a_1 T}{2} + \frac{a_2 T^2}{3} + \frac{a_3 T^3}{4} + \frac{a_4 T^4}{5} + \frac{a_5}{T} \]

with one coefficient set per component, valid to 1000 K: the low-temperature set of TM-4513 (adsorption processes stay well below 1000 K, so the report's 1000–6000 K set is not carried). The coefficients are those of McBride, Gordon and Reno (1993), Coefficients for Calculating Thermodynamic and Transport Properties of Individual Species, NASA TM-4513, copied unchanged with each species' data source (core/include/adsim/objects/ideal_gas_heat_capacity.h). The reference and each species' TM-4513 label and data-source code are available through the API (skarstrom.ideal_gas_heat_capacity_reference() and skarstrom.ideal_gas_heat_capacity_source(component); C++ kIdealGasHeatCapacityReference, NasaPolynomial::species and source). Outside a polynomial's range (below 200 K for most species, 298 or 300 K for a few, and above 1000 K) the value at the nearer limit is used.

Why ideal-gas and temperature-dependent:

  • The initial temperature is only a start. Earlier engines evaluated CoolProp's heat capacity once, at the initial-condition pressure and temperature, and held it for the run. The initial temperature then also set a model parameter, so two runs differing only in their initial temperature reached different cyclic steady states (for Ward 2024 with a 40 K colder start, recovery differed by 2.4×10⁻⁴). A TSA cycle that heats the gas by 100 K also kept the heat capacity of the initial temperature throughout.
  • Gas-phase values for condensables. A vapour such as water, ethanol or toluene takes its vapour heat capacity whatever its pure state at the bed's pressure and temperature (water at 298 K: 33.6 J mol⁻¹ K⁻¹, not the liquid's 75.3).
  • Ideal gas. The equation of state is the ideal-gas law, and the real-gas correction to \(C_p\) of the permanent gases is small at PSA pressures (at 1 bar and 298 K: CO₂ +0.8 %, CH₄ +0.3 %, N₂ +0.2 %).

The energy balance is written in temperature form, \(\rho C_{p,g}(\partial T/\partial t + u\thinspace\partial T/\partial z)\) with the local \(C_{p,g}(T)\), which is exact for an ideal gas whose enthalpy is \(h = \int C_{p0}\thinspace dT\): no extra term is needed. The open-system energy test (ClosedBedEnergyTest.OpenSystemEnergyBalanceConvergesUnderGridRefinement) checks the closure with this enthalpy.

Agreement with CoolProp. Each polynomial is compared with CoolProp's ideal-gas \(C_{p0}\) (the ideal-gas part of the reference equation of state) from 200 K, or from the fit's lower limit or the fluid's triple point if higher, to 800 K (test_ideal_gas_heat_capacity.cpp, which prints this table). The test fails if an error exceeds 1 % for the light and permanent gases (Ar, CO₂, CO, He, H₂, Kr, CH₄, Ne, N₂, O₂, Xe) or 2 % for any other component.

Component Polynomial range [K] Compared [K] Largest error at [K] \(C_{p0}\)(298.15 K) [J mol⁻¹ K⁻¹]
Ammonia 200–1000 200–800 +0.57 % 650 35.63
Argon 200–1000 200–800 0.00 % — 20.79
Benzene 200–1000 279–800 −1.35 % 424 81.92
Butane 200–1000 200–800 −0.74 % 200 98.66
CarbonDioxide 200–1000 217–800 −0.14 % 382 37.14
CarbonMonoxide 200–1000 200–800 +0.13 % 420 29.14
Cyclohexane 200–1000 280–800 −1.81 % 380 105.34
Ethane 200–1000 200–800 −0.49 % 200 52.50
Ethanol 200–1000 200–800 −0.53 % 415 65.31
Ethylene 200–1000 200–800 −0.78 % 200 42.89
Fluorine 200–1000 200–800 +0.24 % 655 31.30
Helium 200–1000 200–800 0.00 % — 20.79
Hydrogen 200–1000 200–800 +0.91 % 200 28.84
HydrogenSulfide 300–1000 300–800 −0.29 % 800 34.21
Isobutane 200–1000 200–800 −0.65 % 200 96.64
Isopentane 298–1000 298–800 −0.15 % 493 118.85
Krypton 200–1000 200–800 0.00 % — 20.79
Methane 200–1000 200–800 +0.81 % 745 35.69
Methanol 200–1000 200–800 −0.38 % 425 44.04
Neon 200–1000 200–800 0.00 % — 20.79
Nitrogen 200–1000 200–800 −0.11 % 685 29.12
NitrousOxide 200–1000 200–800 +0.28 % 210 38.63
Octane 200–1000 217–800 −1.28 % 217 187.78
Oxygen 200–1000 200–800 +0.06 % 365 29.38
Pentane 298–1000 298–800 +0.50 % 798 119.95
Propane 200–1000 200–800 +0.69 % 665 73.59
Propylene 200–1000 200–800 +0.35 % 665 64.43
SulfurDioxide 300–1000 300–800 +0.10 % 365 39.94
SulfurHexafluoride 300–1000 300–800 −0.17 % 355 97.42
Toluene 200–1000 200–800 −1.33 % 200 103.28
Water 200–1000 274–800 +0.04 % 744 33.59
Xenon 200–1000 200–800 0.00 % — 20.79

The larger differences for the heavier organics are differences between the two published correlations (TM-4513's fit and the ideal-gas part of each reference equation of state), not fitting noise; below its triple point (279 K) cyclohexane's two correlations differ by up to 8 %, which is why the comparison starts there.

Every component has a polynomial. Earlier engines also had Hexane, which has no TM-4513 entry. Its heat capacity was CoolProp's value at the initial conditions, held for the run.

Air is not a component. Earlier engines had Air, a lumped pseudo-component with one isotherm for N₂ and O₂ together and a heat capacity mixed from the N₂, O₂ and Ar entries. Use the real species instead: Nitrogen and Oxygen (and Argon) for a separation, or Nitrogen alone for an inert carrier. A deck, adsorbent or cycle file that has Air loads with Nitrogen in its place. If the deck already has Nitrogen, Air's mole fractions are added to Nitrogen's and Air's isotherm, kinetics and heats are dropped.

Changed in 0.13

Air was removed, and decks with Air load with Nitrogen.

Changed in 0.10

Hexane is removed. A deck that has Hexane does not load. The error names the component.

Kirchhoff heats of reaction integrate the same heat capacities exactly: \(\Delta H_r(T) = \Delta H_r(T_\mathrm{ref}) + \sum_i \nu_i \int_{T_\mathrm{ref}}^{T} C_{p,i}\thinspace dT\).

Constant gas heat capacity and viscosity

Models in the literature often use fixed gas properties; for example, Yancy-Caballero et al. (2020) and Haghpanah et al. (2013) use \(C_{p,g} = 30.7\) J mol⁻¹ K⁻¹ and \(\mu = 1.72\times10^{-5}\) Pa s. Two fluid switches reproduce them:

  • Gas heat capacity mode (fluid.gas_heat_capacity_mode): ideal_gas (the default, as above; coolprop, its former name, is still accepted) or constant. With constant, the molar heat capacity of each component is the value given in fluid.gas_heat_capacity[<component>] [J mol⁻¹ K⁻¹], and \(C_{p,i}\) is that value divided by \(M_i\). The mixing rule below is unchanged, so equal values give that molar heat capacity at every composition. A new component starts at its ideal-gas heat capacity at 25 °C (the polynomial above at 298.15 K, rounded to 0.01 J mol⁻¹ K⁻¹), for example 37.14 for CO₂ and 29.12 for N₂. You can change the value.
  • Viscosity mode (fluid.viscosity_mode): polynomial (the default, the mole-fraction average below) or constant. With constant, every cell has the mixture viscosity fluid.viscosity [Pa s], whatever its temperature and composition.

The Gas phase adsorbed-phase heat capacity takes the same \(C_{p,i}\thinspace M_i\), at the temperature of the adsorbed phase (the gas temperature in LTE, the solid's in LTNE), so with a constant gas heat capacity it is the constant too.

Mixture properties

All mixture properties use linear mole-fraction mixing, evaluated in every cell at every residual evaluation:

\[ M = \sum_i y_i\thinspace M_i,\qquad \rho = \sum_i c_i\thinspace M_i = C\thinspace M,\qquad C_{p,g} = \frac{\sum_i y_i\thinspace M_i\thinspace C_{p,i}}{\sum_i y_i\thinspace M_i} \]
\[ \mu = \sum_i y_i\thinspace \mu_i(T),\qquad k_g = \sum_i y_i\thinspace k_i(T) \]

The heat capacity is mixed on the molar basis: mole fractions average the pure-component molar heat capacities \(M_i C_{p,i}\) (exact for an ideal-gas mixture), and dividing by the mixture molar mass \(M\) gives the per-kilogram \(C_{p,g}\) [J kg⁻¹ K⁻¹] that the energy balance multiplies by \(\rho\). The volumetric heat capacity is therefore \(\rho\thinspace C_{p,g} = C \sum_i y_i\thinspace M_i\thinspace C_{p,i}\). Every user of the gas heat capacity (the energy balances, the convective enthalpy terms, the thermal dispersion and heat-transfer correlations and the logged heat capacity) takes this one value. For 50/50 H₂/CO₂ it is about 33 J mol⁻¹ K⁻¹, where averaging the per-kilogram \(C_{p,i}\) by mole fraction would give about 174.

The linear rules for viscosity and conductivity are simpler than the Wilke or Wassiljewa mixing rules; they are adequate for the dilute, chemically similar mixtures typical of PSA, and are what the model uses.

Viscosity and thermal conductivity polynomials

The pure-component viscosity \(\mu_i\) and conductivity \(k_i\) are evaluated in every cell at every residual evaluation, so they are degree-4 polynomials in temperature with coefficients fitted offline and compiled into the program (viscosity_coefficients.h, thermal_conductivity_coefficients.h, both generated by scripts/gen_transport_coefficients.py):

\[ \mu_i(T) = \sum_{n=0}^{4} a_{n,i}\thinspace T_c^{\thinspace n},\qquad k_i(T) = \sum_{n=0}^{4} b_{n,i}\thinspace T_c^{\thinspace n},\qquad T_c = \min\negthinspace \big(\max(T,\thinspace 150\ \text{K}),\thinspace 650\ \text{K}\big) \]
  • The temperature is clamped to 150–650 K before evaluation: outside that window the property is held at its value at the nearest end, never extrapolated.
  • Each row of the tables has one of three sources. The comment of the row names it.
Source Components Data
CoolProp viscosity of all components except the eight below; conductivity of the same components except HydrogenSulfide and Cyclohexane Least-squares fit of CoolProp's dilute-gas value, sampled at low pressure so that condensable components (water, alcohols, hydrocarbons) get their vapour values, not the liquid's (water at 298 K: 9.7 × 10⁻⁶ Pa s and 0.0184 W m⁻¹ K⁻¹). The row gives the primary correlation, for example Lemmon and Jacobsen (2004) for N₂, O₂ and Ar. Propylene (extended corresponding states) and the Isopentane viscosity (Chung method) are estimates.
NASA CEA viscosity and conductivity of CarbonMonoxide, Ethylene, Fluorine, Krypton, Neon, NitrousOxide, SulfurDioxide and Xenon; conductivity of HydrogenSulfide The transport database of the NASA CEA program (Svehla, NASA TM-4647, 1995), fitted to evaluated data, for example Bich et al. (1990) for the noble gases. The data start at 200 K (300 K for SulfurDioxide and HydrogenSulfide). Below that limit, the fit follows kinetic theory (Chapman–Enskog for \(\mu\), Eucken for \(k\)) joined to the NASA curve in value and slope.
Eucken conductivity of Cyclohexane \(k = \mu\thinspace (c_p + 1.25\thinspace R/M)\), with the viscosity row of the component and its ideal-gas heat capacity.
  • Each polynomial is within 1 % of its source where the source has data, and within 3 % of the kinetic-theory shape below the NASA limit.
  • The Eucken relation underestimates the conductivity of polyatomic gases. Earlier engines used it for the eight NASA components, and it gave values up to 21 % low (Ethylene at 650 K). Their Chapman–Enskog viscosity, with the Lennard-Jones parameters of Svehla (1962), was about 3.5 % low for Neon, Krypton and Xenon.
  • Pressure dependence is neglected; gas viscosity changes by less than about 1 % over 0.1–10 bar.
  • A floor of 10⁻⁶ Pa s (viscosity) and 10⁻⁴ W m⁻¹ K⁻¹ (conductivity) guards against a fit undershooting at the window edges. A component with no coefficients at all falls back to 1 × 10⁻⁵ Pa s and 0.024 W m⁻¹ K⁻¹.

Binary diffusion coefficients (Chapman–Enskog)

The binary molecular diffusion coefficient of every pair of components is evaluated in every cell at every residual evaluation, at the cell's gas temperature and pressure, from the Chapman–Enskog relation in the form of Poling, Prausnitz and O'Connell (The Properties of Gases and Liquids, 5th ed., 2001, Chapter 11) (core/src/equations/binary_diffusion_model.cpp):

\[ D_{ij} = \frac{2.6635\times10^{-7}\thinspace T^{3/2}}{\left(P/10^{5}\right)\thinspace M_{ij}^{1/2}\thinspace \sigma_{ij}^{2}\thinspace \Omega_D}, \qquad M_{ij} = \frac{2}{1/M_i + 1/M_j} \]

with \(D_{ij}\) in m² s⁻¹, \(T\) in K, \(P\) in Pa (so \(P/10^5\) is in bar), the molar masses \(M\) in g mol⁻¹ and \(\sigma_{ij}\) in Å. The constant is \(\tfrac{3}{16}\sqrt{2\pi k_B^3 N_A / (0.5\times10^{-3}\ \text{kg mol}^{-1})}\big/(10^5\ \text{Pa}\cdot\pi\cdot10^{-20}\ \text{m}^2) = 2.6635246\times10^{-7}\), with the exact SI values of \(k_B\) and \(N_A\).

Changed in 0.16

Earlier versions used the rounded textbook constant \(2.66\times10^{-7}\) (0.00266 cm² s⁻¹ in Poling et al.), which gives every \(D_{ij}\) 0.13 % low.

The collision integral is the correlation of Neufeld, Janzen and Aziz (1972) in the reduced temperature \(T^* = T/\varepsilon_{ij}\):

\[ \Omega_D = \frac{A}{(T^*)^{B}} + \frac{C}{\exp(D\thinspace T^*)} + \frac{E}{\exp(F\thinspace T^*)} + \frac{G}{\exp(H\thinspace T^*)} \]

\(A = 1.06036\), \(B = 0.15610\), \(C = 0.19300\), \(D = 0.47635\), \(E = 1.03587\), \(F = 1.52996\), \(G = 1.76474\), \(H = 3.89411\).

The pair parameters follow the Lorentz–Berthelot combining rules from each component's Lennard-Jones length \(\sigma_i\) [Å] and energy \(\varepsilon_i\) (as \(\varepsilon/k_B\), K):

\[ \sigma_{ij} = \tfrac12\left(\sigma_i + \sigma_j\right), \qquad \varepsilon_{ij} = \sqrt{\varepsilon_i\thinspace \varepsilon_j} \]

The Lennard-Jones parameters are those of Svehla (NASA TR R-132, 1962, Table I(a)); octane and toluene use CoolProp's viscosity-fit pairs, and isopentane uses the n-pentane row.

Symbol Description Unit
\(D_{ij}\) Binary diffusion coefficient of the pair \(i\), \(j\) m² s⁻¹
\(M_i\) Molar mass of component \(i\) g mol⁻¹
\(\sigma_i\), \(\sigma_{ij}\) Lennard-Jones length of component \(i\), of the pair Å
\(\varepsilon_i\), \(\varepsilon_{ij}\) Lennard-Jones energy over \(k_B\) of component \(i\), of the pair K
\(T^*\) Reduced temperature \(T/\varepsilon_{ij}\) -
\(\Omega_D\) Diffusion collision integral -

Molecular diffusion in a mixture

Each component \(i\) has one effective molecular diffusivity \(D_{i,m}\) in every cell (UpdateMolecularDiffusionCoefficient and UpdateWilkeMixtureDiffusivity in core/src/equations/adsorbent_equations.cpp). It depends on the number of components \(N\):

  • One component. \(D_{i,m} = D_{ii}\), the self-diffusion coefficient: the relation above with \(\sigma_{ii} = \sigma_i\), \(\varepsilon_{ii} = \varepsilon_i\) and \(M_{ii} = M_i\).
  • Two components. Both components take the binary value, \(D_{1,m} = D_{2,m} = D_{12}\).
  • Three or more components. Wilke's equation (Wilke 1950), with a smooth floor on the partner mole fractions (WilkeMixtureDiffusivity in adsim/equations/binary_diffusion_model.h):
\[ D_{i,m} = \frac{\sum_{j \ne i} \hat y_j}{\left\lvert \sum_{j \ne i} \hat y_j / D_{ij} \right\rvert}, \qquad \hat y_j = \tfrac{1}{2}\left(y_j + \sqrt{y_j^2 + \delta^2}\right), \qquad \delta = 10^{-6} \]

The \(y_j\) are the raw mole fractions of the cell, the solver's unknowns, not normalised to a sum of one. Without the floor, \(\hat y_j = y_j\) and \(\sum_{j \ne i} y_j = 1 - y_i\), this is Wilke's equation \(D_{i,m} = (1 - y_i)\big/\sum_{j\ne i} (y_j/D_{ij})\): the harmonic mean of the binary coefficients, weighted by the other components' mole fractions on an \(i\)-free basis. It describes component \(i\) diffusing through a stagnant mixture of the others (see Poling, Prausnitz and O'Connell, Chapter 11). For a trace component (\(y_i \to 0\)) it is Blanc's law (Blanc 1908), \(1/D_{i,m} = \sum_{j \ne i} y_j/D_{ij}\), the exact Stefan–Maxwell limit; the two names are often used interchangeably, and the engine called this rule Blanc's law before 0.16. It is not a full Stefan–Maxwell treatment: the diffusion fluxes of the components are not coupled to each other.

The floor \(\delta\) is 100 times the solver's absolute tolerance on a mole fraction. Below about \(10^{-8}\) a mole fraction is solver noise, and the rule weights the partners by their ratios; the floor keeps those ratios out of \(D_{i,m}\). The absolute value keeps \(D_{i,m} > 0\) for a Newton probe with \(P < 0\), where every \(D_{ij} < 0\).

Limits:

  • Component \(i\) in trace amounts (\(y_i \to 0\), \(\sum_{j\ne i} y_j \to 1\)): \(D_{i,m}\) tends to the mole-fraction-weighted harmonic mean of \(D_{ij}\), Blanc's law.
  • Component \(i\) pure (every \(y_j \to 0\)): the plain formula is \(0/0\); with the floor, \(D_{i,m}\) is the unweighted harmonic mean of the \(D_{ij}\).
  • Everywhere: \(D_{i,m}\) lies between the smallest and the largest \(D_{ij}\), does not depend on the order of the partners, and is a smooth function of the mole fractions. Where every partner has \(y_j \ge 10^{-3}\), it equals Wilke's equation without the floor to a relative \(2 \times 10^{-7}\) (\(2 \times 10^{-5}\) at \(y_j \ge 10^{-4}\)).

Changed in 0.16

Earlier versions regularised the denominator instead, \(\left\lvert \sum_{j \ne i} y_j \right\rvert \big/ \sqrt{\epsilon + (\sum_{j \ne i} y_j / D_{ij})^2}\) with \(\epsilon = 10^{-12}\) s² m⁻⁴, which gave \(D_{i,m} \to 0\) in a cell of pure \(i\).

Symbol Description Unit
\(D_{i,m}\) Effective molecular diffusivity of component \(i\) in the mixture m² s⁻¹
\(y_j\), \(\hat y_j\) Mole fraction of component \(j\) (unnormalised), and its smooth floor -
\(\delta\) Scale of the smooth floor (kWilkeMoleFractionFloor) -
  • C. R. Wilke, "Diffusional properties of multicomponent gases", Chem. Eng. Prog. 46 (1950) 95–104.
  • A. Blanc, "Recherches sur les mobilités des ions dans les gaz", J. Phys. Theor. Appl. 7 (1908) 825–839.

Mixture diffusivity in the Schmidt number. The Schmidt number uses the mole-fraction-weighted mean of the component diffusivities, with a floor:

\[ \mathrm{Sc} = \frac{\mu}{\rho\thinspace D_{mix}}, \qquad D_{mix} = \max\left(\sum_i y_i\thinspace D_{i,m},\ 10^{-9}\ \text{m}^2\thinspace\text{s}^{-1}\right) \]

Where each diffusivity is used.

Model term Diffusivity
Axial dispersion, Ruthven, Taylor–Aris, Edwards–Richardson and Wakao–Funazkri (Transport Correlations) \(D_{i,m}\) of each component (changed in 0.15: a user-entered constant \(D_m\) before)
Film mass-transfer coefficient, \(k_f = \mathrm{Sh}\thinspace D_{i,m}/d\) (the film term of the kinetic models) \(D_{i,m}\)
Haynes (1973) mass-transfer coefficient (film and macropore terms) \(D_{i,m}\)
Macropore molecular-diffusion term (Macropore, Macropore + Knudsen, Macropore capacity factor, Mass-transfer resistances) the model's constant molecular diffusivity when it is set above 0; otherwise \(D_{i,m}\)
Schmidt number, and through it the Sherwood correlations \(D_{mix}\) above
Thiele modulus of a reaction, \(D_{eff} = (\varepsilon_p/\tau)\thinspace D_{i,m}\) of the key reactant (Reactions) \(D_{i,m}\)

See Kinetic Models for the mass-transfer coefficients.

Other gas properties

  • Molecular diffusivities come from the Chapman–Enskog binary-diffusion model and the mixture rules above.
  • Adsorbed-phase heat capacity is either a constant per component or, with the Gas phase option of the energy balance, \(C_{p,i}\thinspace M_i\) from the same gas heat capacity at the adsorbed phase's temperature; see Energy Balance.
  • Isothermal runs evaluate all of the above at the fixed temperature \(T_{\text{iso}}\); see Isothermal mode.

Liquid properties and latent heat

Used by the wall liquid film and the liquid hold-up

The engine has the data and the functions below (adsim/objects/liquid_properties.h), and the tests cover them. The wall liquid film uses the latent heat and the liquid heat capacity (New in 0.19). The liquid hold-up on the solid uses those two and the saturated-liquid density, for the auto maximum hold-up and the liquid volume fraction of the LIQUID_HOLDUP warning (New in 0.19). The other functions are for a liquid mobile phase.

Latent heat of vaporisation. The latent heat of a component with a saturation curve is the ideal-gas Clausius–Clapeyron relation on the vapour-pressure ancillary that the equilibrium uses (see Where the component constants come from):

\[ \Delta H_{vap}(T) = R\thinspace T^2 \frac{d \ln p_{sat}}{dT} \]

The derivative is analytic. With \(\theta = 1 - T/T_r\) and \(S = \sum_i n_i \theta^{t_i}\), it is \(dS/dT = -\frac{1}{T_r}\sum_i n_i t_i \theta^{t_i - 1}\), and \(d\ln p_{sat}/dT = dS/dT\). When the ancillary uses \(\tau_r\), it is \(\frac{T_r}{T}\frac{dS}{dT} - \frac{T_r}{T^2}S\). Like the saturation pressure, the derivative is 0 at \(T \ge T_c\) and below \(0.75\,T_{triple}\). The value is consistent with the equilibrium by construction. It is the ideal-gas value: for water it is 44.06 kJ/mol at 298.15 K and 41.32 kJ/mol at 373.15 K, while the true enthalpy of vaporisation is 43.99 and 40.65 kJ/mol. Without an ancillary the value is NaN.

Saturated-liquid data. Each component of the table that has a saturation curve and a liquid window of at least 20 K has fits to the saturated liquid over the window \([T_{lo}, T_{hi}] = [\max(T_{triple}, 200\ \mathrm{K}), \min(0.9\,T_c, 600\ \mathrm{K})]\):

Property Form
Molar density The CoolProp rhoL ancillary, \(\rho = \rho_{red}(1 + \sum_i n_i \theta^{t_i})\)
Isobaric heat capacity \(C_{p,L}\) [J/(mol K)] Degree-4 polynomial in \(T\)
Isothermal compressibility \(\beta_T\) [1/Pa] \(\exp\) of a degree-6 polynomial in \(T\) (fit of \(\ln\beta_T\)) (changed in 0.19)
Isobaric expansivity \(\alpha_P\) [1/K] \(\exp\) of a degree-12 polynomial in \(T\) (fit of \(\ln\alpha_P\) to CoolProp's value) (changed in 0.19)
Viscosity \(\mu\) [Pa s] Vogel, \(\ln\mu = A + B/(T - C)\)
Thermal conductivity \(k\) [W/(m K)] Degree-2 polynomial in \(T\)

The polynomials are in \(x = 2(T - T_{lo})/(T_{hi} - T_{lo}) - 1\) and have near-minimax relative error. The molar volume at pressure \(p\) is \(v = \exp(-\beta_T (p - p_{sat}))/\rho\). The accessors clamp \(T\) to the window and do not extrapolate (as the gas viscosity does).

The data come from CoolProp 6.7.0 at development time, from the fluid files that the component table pins (by commit and SHA-256) and from CoolProp's own functions at saturation. The engine does not link CoolProp. scripts/gen_liquid_properties.py writes liquid_properties.gen.h, and CI runs it with --check. The header records the maximum relative error of each fit for each component. For water they are 0.1 % (density), 0.7 % (\(C_{p,L}\)), 0.07 % (\(\beta_T\)), 4 % (\(\mu\)), 1.5 % (\(k\)) and 0.9 % (\(\alpha_P\)). The largest over all components are 0.5 % for \(\beta_T\) (ethanol) and 0.9 % for \(\alpha_P\) (water).

\(\beta_T\) and \(\alpha_P\). Both are fits to CoolProp's saturated liquid, as the other properties are. Below the normal boiling point this is the 1 bar isobar (for water the two differ by less than 0.05 % at 298 K and 343 K), and above it the saturated liquid follows the pressure of a closed heated bed. The accessors ignore the pressure. Both fits are of the logarithm, so the value is always positive, and a polynomial of \(\ln\beta_T\) follows the minimum of water at about 319 K and the rise towards \(0.9\,T_c\). The expansivity is not the derivative of the density ancillary, which is 20 % low for water at 298 K (2.04 × 10⁻⁴ 1/K against 2.57 × 10⁻⁴ 1/K). Water has its density maximum at 277 K, where \(\alpha_P\) is zero and a relative error has no meaning. Thus \(\alpha_P\) is fitted and scored only where it is at least 2 % of its maximum (water: \(T \ge 283.5\) K), and it stays positive below that. For water, the error is below 1 % over 284–582 K, and \(\beta_T\) has less than 0.1 %. The pressure rise of a closed heated liquid, \(dP/dT = \alpha_P/\beta_T\), is 5.7 bar/K for water at 298 K, within 0.5 % of CoolProp.