filled profiteroles with creme patissiere

The Ideal Gas Law in Food – How Foods Expand and Shrink

Have you ever made souffles? Have you experienced that thrill when they rise high in the oven? Looking so beautiful and light? But to be heavily disappointed when they sink down again once they’re cooling down outside of the oven?

Have you ever covered an egg in a frying pan with a lid and seen it expand enormously, only to collapse again when you take away the lid? Or, have you seen a cake lift in the oven? Or seen how those unassuming balls of choux pastry become light eclairs in the oven?

If so, you’ve seen the ideal gas law at work. Gases shrink and expand all the time when you’re cooking and baking. And knowing just how this gas law works, can at a minimum help you explain your fellow eaters why those souffles collapsed, or even help you prevent them from collapsing completely.

Phase changes – Solid – liquid – gas

Gases might remind you of the oxygen we breath around us, or the carbon dioxide that comes out of our car engines. But that vapour about your boiling hot cup of tea is a gas too. All those air bubbles within your bread are also filled with gas.

Gases are just one state of matter. The other two common ones in food are solids and liquids. The special thing about a gas is that in a gas all the molecules that make up that gas can pretty much move independently from one another.

Unlike in a solid (e.g. an ice cube), where all molecules are fixed in place or a liquid, where molecules do pull on one another, molecules have a lot of freedom in a gas. So much so that they will distribute themselves in whichever space they’re trapped. This could be within an air pocket in a bread dough or within a pot of boiling water.

Describing gas behaviour: the ideal gas law.

This independent behaviour makes gases do interesting things and those things can be described using the ideal gas law. As the name says, this law describes the behaviour of an ideal gas. In reality, most gases are not ideal. Nevertheless, those basic concepts hold true well enough in most foods to help you explain that choux pastry, souffle or proofing bread dough.

The ideal gas law describes how gases behave under varying temperatures, pressures and volumes. It can be expressed by quite a simple formula:

p * V = n * R * T

Where:

  • p = pressure (the unit is Pa)
  • V = volume (unit = m3)
  • n = number of molecules (expressed in the unit ‘moles’)
  • R = gas constant, this is a fixed number that’ll always be the same (8,314 J/molK)
  • T = temperature (unit = Kelvin)

This formula tells you that if you multiply the pressure of the space that the gas is with the volume of that space, that outcome is identical to a multiplication of the number of gas molecules present, a specific constant and the temperature.

It’s use though for cooks is mostly for when you start comparing scenarios. If you have a gas in a specific space (e.g. an air bubble in your bread dough). You can assume for now that the amount of molecules is constant, as is the gas constant.

In the oven the temperature increases. As such, n * R * T becomes a larger value. As such, p * V should also become larger. In this case that will result in an increase in volume, the gas within that bubble expands because of the heat.

These types of changes in temperature occur in food all the time and even the number of molecules may change as may the volume! The following examples will bring some of those scenarios to life.

Why aren’t ‘real’ gases ideal?

In the ideal gas law scientists make a few assumption about that gas. First of all, you assume that the molecules that make up a gas do not have any attractions between one another. They don’t stick to one another, don’t push or pull at one another. Second of all, you assume that the gas molecules themselves don’t actually take up any space.

In real life both assumptions aren’t correct. However, when you stay close to moderate temperatures such as room temperature and atmospheric pressure, a lot of gases behave quite ideal. For widely different pressures and temperatures this assumption doesn’t hold up well, but in food we tend to stay pretty close to these ‘normal’ conditions, making the ideal gas law a useful tool!

cherry cake

Ideal gas law example 1 – Popping popcorn

Imagine a vessel (or a huge popcorn corn kernel) of 1 m3 at a temperature of 300K (27°C) and a pressure of 100.000 Pa. Using these three variables you can calculate how many moles of a gas sit in this huge corn kernel:

p * V = n * R * T

This can be re-written to:

n = (p * V) / (R * T)

Which then gives:

n = (100.000 * 1) / (8,314 * 300) =  40 moles

Now we’re going to take this imaginary corn kernel and we’ll heat it to 400K (127°C). Remember that corn kernels are really strong and rigid. It doesn’t deform under pressure and there is no way molecules can go in our out. (In reality more gas molecules will be formed due to the evaporation of water inside the kernel, but we’ll neglect those for now.) As such, we know that in the formula three things stay the same: n, V and R.

So, in order to even out the left and right side of the formula, the pressure has to change. And that is exactly what happens when you’re heating a corn kernel:

p * V = n * R * T

This can be re-written to:

p = (n * R * T) / V

Which then gives you:

p = (40 x 8,314 x 400) / 1 = 133.333 Pa.

Remember how the pressure was 100.000 Pa at the start. In other words, it has changed considerably! The pressure build up can only take place if your vessel or kernel is strong enough to handle the pressure. Even a popcorn kernel will break at some point, when the pressure is just to high in there for the gas to be contained.

freshly popped popcorn

Ideal gas law example 2 – Baking a souffle

