212k views
1 vote
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 − n^2a/V^2
where a and b are material constants.
1. Consider 1 mole ( n = 1 ) of nitrogen gas at T = 300K. (For nitrogen gas a = 1.39 (L^2 atm)/mol^2, 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.
2. 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
((P waal - Pwaals / Pwaals) 100) for each value of V.
3. Finally, by using MATLAB's built-in function max, determine the maximum error and the corresponding volume.

1 Answer

2 votes

Answer:

Please find attached file for complete answer solution and explanation.

Step-by-step explanation:

The ideal gas equation states that: P = nRT/V where P is the pressure, V is the volume-example-1
User Ryan Leaf
by
5.2k points