This calculator finds the pressure of a real gas with the van der Waals equation, which corrects the ideal gas law for molecular volume and attraction. Enter the amount, temperature, volume and the gas constants a and b; you get the van der Waals pressure, the ideal gas pressure and the difference between them.
Formula
P = n × R × T ÷ (V − n × b) − a × n2 ÷ V2, with T = t + 273.15.
- P: pressure in bar
- n: amount of gas in moles; V: volume in litres
- R = 0.0831446261815324 L·bar/(mol·K), the molar gas constant 8.31446261815324 J/(mol·K) divided by 100 (1 bar = 100 kPa, 1 kPa·L = 1 J)
- T: absolute temperature in kelvin; t: temperature in °C
- a (L2·bar/mol2): attraction term; b (L/mol): volume excluded per mole of molecules
- Defaults are the tabulated values for carbon dioxide, a = 3.640 L2·bar/mol2 and b = 0.04267 L/mol
Worked Example
1 mol of carbon dioxide at 25 °C in a 2 L container.
- T = 25 + 273.15 = 298.15 K; n × R × T = 1 × 0.0831446 × 298.15 = 24.7896 L·bar
- V − n × b = 2 − 1 × 0.04267 = 1.95733 L
- Repulsion term: 24.7896 ÷ 1.95733 = 12.6650 bar; attraction term: 3.640 × 12 ÷ 22 = 0.91 bar
- P = 12.6650 − 0.91 = 11.7550 bar
- Ideal gas: 24.7896 ÷ 2 = 12.3948 bar; difference: (11.7550 − 12.3948) ÷ 12.3948 × 100 = -5.16 %
Assumptions
- The equation is an approximation: good for moderate deviations from ideal behaviour, not accurate near the critical point or for liquids.
- The constants a and b are for the gas in question; values differ slightly between data tables, so use the ones your course or method gives.
- The volume is larger than n × b; if it is not, the equation has no physical meaning and the calculator shows “Cannot compute”.
How to read the result
A negative difference means the attractions between molecules dominate and the real gas pushes less on the walls than an ideal gas would, which is typical for CO2 at room temperature. For an ideal-gas calculation in kPa and atm, use the ideal gas law calculator.
Limits and common mistakes
- Using a in L2·atm/mol2 with R in L·bar/(mol·K) mixes units; for CO2 a is about 3.59 L2·atm/mol2, which equals 3.640 L2·bar/mol2.
- Entering the temperature in kelvin in the °C field adds 273.15 twice.
Frequently Asked Questions
What is the pressure of 1 mol CO2 at 25 °C in 2 L?
About 11.755 bar by van der Waals, against 12.395 bar for an ideal gas.
What do a and b mean?
a measures the attraction between molecules; b is the volume taken up by one mole of the molecules themselves.
Why does it say Cannot compute?
The volume is not larger than n × b, the space the molecules themselves occupy, so the equation has no physical solution.
Formula used
in n | Amount of gas | mol | 1 | 0 in t | Temperature | °C | 25 | -273.15 in v | Volume | L | 2 | 0.000001 in a | Constant a | L²·bar/mol² | 3.640 | 0 in b | Constant b | L/mol | 0.04267 | 0 out p | Van der Waals pressure | bar | n * 0.0831446261815324 * (t + 273.15) / (v - n * b) - a * n ^ 2 / v ^ 2 | 4 out pid | Ideal gas pressure | bar | n * 0.0831446261815324 * (t + 273.15) / v | 4 out dev | Difference from ideal | % | (p - pid) / pid * 100 | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Molar Gas Volume at RTP: Equation and Calculator24.0551 L
- Partial Pressure and Total Pressure Formula70.927 kPa
- Partial Pressure Equation: Formula and Examples
- Volume of Gas Equation: Formula and Calculator22.4140 L
- Partial Pressure of Gas: Formula and Examples
- Partial Pressure Blending Calculator for Nitrox0.8025 fraction