Saturday, January 9, 2010

Hubbert's Curve in OilWorld

Well, after having a big Iraq week around here, time for something a little bit different.  This is the first post in what I hope will be an occasional series exploring a little further the ideas behind the Hubbert Theory.  I have made some attempt to make this post accessible to non-specialists, but I'm not too confident I'm going to succeed in reaching altogether non-technical folks, so don't feel bad if you're in that category and this doesn't make much sense.

There has been quite a bit of controversy about the Hubbert Curve - the specific mathematical form that Hubbert used for his bell shaped curve of oil production over time.  This is technically the derivative of the logistic curve.  There are some people who seem to believe it's useless, while others think it's an inviolate law of nature that cannot be contravened.  To me, it's a rather rough approximation that's useful in some limited cases, and so badly inaccurate as to be worthless in others.

At the end of the day, it's important to understand that oil production is to a significant degree a function of human behavior and choices - people decide where to drill, when to start producing the resulting oil, whether to go as fast as possible or save some for the grandchildren, when to shut the wells in to raise prices, when to piss off the international community and get put under a sanctions regime, and when to fight wars and blow up their neighbor's oil production infrastructure.  These complex human processes will never be fully described by some simple closed form mathematical equation.  Therefore, demands for rigorous first principles mathematical derivations are kind of besides the point - Seldon's laws will only ever appear in science fiction.

However, what I want to do in this post is to set up a toy model world, the OilWorld of the title, in which Hubbert's Curve is a rigorously accurate description of oil production.  (For the knowledgeable, this is just a thin disguise for the SI model of epidemiology).  However, I've set it up in a way that I hope in future posts, as time allows, to consider various variants.  The hope is to aid the reader's intuition for when the Hubbert model has a prayer of being useful, and when it really doesn't.

Ok, so here are the rules of OilWorld.  The geography of OilWorld consists of a square array of square tiles.  Some tiles have oil under them, and most don't.  The inhabitants of OilWorld have somehow discovered oil and built their first oil rig.  A small region of OilWorld is shown up above (the green tiles have oil under them, the white ones don't).

The rules of drilling in OilWorld are as follows.  Each year, it's possible for a rig to drill a single square.  Unfortunately, the inhabitants of OilWorld have yet to invent seismic exploration technology, so they can't tell where the oil is and they have no choice but to pick a random square.  If they pick a green square, they spend the year exploiting all the oil under that square (which coincidentally is just the right amount to be produced in one year).  With the profits from that oil, they are then able to build a second rig, which is ready to begin drilling at the start of the next year.  In that case, both rigs pick a random square at the start of the next year.

If a rig picks a white square, then there is no profit and no new rig.  Instead, the rig just moves on and tries again the following year.

Now this may seem a very strange and artificial model.  But it does capture some features of the real world - there's only so much oil under the ground, it's not easy to find, you only get to use more infrastructure if your previous efforts with the infrastructure you have were profitable, and the more infrastructure you have, the faster you can find the oil as long there's still some there to find.  And it's also the simplest possible model I can think of that will give a Hubbert curve for oil production.  We can add various tweaks to move it in the direction of realism at later times and see which tweaks really mess up the Hubbert-like behavior, and which ones don't.  (I don't have this program of posts fully worked out yet, so I may very well end up getting surprised too).

Ok, so let's see why this gives a Hubbert curve (and here is where I'm afraid we have to leave the non-mathematical reader completely - but if you are really determined not to miss out, you could try skipping ahead a few paragraphs and see if you can pick up the thread again after the nasty equations stop whizzing past your ears and the simulation graphs start).

Suppose that a fraction a(t) of squares have oil under them at time t.  Suppose also at time t, we have N(t) rigs. Call the time step dt (one year in the discrete version outlined above, but in a continuous version of the theory could be arbitrary). Now if either dt or a are small compared to the overall problem, we can neglect collisions and the expected number of squares of oil found in a given time step is just N(t)a(t)dt. But this is also the number of new rigs that will be created. So we have

dN = N(t)a(t)dt

dN/dt = Na

Now, by the rules up above, every time we find a square of oil, we create a new rig. Therefore, if the size of the grid is m on each side, we have that

N(t) = m2(a(0) - a(t))

a(t) = a(0) - N(t)/m2

Substituting for a above, and relabelling a(0) as a0, we thus get

dN/dt = a0 * N(1 - N/(a0 m2))
This is the logistic equation for N, meaning that N, the number of rigs, will have a sigmoid (S-shaped) form.  The cumulative amount of oil produced likewise, since each rig is created from the profit of that oil.  Mathematically the solution is

N(t) = a0 m2 ea0t /(a0 m2 + ea0- 1) 
Now, to check this, it's very simple (assuming you know how to write computer programs!) to implement a simulation of OilWorld.  I include my version in an appendix below.  I ran the simulation on a grid of 400x400 cells, with 10% of them having oil.  The following plot shows the fraction of the oil produced in each simulated year on the left scale, and the rig count - both simulated and the logistic curve form above - on the right hand scale.

You can see the excellent agreement between the logistic curve and the simulated rigs, and the nice Hubbert-y peak for the oil production.  Finally, the post wouldn't be complete without showing you the Hubbert linearization:

A nice straight line, just the way it should be.

Appendix - simulation code in C

#define gridSize 2000
#define oilProb  0.1

int oilPresent[gridSize][gridSize];

