Arte SheetsLearn. Try. Understand.

Science

Van der Waals Real-Gas Equation & Compressibility Factor (Z)

Compare a van der Waals model pressure with an ideal-gas calculation using consistent molar units, and compute the model compressibility factor with explicit input guards.

Keep the units and model explicit

Use P=RT/(Vm−b)−a/Vm² with molar volume Vm. Here R is in L·bar/(mol·K), temperature in kelvins, Vm and b in L/mol, and a in L²·bar/mol². Total vessel volume cannot be substituted for molar volume unless the amount of gas is one mole.

The initial R=0.0831446, a=3.658 and b=0.04286 are supplied teaching parameters. They are not a validated property package for a gas cylinder or natural-gas mixture. Pressure values below are predictions of this model, not measurements.

The excluded-volume term raises pressure relative to RT/Vm, while the attraction term lowers it. The net departure can have either sign; there is no universal 20–50% ideal-gas error.

Evaluate pressure without rounding intermediate results

E2 returns the raw model pressure. With T=310 K and Vm=0.5 L/mol it is approximately 41.751 bar, compared with E3 ideal pressure of 51.549652 bar.

The guard requires five numeric inputs, positive R, T and Vm, nonnegative a and b, and Vm>b. The zero-parameter limit a=b=0 is allowed and reproduces the ideal model. Celsius temperature must first be converted to kelvins.

=IF(COUNT(B2:B6)<>5,"Enter five numeric inputs",IF(OR(B2<=0,B3<=0,B4<=0,B5<0,B6<0,B4<=B6),"Require R,T,Vm>0; a,b>=0; Vm>b",B2*B3/(B4-B6)-B5/B4^2))

Compare model compressibility

E4 evaluates Z=Pmodel×Vm/(RT), about 0.8099 for the initial state. It uses unrounded pressure and propagates invalid-input messages. Nonpositive model pressure is flagged instead of presented as a usable gas compressibility factor.

Z is dimensionless. Z<1 means this model pressure is below the ideal value at the same temperature and molar volume; it is not an experimental error estimate. Increasing Vm to 25 L/mol gives about 0.9960. At large Vm the corrections diminish.

=IF(ISNUMBER(E2),IF(E2<=0,"Nonpositive model pressure; review state",E2*B4/(B2*B3)),E2)

Try independent limiting cases

Set a=0 to isolate excluded volume: Z becomes Vm/(Vm−b)>1 for b>0. Set b=0 to isolate attraction: Z becomes 1−a/(RTVm). Set both to zero to obtain Z=1.

E3 is deliberately independent of a and b. It can still display the ideal comparison when those model parameters are missing; E2 and E4 must remain unavailable.

=IF(COUNT(B2:B4)<>3,"Enter numeric R,T,Vm",IF(OR(B2<=0,B3<=0,B4<=0),"Require R,T,Vm>0",B2*B3/B4))

Do not infer phase stability from the input guard

Vm>b and positive pressure do not establish a stable single gas phase. Near condensation or a critical region, phase-equilibrium analysis and a suitable validated equation of state are needed. The spreadsheet does not select a stable phase or model a mixture.

E2 retains negative algebraic outputs for diagnosis, while E4 flags them. Do not use this educational calculation alone for vessel sizing, operating limits or pressure protection.

Try the example

Use the original values or change them to test your understanding.

Further reading