The ideal gas equation states that P = nRT/V, where P is the pressure, V is the

Question:

The ideal gas equation states that P = nRT/V, where P is the pressure, V is the volume, T is the temperature, R = 0.08206 (L atm)/(mol K) is the gas constant, and n is the number of moles. Real gases, especially at high pressure, deviate from this behavior. Their response can be modeled with the van der Waals equation
p = nRT/V – nb – n2a/V2
where a and b are material constants. Consider 1 mole (n = 1) of nitrogen gas at T = 300K. (For nitrogen gas a = 1.39 (L2 atm)/mol2, and b = 0.0391 L/mol.) Create a vector with values of Vs for 0.1 < V< 1 L, using increments of 0.02 L. Using this vector calculate P twice for each value of V, once using the ideal gas equation and once with the van der Waals equation. Using the two sets of values for P, calculate the percent of error (Pideal – Pwaals/ Pwaals 100) for each value of V. Finally, by using MATLAB's built-in function max, determine the maximum error and the corresponding volume.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: