A van der Waals equation calculator finds the pressure or the temperature of a real gas, which the ideal gas law gets wrong when the gas is compressed or cold. Pick a gas, enter the moles, the volume and the temperature, and compare the result with the ideal gas.
How to use the van der Waals equation calculator
- Choose to find the pressure or the temperature.
- Pick a gas, or choose custom and enter a and b.
- Enter the moles, the volume in litres and the temperature (or the pressure).
- Press Calculate.
A real gas
The ideal gas law treats molecules as points with no attraction. Real molecules have a size, and they attract each other. The van der Waals equation adds a correction for each effect. The equation is a model for real gases, which deviate from ideal behavior [1]. The calculator shows the van der Waals pressure and the ideal-gas pressure for the same gas, so you can see how large the deviation is.
The equation
The equation is (P + a n² ÷ V²)(V − n b) = n R T, where P is the pressure, V the volume, T the temperature, n the moles, and a and b the van der Waals parameters. Wikipedia writes the molar form as p = R T ÷ (v − b) − a ÷ v², with v = V ÷ N the molar volume [1]. Multiplying through by the amount gives the same equation as the first form, and the calculator solves it directly.
What a and b mean
Wikipedia says that b is the excluded volume, since the model treats molecules as hard spheres, and that a expresses the strength of the attraction between particles, with the units of pressure times molar volume squared [1]. The term n b takes away the volume that the molecules occupy, and the term a n² ÷ V² lowers the pressure because the attraction pulls the molecules inward. A larger a lowers the pressure of the real gas.
The constants
The Wikipedia data page gives a in L²·bar/mol² and b in L/mol [2]. For carbon dioxide they are 3.6 and 0.04267, for nitrogen 1.370 and 0.0387, for oxygen 1.382 and 0.03186, for methane 2.283 and 0.04278, for water 5.536 and 0.03049, for hydrogen 0.2476 and 0.02661, for helium 0.0346 and 0.0238, for neon 0.2135 and 0.01709, and for argon 1.355 and 0.03201 [2]. You can also choose a custom gas and enter your own a and b.
The gas constant
The tool uses R = 8.3144598 joules per mole kelvin, close to the current value of 8.31446261815324 [3]. As a litre of bar is 100 joules, in the units of the constants R is 0.083144598 litre bar per mole kelvin, close to the current 0.0831446261815324 [3]. That conversion is our own working. Volumes must be in litres, and the pressure is then in bar, which the calculator also shows in kilopascals and megapascals, a bar being 100 kilopascals.
A worked example
This example is our own. One mole of carbon dioxide in a one litre container at 300 kelvin has a van der Waals pressure of 0.083144598 × 300 ÷ (1 − 0.04267) − 3.6 = 22.455 bar. The ideal gas law gives 24.943 bar, so the real gas has a pressure about 9.98 percent lower. The compressibility factor Z = P V ÷ (n R T) is 0.9002, which is below 1 because the attraction dominates at this density.
Finding the temperature
Choose the temperature mode, and enter the pressure. The equation then gives T = (P + a n² ÷ V²)(V − n b) ÷ (n R). With the pressure of 22.455 bar in the same container, the result is 300 kelvin, as it should be, and the ideal gas law would put the temperature at 270.07 kelvin. You can enter the temperature as kelvin, Celsius or Fahrenheit, and the answer is given in all three.
A validity check
The volume per mole must stay larger than b, since b is the volume that the molecules exclude and it cannot exceed the volume of the gas [1]. The calculator checks this and shows an error if the container is too small. For carbon dioxide that means more than 0.04267 litres per mole. Near that limit the pressure rises very steeply, which is a sign that the model is being pushed past where it works.
The critical point
Wikipedia gives the critical values as v_c = 3b, T_c = 8a ÷ (27 R b) and p_c = a ÷ (27 b²), and a critical compressibility of 3/8, or 0.375, where most real fluids lie between 0.23 and 0.31 [1]. Rearranged, these give a = 3 p_c v_c² and b = v_c ÷ 3, which is our own working from the same relations. This shows that the equation is a model, and its values at the critical point are only qualitatively right.
Limits
The equation works best for gases that are well above their boiling point and at moderate pressure. Near condensation, in a liquid or at very high density, it gives pressures that can be quite wrong. For an engineering design use measured data or a more accurate equation of state. The calculator is meant for teaching, for homework checks, and for seeing how much a gas departs from ideal behavior.
Common mistakes
- Entering the volume in cubic metres. Use litres with these constants.
- Using the temperature in Celsius in the formula. The tool converts to kelvin.
- Taking a and b from a table in other units. Check the units first.
- Trusting the result near the liquid state. The model is approximate there.
What next
Use this often? Add Van Der Waal to your Home screen.
Frequently asked questions
What is a van der Waals equation calculator?
A tool that solves the van der Waals equation for the pressure or the temperature of a real gas.
What is the van der Waals equation?
(P + a n² ÷ V²)(V − n b) = n R T.
What do a and b stand for?
b is the volume that the molecules take up and a the strength of the attraction between them.
In which units are the built-in constants?
a is in L²·bar/mol² and b in L/mol.
When does the van der Waals equation fail?
Near the liquid state, at very high density or close to condensation.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.