Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Equations of state are used to model the pressure, specific volume, and temperature behavior of a particular gas. One of the oldest equations of state

image text in transcribed

Equations of state are used to model the pressure, specific volume, and temperature behavior of a particular gas. One of the oldest equations of state is the van der Waals equation, which is described by Equation 1, where R is the ideal gas constant [kJ/kg/K], T is the temperature [K], v is the specific volume [m^3/kg], and P is the pressure [kPa]. P = RT/v - b - a/v^2 The constant b corrects for the volume occupied by the molecules, and a/v^2 corrects for the intermolecular forces of attraction. The constants a and b can be calculated using the relationships below, where R is the ideal gas constant [kJ/kg/K], T_c is the critical temperature [K], and P_c is the critical pressure [kPa]. a = 27/64 R^2 T^2_c/P_c b = RT_c/8P_c If constants a and b are set to zero, Equation 1 reduces to the Ideal Gas Law shown in Equation 2. P = RT/v (a) Create a MATLAB function to model the pressure of a gas (P) as a function of specific volume v and temperature T. The function should take four input arguments: 1) a numeric input for specific volume, 2) a numeric input for temperature, 3) a string specifying the name of the gas, and 4) a string specifying whether the van der Waal or ideal gas model should be used. The function should return the calculated pressure. The function should correctly assign the gas constant (R), critical temperature (T_c), and critical pressure (P_c) for oxygen, nitrogen, and carbon dioxide, which are provided in Table 1. As an example, the function call might look like: pressure = eqofstate(v, T, 'oxygen', 'vanderWaals') (b) Create a script to call the function created in part (a). The script should calculate the pressures for carbon dioxide at 273 K, and a specific volume range from 0.012 m^3/kg to 0.03 m^3/kg. Plot the pressure vs. specific volume relationship for both the Ideal Gas and van der Waals equation on the same plot

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions