Calculate Bottom Hole Pressure

156 views
Skip to first unread message

Siti Fatimah Amarasuli

unread,
Dec 5, 2024, 6:40:22 AM12/5/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi, I was studying CO2 injection in reservoir for CCS, especially the example3DJohansen.m

The well is rate controlled and thus, the bottom hole pressure is calculated. I was wondering how can you calculate the BHP? What is the model/equation for that? I read the MRST book (An Introduction to Reservoir Simulation Using MATLAB/GNU Octave), but couldn't seem to find any. What makes me confused is that the BHP is changing over time, but I can't seem to find the equation with dt in it. Perhaps I overlook it?

Kind regards,
Amara

Olav Møyner

unread,
Dec 5, 2024, 9:25:30 AM12/5/24
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Amara,

The bhp is used in calculating the pressure needed to reach the specified injection rate and will be time dependent as the pressure and mobility in the reservoir is time dependent. If you look for the Peaceman's formula in the MRST book you will find more details.

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Siti Fatimah Amarasuli <sfama...@gmail.com>
Sent: Thursday, December 5, 2024 12:40
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] Calculate Bottom Hole Pressure
 
--
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 visit https://groups.google.com/d/msgid/sintef-mrst/2753863b-b6fd-4995-ae3c-971989166c21n%40googlegroups.com.

Bao Kai

unread,
Dec 5, 2024, 12:07:46 PM12/5/24
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hei, Siti, 

BHP is one of the primary variables for the well, and it will be solved/updated through well equations. 

Not totally sure whether it is explained in details in some MRST book chapters, but the similar equations is explained in section 2.2 in the OPM-paper, 


Hopefully, this is helpful for your understanding. 

Best, 
Kai Bao

--

Siti Fatimah Amarasuli

unread,
Dec 6, 2024, 3:59:31 AM12/6/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Olav and Kai! Thanks for answering my question, I'll check it out! If I have another question, I'll ask here again

Kind regards,
Amara

Siti Fatimah Amarasuli

unread,
Dec 9, 2024, 2:48:22 AM12/9/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi, I was a bit confused on this part

On CO2 injection into aquifer, there are two phases, the brine phase and the CO2 phase, which means we use the multiphase flow equation. So our continuity equation is
1733730020570.jpg
and our Darcy's equation is
1733730169149.jpg
with p_alpha meaning phase pressure. My question is how do we correlate phase pressure into average cell pressure? What exactly is phase pressure? Since as far as I know, the BHP equation uses average cell pressure(?)

Kind regards,
Amara

Olav Møyner

unread,
Dec 9, 2024, 4:30:00 AM12/9/24
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

The formulation uses a reference phase pressure (typically the water phase in CO2 simulations) and then relates this to the CO2 phase via the capillary pressure:

p_gas = p_ref + pc(S_gas)

The finite-volume scheme is always formulated in terms of average cell pressures, both for the capillary pressure and the reference phase.

The Peaceman formula assumes that the flow between the well and reservoir can neglect the capillary pressure and uses the reference phase pressure for all flows.

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Siti Fatimah Amarasuli <sfama...@gmail.com>
Sent: Monday, December 9, 2024 8:47
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: Re: [MRST Users] Calculate Bottom Hole Pressure
 

Siti Fatimah Amarasuli

unread,
Dec 9, 2024, 8:23:43 AM12/9/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Olav,

Thanks again for answering my question. In regards to capillary pressure, I read from Odd's thesis that1733749839688.jpg
1733749866297.jpg1733750101733.jpg

What I want to ask is that it is said that capillary pressure function depends on CO2 saturation only, but on the second line of the code it is stated @(sw) which makes it a function of sw (water saturation)? Then on the last line of the code, it is back to @(sg) which implies it's a sg (CO2 saturation) function. But if you look at the equation, isn't (1-sg-srw)./(1-srw) equal to (sw-srw)./(1-srw) which turns it back to function of water saturation? Also from equation 2.11 and the graph, it says sw so doesn't it mean it's a function of water saturation?

Kind regards,
Amara

Odd Andersen