Now imagine that same vessel of 1m3, at 300K (27°C), a pressure of 100.000 Pa and with those 40 moles of a gas inside. Again we’ll heat the vessel. Now imagine though that this vessel is not rigid at all. Instead, it is a souffle batter. Souffle batters are very delicate and soft. They tend to contain whipped fluffy egg whites, full of gas bubbles. Let’s heat this batter to 400K.

Again, we’re assuming no new gases are formed or disappear (which is not completely true in reality!).

You might expect the pressure to go up again, as we saw in the popcorn example. However, this souffle batter isn’t as strong as the rigid vessel! The souffle batter can’t hold its shape under an increased pressure, so, we have to assume the pressure within the souffle remains the same, that of the surrounding air. So what will happen?

p * V = n * R * T

Which we now write as (since we know the n, R, T and p values):

V = (n * R * T) / p

V = (40 x 8,314 x 400) / 100.000 = 1,3m3

The souffle batter has grown in size, it started out as 1m3!

One great challenge with souffles is always to prevent them from collapsing after you take them out of the oven. Unfortunately, this only works if your souffle is rigid enough to hold its shape and resist that change in pressure. A souffle, even a cooked one, has a very delicate structure and can’t handle this. The decrease of the temperature will therefore always result in at least some volume decrease.

chocolate zucchini courgette cake with frosting

Ideal gas law example 3 – Baking a cake

In a lot of foods the number of gas molecules in a food isn’t constant. When baking a cake, popping popcorn or baking a souffle new gases will be formed. Water might evaporate into a gas and leavening agents such as baking powder may result in the formation of carbon dioxide gas. water will evaporate.

So let’s get back to that same scenario from the previous two example, but in this case it is a cake batter: with 40 moles of gas, a temperature of 300K, a volume of 1mand a pressure of 100.000 Pa. We again increase the temperature to 400K. However, this time, a lot of new gas molecules are formed thanks to the baking powder and evaporating water. This results in a total of 60 moles of gas molecules.

Since the cake batter isn’t very strong it won’t be able to withstand any higher pressures, so the pressure will stay constant. As a result, the volume will have to change again:

p * V = n * R * T

V = (n * R * T) / p

V = (60 * 8,314 * 400) / 100.000 = 2,0m3

See how much larger this cake has gotten compared to the previous example? A well cooked cake batter is stronger than a souffle. As such, it will be able to withstand the temperature drop once taken from the oven. But, only when it is well cooked. If you take a cake out of the oven too early, it can still collapse causing it to lose some of those gases. Even if you’d put it back in the oven, the loss of those gases will make it almost impossible to get back to its original size.

Combining forces

In most foods it is the combination of these three example that make the story complete. In the case of popcorn the number of gas molecules also increases because more and more water will evaporate and turn into a gas. The same for the souffle. Water in the souffle will evaporate and become a gas and participate in this gaseous behaviour. What’s even worse. When taking the souffle out of the oven some of this water will condense again. This will contribute to the shrinkage of the souffle even further.

Often a whole lot more processes play a role as well. Structures don’t tend to be either super rigid or super flexible, instead most likely pressure, volume, number of gas molecules and temperature will all change simultaneously. Or some might start at the start of the cooking process, whereas others change towards the end. That said though, you don’t have to understand every single detail, to still grasp these basic concepts!

Want another great example of gas at work? Read up on choux pastry. A soft liquid, air-less choux pastry dough rises into this amazingly airy puffs. It’s a combination of an increase of gas molecules, expanding the batter.

References

Khan Academy, What is the ideal gas law?, link

Newsletter subscription box

5 comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • In your popcorn and souffle examples you say that n, the number of moles of substance (water in both the examples) is increasing. Are you sure about this? Where in the system are additional moles of water coming from? If you consider the system the popcorn kernel in the first example, isn’t the point that n is constant until the kernel structure can no longer withstand the increased pressure and rapidly expands in volume/explodes? At that point n in the kernel has decreased if some if the water vapor escaped during the kernel bursting. I’m having a hard time seeing why n would ever increase in these examples.

    • Hello Whit,
      Thank you for your comment! As a result, I decided to rewrite most of the post to make it somewhat clearer.
      It is true though that n will increase in a popcorn kernel. Keep in mind that n represents the number of gas molecules. If some of the water in a corn kernel evaporates the value of n will increase, even though no new molecule has been formed. It’s just that the liquid molecules do not participate at all in gas behaviour.
      So for a popcorn kernel T (the temperature) increases, which causes an increase in pressure, this is magnified by the fact that also some of the moisture will evaporate in the kernel, increasing the pressure even further. This will eventually result in a popping kernel. At that point, the pressure returns back to normal since the volume has increased and most likely part of the water vapour has evaporated.

      Hope that helps!

  • Would you be willing to allow me to print this post as a PDF and upload to our school system webpage? Or do you have a copy you could email me that has your blog name/signature on it? I can not link to the blog due to firewall restrictions, but I love your article and want to share it with students/teachers!

  • Thank you! It was very useful and you presented all the stuff in the basic thermodynamics terms. Nice and easy!

subscribe
sign up for a food sceince course
Find a book to read
Subscribe