The equation of state for carbon dioxide is given by Reynolds as
Microsoft Equation 3.0
where Microsoft Equation 3.0is the density in kg/m^3, P is the pressure in Pa, T is the temperature in K, and the constants are given below:
Microsoft Equation 3.0Microsoft Equation 3.0
Write a C++ function that will calculate the pressure of superheated carbon dioxide given the density and temperature. Also write a driver program that will illustrate the use of the function for the following data points:
Case #
Density (kg/m^3)
Temperature (K)
1
18.5908
300
2
50.0
500
3
50.0
700
4
50.0
900