unread,
Dec 9, 2024, 12:25:13 PM12/9/24
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Amara,

Capillary pressure is typically expressed in function of water saturation, hence the figure and the first two lines of the code snippet.

The simulator engine used here, however, requires pcWG to be expressed in terms of gas saturation, hence the last line of the same snippet (and there is an error in the text where it says 'water saturation' where it should be 'gas saturation'.

Since 1-sg = sw, the formula in terms of sw would be (sw - srw)/(1-srw), as you point out.  So nothing has changed and it can still be expressed as a function of water saturation, it is just the simulator that here expects it the other way around.

Odd


Odd Andersen
Senior Research Scientist
SINTEF Digital, Mathematics and Cybernetics
Oslo, Norway

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Siti Fatimah Amarasuli <sfama...@gmail.com>
Sent: Monday, December 9, 2024 2:23 PM

Siti Fatimah Amarasuli

unread,
Dec 11, 2024, 10:07:39 AM12/11/24
to Odd Andersen, MRST-users: The Matlab Reservoir Simulation Toolbox User Group

Hi,

Thank you for your reply and I hope you don't mind me asking a bunch of questions. I'm trying to reformulate the mass balance equation, Darcy's equation, and other constitutive equations, so that it would clearly depict the change of pressure over time (dp/dt) and the change of saturation over time (ds/dt) and how it correlates to all of the input. Since it is for my bachelor's thesis, my advisor wanted to see in basic input -> model (hopefully reformulated to combine all the governing + constitutive equations) -> output (change of pressure and saturation).

So I was wondering after reading section 8.3 in MRST introduction book, which reformulation is used in example3DJohansen.m? Perhaps is it the 8.3.1 pressure formulation?

Kind regards,
Amara

Siti Fatimah Amarasuli

unread,
Dec 12, 2024, 7:51:57 AM12/12/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

After more reading, I realize that in Odd's thesis, it's said that it's common to use one phase pressure and one phase saturation as independent unknowns, so it's like the 8.3.2 reformulation. I tried to follow 8.3.2 reformulation step-by-step on my own and I can get the same equation. However, I want to ask yet other questions

I read reference [246] Fundamentals of Numerical Reservoir Simulation by Donald W. Peaceman and compare the result. In [246], the saturation equation is like this
1733998050403.jpg1733998331586.jpg

Meanwhile, in MRST book it's like this
1733998429554.jpg

I just wanna know is P'_c different from the usual capillary pressure P_c? Since I was playing around while reformulating and found out that you can write the last term simply as div (rho_w f_w grad(p_c))

Also I want to ask about the accumulation term. Equation 8.40 is saturation equation, but the accumulation term still contains porosity and rho_w. Is it possible to expand the accumulation term so it will be just ∂(S_w)/∂t? But if we expand those term, won't it be like the pressure equation since porosity and rho_w is a function of pressure (not a function of S_w)?

Kind regards,
Amara

Odd Andersen

unread,
Dec 16, 2024, 5:10:00 AM12/16/24
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Amara,

The capillary pressure Pc is a function of saturation only, and P'c is the derivative of this function, i.e. P'c = dPc / dSw.

As for the accumulation term, you need to differentiate the whole quantity by time, since both porosity, density and saturation depend on time (the two former depend on pressure, which depend on time).
In the incompressible case, you could move density and porosity out of the time differentiation, so that you are left with what you write.

Best regards,
Odd


Odd Andersen
Senior Research Scientist
SINTEF Digital, Mathematics and Cybernetics
Oslo, Norway

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Siti Fatimah Amarasuli <sfama...@gmail.com>
Sent: Thursday, December 12, 2024 11:26 AM

Siti Fatimah Amarasuli

unread,
Dec 16, 2024, 11:51:29 AM12/16/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Odd,

thank you so much for your reply. Oh and just for some clarification, I'm trying to do compressible case with consideration of capillary pressure. I'm still confused about the ∇Pc since equation 8.38 still uses ∇Pc and even ∂(Pc)/∂t even though you said that Pc is a function of Sw only.
1734349492181.jpg
So should we change ∇Pc to P'c∇Sw and ∂(Pc)/∂t to P'c ∂(Sw)/∂t ? But then doesn't that mean there's a saturation on pressure equation (which is like my previous question about pressure in saturation equation in compressible saturation equation (8.40))? Then how does those equations work? I mean that there's saturation in pressure equation and there's pressure in saturation equation.

As far as I know, there're iterations involved (within the same timestep if I'm not mistaken). Can you please explain more about the iterations in this case? Like what is your initial guess, your updated value, and what is the convergence criteria? Per my knowledge now, per one timestep, the initial guess is the initial pressure and saturation, then you got the relative permeability, capillary pressure, etc., then you calculate pressure equation (8.38) and saturation equation (8.40) thus get new pressure and saturation value, compare the initial and new value of pressure and saturation, if it's not converging, repeat with the new value of pressure and saturation for eq. 8.38 and eq. 8.40 as the next iteration, is it correct?

