Question
USING MATLAB ONLY The Ideal Gas Law is given by P=(nRT)/V, with P in atm, V in L ,T in K, and n in number
USING MATLAB ONLY
The Ideal Gas Law is given by P=(nRT)/V, with P in atm, V in L ,T in K, and n in number of moles. You can use this equation to get an approximate solution. However, life is not ideal. The van der Waals equation models real-life gases and is given by [P+((n2a)/V2)](Vnb) =nRT.
Solve the van der Waals equation to calculate the volume of 2 mol CO2at 50F (NOTE: be sure to look up conversion of Fahrenheit to Kelvin) with a pressure of 6 atm. Use R= 0.08206 (L atm)/(mol K) and the following information about CO2:a= 3.658 (L2atm)/mol2andb= 0.04286 L/mol. Use the following steps:
(a) Create an anonymous function for the van der Waals equation given the constants above. Remember to solve the equation for zero!
(b) Secondly, graph the anonymous function and the line y= 0 on the same set of axes. Note the approximate point of intersection.
(c) Using the approximate value from the point of intersection and the anonymous function you created, use the command fzero to solve for V Publish the results in Word, verifying the graph above is included.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started