Question: Write a MATLAB function to estimate the gas pressure of 1 mol of ammonia in a gas cylinder with a volume of 2.5 L at

Write a MATLAB function to estimate the gas pressure of 1 mol of ammonia in a gas cylinder with a volume of 2.5 L at 200 K using the ideal gas law and the Soave-Redlich-Kwong (SRK) equation of state. Calculate the percent error from using the ideal gas law, taking the SRK result as the actual pressure. Use fprintf to output the pressure for each method of calculation in units of atm, and report the error as a percentage. As a check and to make sure your code is working, the SRK answer should be 5.5643 atm.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Chemical Engineering Questions!