Also there's something else I would like to ask. With index n = non-wetting = CO2 and w = wetting = water, based on your example on example3DJohansen.m, the state.pressure only contains one value per cell. Which pressure is that since pn and pw is different because of capillary pressure? And for CO2 injection (based on your example on example3DJohansen.m), is it fine to reformulate the pressure and saturation equation with pn and Sn for the primary unknown? Then I could calculate BHP with pn as the reference pressure. In the book it is said that the common choice is pn and Sw, but I was just wondering if it's fine to change it to pn and Sn? 

Thank you so much

Kind regards,
Amara

Siti Fatimah Amarasuli

unread,
Dec 18, 2024, 6:08:57 AM12/18/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

I was comparing the multiphase flow equation from the MRST book and from Odd's thesis and here's what I found

MRST book:
1734515691733.jpg

Odd's thesis:
1734515722926.jpg

there's a difference, in MRST book, the source term is ραqα whereas in Odd's thesis, it's qα.

Then I tried to match the unit with the other terms
The accumulation term's unit is kg/(m3.s) from the density and the ∂t
The flux term's unit is kg/(m3.s) too
And the source term must be kg/(m3.s) as well

For the source term in the MRST book, it's a bit confusing since the ρα is definitely kg/m3, which left the unit for qα is s^-1? What does that mean?
For the source term in the Odd's thesis, the unit for qα is kg/(m3.s)?

Also how does that relate to if I have injection rate in mass basis (say ton/day), what conversion/calculation should I do to match the unit kg/(m3.s)?

I hope you don't mind me asking a bunch of questions, especially related to the equations.

Kind regards,
Amara

Olav Møyner

unread,
Dec 18, 2024, 6:17:34 AM12/18/24
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Siti,

I do not think you can expect the notation to be entirely consistent between different publications. The easiest way to resolve what the source term represents is to look at the temporal derivative. In both cases, the enumerator is a mass (s is volume fraction, rho is mass/volume and phi is also volume fraction) and the numerator is time. The equation then represents mass / (volume * time) and the right hand side will also have to have that value. In the MRST book q alpha is a volume rate per volume and in Odd's thesis the same symbol is used for a mass rate per volume. When these are converted to discrete equations later on (which are actually solved in the simulator) they are turned into mass rates (e.g. mass per unit of time).

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Siti Fatimah Amarasuli <sfama...@gmail.com>
Sent: Wednesday, December 18, 2024 11:44

Siti Fatimah Amarasuli

unread,
Dec 18, 2024, 11:14:24 AM12/18/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Olav,

Thanks for your reply. You mention that qα in MRST is volume rate per volume and in Odd's thesis it's mass rate per volume. By per volume, what volume is it specifically? Is it the volume of reservoir, or the volume of the cell (control volume), or something else?

Kind regards,
Amara

Olav Møyner

unread,
Dec 19, 2024, 3:25:07 AM12/19/24
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

These are the continuous equations, so it is per volume in the domain. When you turn this equation into a discrete equation by e.g. the finite volume method these values are integrated over the volume of a control volume. In the final numerical solvers in MRST, the rates are given in  either surface volume per time or masses per time depending on how the specific solver is set up.

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Siti Fatimah Amarasuli <sfama...@gmail.com>
Sent: Wednesday, December 18, 2024 13:04

