Mocca.jl provides a Julia based framework for the simulating pressure / temperature swing adsorption processes for CO2 capture.
To learn more about using Mocca please see the documentation.
Currently there is an implementation of a 4-stage vacuum swing adsorption process for CO2 capture, from a two-component flue gas, using Zeolite 13X and a dual-site Langmuir model. See Haghpanah DCB and Haghpanah Cyclic VSA. For an example of setting up a simulation through defining your own parameters and potentially custom models in a script, see Custom setup cyclic VSA. Additionally, we have made examples demonstrating capabilities for doing Optimization and History matching in Mocca.jl.
In the future we hope to implement examples of other systems and isotherms e.g. temperature swing adsorption for Direct Air Capture (DAC).
The latest stable version of Mocca can be installed directly from Julia. First install Julia from here.
We recommend running in a specific environment (similar to a virtual environment in python). More information on environments in Julia can be found here.
To create an environment in Julia, navigate to the folder where you want the environment to be, start the Julia REPL and type the following at the Julia prompt:
using Pkg
Pkg.activate(".")
Pkg.instantiate()To install Mocca just add the package to your current environment in the Julia REPL:
Pkg.add("Mocca")This will add Mocca to the current environment and install all necessary dependencies. Mocca is now installed and ready to use.
To get started try the Custom setup cyclic VSA or Haghpanah DCB examples. Bear in mind that the first time you run the code in the Julia REPL it may take several minutes to run as Julia needs to compile all the necessary code. As long as you do not close the REPL, the second time you run the code will be much quicker!
Run the following code to quickly setup and run a Direct Column breakthrough adsorption simulation using predefined input parameters.
The example uses some utility functions which simplify the simulation setup. To see the steps used in more detail, please refer to the Haghpanah DCB example.
using Mocca
# Import and load input parameters
json_dir = joinpath(dirname(pathof(Mocca)), "../models/json/")
filepath = joinpath(json_dir, "dcb_haghpanah_2013_co2_n2_input_simple.json")
(constants, info ) = Mocca.parse_input(filepath)
# Setup and run simulation
case, ts_config = Mocca.setup_mocca_case(constants, info)
states, timesteps = Mocca.simulate_process(case; timestep_selector_cfg = ts_config,
output_substates = true, info_level = 0)
# Save results to CSV and plot
Mocca.export_cell_results(joinpath(Mocca.moccaResultsDir, "dcb_haghpanah_2013_co2_n2_results.csv"),
case, states, timesteps; format="csv")
f = Mocca.plot_outlet(case, states, timesteps)
display(f)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).