int main(int argc, char* argv[])
  int i, j, rig, oilCellsFound;
  int       year                = 0;
  double    randMax             = pow(2, 31) - 1;
  int       rigCount            = 1;
  int       rigCountNextStep    = 1;
  int       oilTotal            = 0;
  int       oilTotalFound       = 0;
  // Initialize the simulation arrays.
  for(i = 0; i < gridSize; i++)
    for(j = 0; j < gridSize; j++)
      if(random()/randMax < oilProb)
        oilPresent[i][j] = 1;
        oilPresent[i][j] = 0;
  // Run the simulation
  printf("Year\tOil Perc\tRigs at End\n");
  while(oilTotalFound < oilTotal)  //outer loop over years till we got everything
    oilCellsFound = 0;
    for(rig = 0; rig < rigCount; rig++)
      int guessI = random()%gridSize;
      int guessJ = random()%gridSize;
        oilPresent[guessI][guessJ] = 0;
    printf("%d\t%.5f%%\t%d\n", year, ((double)oilCellsFound)/oilTotal*100.0, rigCountNextStep);
    rigCount = rigCountNextStep;
  return 0; 


KLR said...

Nice! Is it really up to our intuition to divine whether the Hubbert curve will be of use in predicting future production for a given country? Seems like this should be pinned down by now. Perhaps an equation to delineate how "Hubbert-ready" a country is could be formulated.

Minor error:

"If they pick a white square, they spend the year exploiting all the oil under that square"

al fin said...

Interesting beginning. The model is simple, and explicitly chosen to produce a Hubbert curve.

I look forward to further development of your model.


Stuart Staniford said...


"Is it really up to our intuition to divine whether the Hubbert curve will be of use in predicting future production for a given country? "

Definitely! (IMO). So sorry...

Thanks on the minor error - I fixed it.

groo said...

very interesting, Stuart.

You hint already to refinements, which probably aim at exploration.
The choice for drilling is ofcourse made by geologists, and is not random.
At first, I tend to say that, if geological knowledge is constant, the outcome would still be the same.
It is only constraining the total area, where to drill.
On the other hand, the probaiblity for having a BIG find is presumably higher, where the oil comes out of the ground naturally like in California in the 19th century or ancient Iraq.
Here it would be interesting to quantify this somehow by knowing the size-depth relationship of oilfields.

Ofcourse the deeper fields are more difficult to find with simple
geological 'heuristics'.

Just guessing:
Fields near the surface are found first, and with every advance in exploration technology deeper fields could be detected.
2D-seismic, then 3D-seismic, then deep sea-seismic and so on. Then horizontal drilling.

But this would add probably only additional layers of 'randomness',
overlapping in time.

Maybe Texas, Gulf of Mexico and the North Sea would be good model-cases.

E.g. exploration/drilling in the North Sea would not have been possible, but also not necessary at that time.

Sounds like a dauntig task, but not impossible.

Surely You thought about that Yourself already.

Anyway, I'm always impressed and delighted by Your thorough thinking AND pushing ideas and methods to their limits!

Best regards

Unknown said...


Did you ever run across this game:

Instead of mathematical models, a computer game is used to illustrate the concepts. Different people have different ways of learning, and a hands-on approach is more effective for some people.

Stuart Staniford said...

gu - thanks for the suggestions! I had some thought along these lines, but will consider your comments further whenever I get around to making an iteration of the model.

Greg said...

Stuart - don't the changes suggested by Gunter -- modeling successively more intensive searches through a space containing log-normally distributed amounts of oil at random locations - lead you to WebHubbleTelescope's Dispersive Discovery Model?

Mike Aucott said...

Thanks for a nice summary of the method Stuart. I created a numerical version of your model in a spreadsheet format that facilitates varying key parameters to see what happens. It appears that significantly and consistently expanding the size of the resource base (i.e., the value of m in your model) every so often over time can lead to multiple peaks (a sort of "undulating plateau") and that steadily increasing the discovery rate (the value of a) can lead to an extended period of production after a peak. However, if anything close to a constant size of the resource base and a constant rate of discovery are maintained, production follows a pattern more or less close to a normal curve, with production rising to a peak and then dropping. I'd be glad to send a copy of this spreadsheet to anyone who is interested. Email me at I may post some further discussion of this on my blog,

This spreadsheet exercise gives me confidence that if there is a finite resource and if it is exploited in such a way that the amount of exploitation is directly related to the amount of exploitation that has already taken place (i.e., the more oil produced, the more rigs there will be, leading to still more production, etc.) that production will at first increase exponentially and then taper off to a liner rate of increase as resource constraints begin to come into play and then taper off further to zero as the resource is exhausted.

I read Robert Rapier's criticism of the HL method that appeared in TOD and it seems pretty superficial to me. The hypothetical production histories he chose aren't at all realistic - has there ever been a resource that was produced at a constant rate, or at a steadily increasing rate? The case of Texas production he focuses on also isn't a good example - wasn't Texas production controlled for a long while by the Texas Railroad Commission to keep prices up? R.R. challenged readers to supply examples of where the HL method has worked. It looks to me like the production histories of a number of nations, including the UK, Norway, Mexico, Indonesia, Venezuela, and the U.S. show a pattern not unlike a normal curve. Why should the world - over the long term - be any different?

Well, yes, as you note, oil production is a function of human behavior and choices. But it seems optimistic or perhaps naive to think that in the long run humans are not the same as every other species in the tendency to exploit any resource as quickly as feasible. If we humans are like other species in this way, then the various petroleum production histories of nations and regions, over the long term, when added together, should eventually converge on something that looks a lot like a normal curve.