Odd Andersen

unread,
Dec 20, 2024, 5:22:16 AM12/20/24
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Amara,

Strictly speaking, Pc is defined as the difference in phase pressures, i.e. Pn - Pw, which are considered functions of space and time.  However, we usually introduce a constitutive model Pc(sw), where Pc is uniquely defined given the phase saturation.  When considering capillary pressure according to this constitutive model (which we usually do, but is not strictly assumed in 8.38), then you can in principle do the developments you describe.    However, the equation 8.38 is trying to make a different point, namely to present a formulation that takes the form of the pressure equation with a time derivative and a laplacian term on the left, and a "source term" on the right.  In this case, the source term consists of the usual sources qn and qw, as well as a "quasi-source" that consists of the four last terms and results from the current saturation distribution (typically considered "fixed" in a time splitting scheme).

You cannot fully separate pressure and saturation in different equations, there will be a level of coupling, which is here captured in the "quasi source" term.  The reason to do this kind of splitting is to get a equation that "mostly" depend on pressure, and an equation that "mostly" describes saturation evolution.   In a time splitting scheme, you would typically consider one constant when solving for the other - but when equations are formulated this way, the error introduced in doing so would be tolerable for sufficiently small timesteps.

There are various splitting shemes, but the general principle is to consider saturation constant (which also give you constant values for mobilities, capillary pressure and so on), to determine a pressure field using the pressure equation.  Then you evolve your saturation field for a certain time, considering a fixed pressure field that you just calculated, and then you iterate on this following some chosen strategy.

As for the 3D Johansen example, the pressure expressed in state refers to the brine pressure - you have to add the capillary pressure to get the CO2 pressure.  On paper, the equations can be reformulated in terms of any choice of primary variables you want (Pn, Pw, Sn, Sw), but you would have to reimplement/adjust the simulator code to account for that in your simulations, which would be a bit of work.


Odd Andersen
Senior Research Scientist
SINTEF Digital, Mathematics and Cybernetics
Oslo, Norway


From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Siti Fatimah Amarasuli <sfama...@gmail.com>
Sent: Monday, December 16, 2024 1:44 PM

Siti Fatimah Amarasuli

unread,
Jan 6, 2025, 9:23:04 AM1/6/25
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,
Thanks for your reply!

I want to ask another question. If we have fractional flow formulation like equation 8.38 and 8.40, can we still use fully-implicit method to solve it? Or does fractional flow only work with certain solving method (IMPES or sequential perhaps?)

Kind regards,
Amara

Odd Andersen

unread,
Jan 7, 2025, 10:05:33 AM1/7/25
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Amara,

The fractional flow formulation is usually associated with operator splitting strategies, as alluded to below.  If you are going to solve your full system implicitly, it makes more sense to work with the original conservation equations.

Best regards,
Odd


Odd Andersen
Senior Research Scientist
SINTEF Digital, Mathematics and Cybernetics
Oslo, Norway

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Siti Fatimah Amarasuli <sfama...@gmail.com>
Sent: Monday, January 6, 2025 2:16 PM

Siti Fatimah Amarasuli

unread,
Jan 12, 2025, 11:39:12 PM1/12/25
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,
Thank you once again for your kind reply!

I just wanted to update that I've finished my Bachelor's Thesis and I'm scheduled for thesis defense on January 20th. Thank you to Odd, Olav, Kai Bao, and all other members of MRST forum, your help and support means a lot to me. Hopefully everything will go smoothly.

Kind regards,
Amara

Odd Andersen

unread,
Jan 13, 2025, 5:28:03 AM1/13/25
to Siti Fatimah Amarasuli, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Thanks for your update, and good luck!

Best regards,
Odd


Odd Andersen
Senior Research Scientist
SINTEF Digital, Mathematics and Cybernetics
Oslo, Norway

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Siti Fatimah Amarasuli <sfama...@gmail.com>
Sent: Monday, January 13, 2025 3:56 AM
Reply all
Reply to author
Forward
0 new messages