Mocca.jl is a Julia package for simulating cyclic adsorption processes for CO2 capture, such as pressure and vacuum swing adsorption (PSA/VSA). It finds the cyclic steady state of a process, measures its purity, recovery, energy use and productivity, and computes their gradients with respect to the operating settings, for optimisation.
To learn more about using Mocca please see the documentation.
Mocca comes with the four-step VSA process of Haghpanah et al. (2013) on zeolite 13X, a two-bed VSA with pressure equalisation, and the wet flue gas processes of Krishnamurthy et al. (2014), and any number of beds can be connected through valves and flow controllers. The examples include getting started (run a process to cyclic steady state and export the results to a spreadsheet), a process built from its parts, a breakthrough curve, a two-bed VSA with pressure equalisation, the wet flue gas processes, gradients at cyclic steady state, optimisation and history matching.
Temperature swing processes, for example for Direct Air Capture (DAC), are not yet included.
Install Julia 1.10 or later from julialang.org. In a folder for your work, start Julia with julia --project=. and add Mocca, and CairoMakie for saving plots:
using Pkg
Pkg.add(url = "https://github.com/sintefmath/Mocca.jl", rev = "main")
Pkg.add("CairoMakie")The version in Julia's package registry (0.1.0) has the earlier interface, so install from GitHub as above until the next release. The first run in a session takes a few minutes while Julia compiles. See the installation guide for more.
Run the following code to read the four-step vacuum swing adsorption (VSA) process of Haghpanah et al. (2013) from Mocca's library, find its cyclic steady state, measure its performance and export the results:
using Mocca
using Mocca.Units
process = read_process("haghpanah_2013_four_stage_vsa")
process[:P_L] = 0.05bar # a design variable: the evacuation pressure
result = cyclic_steady_state(process)
performance(result) # purity, recovery, specific energy, productivity
write_results("base_case", result) # CSV files for a spreadsheetA process is described in layers, each of which can be edited and saved on
its own: a Gas and its Feed; an Adsorbent with its isotherm given by
component (dual_site_langmuir) and a Column; a Flowsheet of beds
(add_bed!) and devices with roles (add_device!); and a Cycle of steps
(Pressurise, Adsorb, Blowdown, Evacuate, Purge, Equalise, Idle,
or your own). Units are SI; Mocca.Units has conversions such as bar and
kJ_per_mol. See the process built from its parts
example for a process built from its parts, and the
getting started
example for exporting results to CSV files and for the process file format.
The authors would like to thank Shreenath Krishnamurthy, SINTEF Industry and Gokul Subraveti, SINTEF Energy for assistance developing the code. This project has received funding from the following projects:
- SINTEF Digital Strategic Development Fund
- FME gigaCCS administered by the Research Council of Norway (350370).
