Skip to main content Skip to secondary navigation

Explore Energy is a cross-campus effort of the Precourt Institute for Energy.

Main content start

Modeling Carbon Storage

Phillip Chacon, Junior, Energy Resources Engineering

This summer I’ve been working with Jacques Franc under Professor Hamdi Tchelepi to develop an open-source program called GEOSX. It has been developed by Lawrence Livermore National Laboratory, TotalEnergies, and Stanford University. The program is used for modeling carbon storage and other subsurface energy systems like geothermal energy. I picked this program because I believe carbon capture and storage will be essential in the coming years as we transition from heavy reliance on fossil fuels to renewable and clean energy sources.

Starting out this summer, I had the option to use the software to test simulations for real-world applications or go into the source code and contribute to it. I’ve always enjoyed coding in my free time, so I chose the latter. Before I could start coding, I had to build and compile the software onto my computer, which took longer than I expected due to the process being a bit different depending on the computer and operating system the person uses. After compiling the software, I needed to understand how the program worked. I studied examples from the documentation and ran some test simulations to get an understanding of how it worked. Interestingly the program isn’t an application you can simply open up. It must be run with a terminal using an input XML file where you specify your parameters. The XML input file can be linked to multiple other XML files for more complicated simulations. Even when you do run the input file with GEOSX, you can’t view the output without another program. There were multiple options, but it seemed that Paraview was the recommended viewing application. This also had to be specified in the XML file.


After getting an idea of how the program worked, I was ready to start working on the code. It’s written in C++ which I was only familiar with because of CS106B. It was going to be a bit of a learning curve learning both more advanced C++, the program itself and its libraries, and brushing up on the physics behind the code I would be implementing. I thought taking Energy 153 would be sufficient, but it certainly felt like this program went far beyond the scope of that class. We considered working on hysteresis for capillary pressure. We then figured it would be a bit too complicated as a starting project, so we moved on to a different model that estimates three-phase oil relative permeability using data from two sets of two-phase oil relative permeability. This model is called the Stone 2 model. Writing this model required that I include both unit tests and integrated tests to ensure the model is working correctly and write a short technical report of my implementations.

This internship helped me understand how to contribute to group-developed softwares and some of the physics that goes into such a complex program. Even if it’s a small contribution, I hope to add more in the future to advance a field that I deeply care about and believe will be crucial in the near future to slow the effects of climate change.