calculate_selectivity
Need to know which gas component a porous material prefers? Compute adsorption selectivity from GCMC mixture loadings and feed mole fractions.
Instructions
Calculate adsorption selectivity S_AB from mixture GCMC results (4-4).
Uses the adsorption selectivity definition: S_AB = (x_A / x_B) / (y_A / y_B) where x = adsorbed-phase mole fraction, y = gas-phase (feed) mole fraction.
Inputs come from parse_raspa_output()["components"] for a GCMCMixture simulation.
loading_a / loading_b: average loading of each component in mol/kg (or any consistent units — they cancel in the ratio). feed_fraction_a / feed_fraction_b: mole fractions in the feed gas (must sum to 1.0 for a binary; for partial fractions in a larger mixture, pass the relevant pair).
Returns S_AB > 1 means the material prefers A over B. S_AB < 1 means preference for B. S_AB = 1 means no selectivity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label_a | No | A | |
| label_b | No | B | |
| loading_a | Yes | ||
| loading_b | Yes | ||
| feed_fraction_a | Yes | ||
| feed_fraction_b | Yes |