Skip to content

sintefmath/Mocca.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mocca

Mocca.jl logo

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 Direct Column Breakthrough simulation and Cyclic Vacuum Swing Adsorption simulation. 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).

Installation

First install Julia from here.

Mocca can be downloaded by cloning the Mocca.jl repository.

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 Mocca.jl navigate to the Mocca.jl folder, start the Julia REPL and type the following at the Julia prompt:

Pkg.activate(".")
Pkg.instantiate()

This will activate the environment in the current directory and install all necessary dependencies. Mocca is now installed and ready to use.

To get started try the quick start or Direct Column Breakthrough simulation 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!

Quick start example

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 Simulate DCB example.

using Mocca

# Import and load input parameters
json_dir = joinpath(dirname(pathof(Mocca)), "../models/json/")
filepath = joinpath(json_dir, "haghpanah_DCB_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, "haghpanah_DCB_results.csv"),
    case, states, timesteps; format="csv")
f = Mocca.plot_outlet(case, states, timesteps)
display(f)

Acknowledgements

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).

About

A module for modelling CO2 capture processes in Julia.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages