Skip to content

Open source · Differentiable · Julia

CO₂ capture processes, from flowsheet to optimum.

Set up a capture process in a few lines, from a published case or from its parts. Simulate it in seconds, and let exact gradients steer purity, recovery and energy to the best operating point.

Today's units are fixed beds of adsorbent, for pressure and vacuum swing adsorption. The framework is built for more.

topbottomN₂-rich productFeed, 15% CO₂CO₂ to the vacuum pumpAdsorption0.00.51.0pressure at the open valve [bar]0255075100time in the cycle [s]23 s · 1.00 barCO₂ loading, low to highCO₂ in the gas
PressurisationAdsorptionBlowdownEvacuation A fixed-bed unit in the four-step VSA cycle of Haghpanah et al. (2013), as Mocca computes it, at 7× speed.

Set up. Simulate. Optimise.

The four-step VSA of Haghpanah et al. (2013), from Mocca's library to an optimised design.

1

Set up

Read a process from the library, or build it from its gas, adsorbent, column, flowsheet and cycle, in Julia or a JSON file.

using Mocca, Mocca.Units
process = read_process(
  "haghpanah_2013_four_stage_vsa")
process[:P_L] = 0.05bar
2

Simulate

Run the cycle to its steady state and measure it, with plots, stream tables and spreadsheets.

result = cyclic_steady_state(process)
perf = performance(result)
78.9 %CO₂ purity
70.3 %recovery
150 kWh/tenergy
3

Optimise

Every result is differentiable. Adjoint gradients with respect to any setting drive a gradient-based optimiser.

add_variable!(process, :P_L,
  ("evacuation", :to))
optimise!(process;
  maximise = :recovery,
  at_least = (purity = 0.9,))

The first run of a session compiles for a few minutes; after that a simulation takes seconds.

Capture units

Each kind of unit is its own module on a shared core. The flowsheet, the solvers, the performance measures and the gradients work the same for every unit, so a new kind of unit gets all of them.

Available

Fixed-bed adsorption

Packed columns cycled through pressure and vacuum swing steps: PSA, VSA, equalisation, several beds, layered adsorbents.

In development

Moving-bed adsorption

Sorbent that flows through adsorption and regeneration sections and back, such as moving-bed temperature swing adsorption.

Future

Rotating-bed adsorption

Adsorbent wheels that turn through adsorption and regeneration sectors.

Future

Membranes

Membrane modules that let CO₂ through faster than N₂, alone or in stages.

Future

Absorber columns

Gas–liquid contactors for solvent-based capture, with packing or trays.

A new unit implements a small set of functions: its ports, its balances and how it exchanges streams with its neighbours. See Extending Mocca.

Processes from the literature, ready to run

The library holds fixed-bed adsorption processes so far. Read any of them with read_process, change a setting and run it. Bars show each bed's steps over one cycle, to scale. How Mocca's results compare with the papers

PressurisationAdsorptionBlowdownEvacuationEqualisationLight product pressurisationIdle

What Mocca models

For every process
FlowsheetsAny number of units, connected to feeds, products and each other through valves, flow controllers and streams.
DesignAdjoint gradients of purity, recovery, energy and productivity with respect to step durations, pressures, flow rates and model parameters; gradient-based optimisation with bounds and constraints.
OperationCycles of steps run in sequence or side by side in several units, solved to their cyclic steady state by Newton's method, with GMRES and grid sequencing on fine grids.
ResultsStream tables, profiles and histories as CSV files in engineering units (bara, °C, mol%, kg/h). Results and plots
Fixed-bed adsorption unit
BedOne-dimensional, axially dispersed plug flow through a packed column, Darcy's law for the pressure drop, a linear driving force for mass transfer, and an energy balance with the column wall (or an adiabatic or isothermal bed). Model equations
IsothermsMulticomponent dual-site and single-site Langmuir, with a library of published adsorbents (zeolite 13X, silica gel).
StepsPressurisation (with feed or light product), adsorption, blowdown, evacuation, purge, pressure equalisation and idle.
Not yetTemperature swing (heated or cooled steps), the inertial (Ergun) term of the pressure drop, other isotherm models (add your own with register_isotherm!).

Examples

Each example is a script you can download and run, or open as a notebook.

Where next