Miscible CO2-brine simulation in 3D with MRST

195 views
Skip to first unread message

llui...@gmail.com

unread,
Sep 7, 2019, 2:24:01 PM9/7/19
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear MRST community,
I am a PhD student interested in modeling CO2 storage (two-phase CO2-brine) using MRST. Some of the constraints that I have are:
- Dissolution of CO2 into the brine
- Different regions for both kr-Pc and rock compressibility.
- Capability for both no-flow and constant pressure boundary conditions
- Modeling the 3 spatial dimensions
It seems that using a modified black oil model in which the oil phase is modified to resemble brine should work. Although I am working with unstructured grids, my initial idea was to use an ECLIPSE-like input file for the fluid properties, some modifications in initDeckADIFluid and subroutines for including regions and the GenericBlackOilModel class, since I have not been able to find the TwoPhaseGasOilModel. Pressure boundary conditions do not seem to be implemented in the GenericBlackOilModel, so I am wondering if extending the class to include them would be the most straightforward option for my constraints. In relation to this, some specific questions are:
1) Would you recommend using the TwoPhaseGasOilModel (I suppose it was distributed in an older version of MRST)?
2) Does the TwoPhaseGasWaterModel in the co2lab module include dissolution of CO2 into the brine?
3) Is it simplest/more appropriate to use the ThreePhaseBlackOilModel with three phases, initializing the simulation with Sw=0 everywhere? In this case I would like to make sure that the two-phase oil(brine)-gas kr are used (by disabling the assignRelPerm routine which is probably called at some point), and I would probably set the water immobile like in the SPE1 as a precaution.
4) For miscible fluids, is a tabulated input the best way to specify properties, or does MRST have some function similar to initSimpleADIFluid ready to be used for a CO2-brine fluid system when employing simulateScheduleAD?
Essentially, I would like to make sure I am following the right approach, since I have no previous experience with OO programming.
Thanks a lot for your time and for making this amazing tool available!
Best regards,
Lluis Salo

llui...@gmail.com

unread,
Sep 8, 2019, 7:24:50 PM9/8/19
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear MRST community,
I am looking into an approach that seems to have potential to work in mrst-2019a, by using the class TwoPhaseGasOilModel from mrst release 2018b: 
i) I modified equationsBlackOil (lines 167-182, 207-214, 248-262; see here), to make them compatible with two-phase gas-oil as well.
ii) After that, when trying to run a simulation with the TwoPhaseGasOilModel I was getting an error (see here) related to the rs and well (I am using a single injector well controled by total rate, injecting gas, i.e. compi [0, 1]); I decided to modify the TwoPhaseGasOilModel superclass ThreePhaseBlackOilModel to make it compatible with two-pase gas oil (lines 502-530, see here).
iii) I then ran a couple of test simulations to perform a minimal validation. First, I compared the results using GenericBlackOilModel and TwoPhaseGasOilModel for no-flow boundary conditions, obtaining identical results. I then used TwoPhaseGasOilModel and constant-pressure boundary conditions in lateral boundaries. As expected, pressure change was lower, and gas saturation at the top of the reservoir was also lower.

Can someone provide feedback on this approach? I think the provided files should be enough to generate a toy problem to test it, but let me know if you prefer my test-problem file. As seen in the .DATA file that I am using to test, fluids are  "oil-gas" for now, so I would like to know if you envisage any problems when modifying those to the actual brine-CO2 properties. If possible, I would still appreciate feedback on my initial post.
Thanks again,
Lluis

Olav Møyner

unread,
Sep 9, 2019, 12:25:53 PM9/9/19
to llui...@gmail.com, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Lluis,

I'm glad to hear that you are interested in using MRST for your research. I will try to answer your questions sequentially.

Actually, all the solvers support regions (different fluid functions in different cells). If you read in an eclipse file, you will see that the fluid objects will have multiple functions corresponding to each region and you then have rock.regions.saturation to e.g. define which saturation region a cell can use. The property system also allows you to specify a constructor manually if you want to do something more general than the saturation/pvt/rocknum type setup ECLIPSE uses. In principle, you can have different regions for every property used by the model (!)

1) I would not recommend using the older model. We got away with this approach since you end up with maintaining a lot of very similar codes. The GenericBlackOilModel should allow for any combinations, but is missing boundary conditions at the moment. It is not difficult to add support for bc, but I have not had time to do so yet. I could probably push a small fix sometime this week if you use the bitbucket repos to get MRST (bitbucket.org/mrst/mrst-core for more details on that)
2) No, it is just an immiscible water-gas model.
3) That is one option to get everything running. Generally the default three-phase relperm implementation will reduce to the two-phase system if one phase is completely absent.
4) We do not have an easily way of generating rs-table functions, but we do have equation-of-state flash code which can be used to perform the phase seperation tests if you have a metholodogy in mind.

One thing I would suggest is to take a look at the compositional module. The black-oil system is a specific case of the K-value-type compositional model, which is easier to specify (you just need functions defining your K-values for your compositions and some density/viscosity functions). The boundary conditions are implemented in the generic models there, I think. Or, you could just use the standard compositional models (with water / CO2 components) and adjust the equation-of-state to match the system you want to model: Tuning of EOS to get right volume/density predictions for water-co2 is discussed in the literature, but it really depends on the research you are doing.

Best regards,
Olav


From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of llui...@gmail.com <llui...@gmail.com>
Sent: Monday, September 9, 2019 1:24 AM
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] Re: Miscible CO2-brine simulation in 3D with MRST
 
--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/7372c722-ba9b-4f75-9126-713c6e69f602%40googlegroups.com.

llui...@gmail.com

unread,
Sep 9, 2019, 1:15:45 PM9/9/19
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Olav,
Thanks a lot for your quick and detailed reply. Good to know there is support for different regions for every property used, since I will be working with kr-pc regions that can be independent of the rock compressibility regions (I will be testing this soon).
Based on your advice, I think I will switch back to using the GenericBlackOilModel. I will be looking forward to that push for the pressure bc support whenever you have the time, since I prefer this over using the ThreePhaseBlackOilModel (this is gonna simplify input files and my fluid object as well as make sure the two-phase kr are used). In case you did not have time please let me know and I will try myself.
I will definitely take a look at the compositional module (thanks for that introductory explanation!), but for this problem I would prefer to start with the ad-blackoil module.
Best,
Lluis
To unsubscribe from this group and stop receiving emails from it, send an email to sinte...@googlegroups.com.

Olav Møyner

unread,
Sep 9, 2019, 2:01:10 PM9/9/19
to llui...@gmail.com, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Lluis,

I have pushed support for bc and source terms in the generic model: https://bitbucket.org/mrst/mrst-autodiff/commits/b923fa93da750157c373bb8c8e8ae4fa2a4ff2d1

Hope this is useful!

Best regards,
Olav

Sent: Monday, September 9, 2019 7:15 PM

To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: Re: [MRST Users] Re: Miscible CO2-brine simulation in 3D with MRST
 
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/cc9a7419-67e5-4467-9a45-a75152607541%40googlegroups.com.

llui...@gmail.com

unread,
Sep 9, 2019, 2:14:31 PM9/9/19
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Olav,
Thanks a lot, that was quick! It will definitely be useful ;-)
Best regards,
Lluis
Reply all
Reply to author
Forward
0 new messages