You are on page 1of 2

Engineering With Python Solving Problems the Open Source Way Skip to Content

Home Why this blog?

Molar Volume and Compressibility Factor from van der Waals Equation Part 1
May 25th, 2009 by Steve. Reference: This is problem 1.1 in Problem Solving in Chemical Engineering with Numerical Methods by Michael Cutlip and Mordecai Shacham, Prentice-Hall ISBN 0-13862566-2. It is also Problem 1 in the ASEE 1997 problem set. Concepts:

Set up the van der Waals (VDW) equation to solve for the molar volume Use Ipython with Scite editor to edit and save files Import packages into workspace Define constants Use lists to work with data sets Use for statement to iterate over condition parameters Define a function to solve for the roots Use the scipy.optimize fsolve root finding package Use the matplotlib package to plot the results

Problem Description:

The ideal gas law typically works well at low pressures and temperatures. For more extreme conditions, other equations of state are more accurate. In this case, well work with the van der Waals equation to predict molar volume and compressibility for gaseous ammonia at several different pressures and temperatures. For that, well need to rearrange the equation and solve for the roots. Equations: VDW (arranged to solve for molar volume): (P + a/V^2)(V b) RT = 0 a = (27/64)(R^2*Tc^2/Pc) b = RTc/(8Pc) R = gas constant (0.08206 atm-L/g-mol-K) T = temperature (K) P = pressure (atm) Pc = critical pressure (111.3 atm for ammonia) Tc = critical temperature (405.5 K for ammonia) Pr = P/Pc (reduced pressure) Tr = T/Tc (reduced temperature) Z = PV/RT (compressibility factor) V = molar volume (L/g-mol) Questions: 1. Calculate the molar volume and compressibility factor for gaseous ammonia at a pressure P = 56 atm and temperature T = 450.0 K using the VDW. 2. Repeat the calculations for the following reduced pressures: Pr = 1, 2, 4, 10, and 20 and T = 450.0 K. 3. Plot the compressibility factor as a function of Pr. Posted in: Programming with Python. Compare Different Software Packages for Solving ChE Problems Molar Volume and Compressibility Factor from van der Waals Equation Part 2

Leave a Reply

You might also like