Takes you to Manual page This is the Examples page


11. Daemons>States-II (Advanced Topics)> Examples

                                EXAMPLE-1 Evaluate c_p of carbon dioxide at (a) 300 K, (b) 2000 K, and (c) 4000 K by evaluating the partial derivative of enthalpy with respect to temperature at constant pressure. Use the ideal gas model.

What-if scenario:   (d) How would the answer in part b change if the pressure is increased to 1000 kPa? 



Time Saver: To reproduce the visual  solution, copy and paste  these TEST-codes on the I/O Panel  of the appropriate daemon, then click the Load and Super-Calculate buttons.
#  TEST>Daemons>States>Volume>IdealGas;


   States    { 
     State-1:  CO2;
     Given:       { p1= 100.0 kPa;   T1= 300.0 K;   Vel1= 0.0 m/s;   z1= 0.0 m;   }

     State-2:  CO2;
     Given:       { p2= "p1" kPa;   T2= "T1+1" K;   Vel2= 0.0 m/s;   z2= 0.0 m;   }
    }




 

Step 1: Launch the Ideal Gas Volume State daemon.
   

Step 2: Calculate the states.
 

Step 3: Evaluate the partial derivative on the I/O Panel.
 

Solution

Launch the Volume State Daemon for the ideal gas model. Evaluate State-1 and State-2 as described in the TEST-Code above. On the I/O Panel calculate '=(h2-h1)/(T2-T1)' as 1.06 kJ/kg.K. Note that c_p is also evaluated as part of the state and is equal to this calculated value.

To evaluate c_p at a different temperature, change T1 to a new value, press the Enter key and Super-Calculate. At 2000 K c_p is evaluated as 1.37 kJ/kg.K. To see the effect of pressure on c_p, increase p1 to 1000 kPa and Super-Calculate. As can be expected  for an ideal gas model, c_p remains unchanged with a change of pressure.






 
                                EXAMPLE-2 A 10 gallon rigid tank contains saturated propane vapor at 20 deg-C.  Due to heat transfer into the tank, the temperature increases to 40 deg-
C. Determine the change in (a) pressure, (b)  stored energy, (c) entropy, and (d) stored exergy.  Assume the atmospheric conditions to be 100 kPa and 25 deg-C. Use the PC model for propane.

What-if scenario:   How would the answers change if propane is treated as (e) a perfect gas, (f) an ideal gas, (g) a real gas (Lee Kesler chart)?



Time Saver: To reproduce the visual  solution, copy and paste  these TEST-codes on the I/O Panel  of the appropriate daemon, then click the Load and Super-Calculate buttons.
#  Home>Daemons>States>Volume>PC Model ;

 
  States    { 
     State-0:  Propane(C3H8);
     Given:       { p0= 100.0 kPa;   T0= 25.0 deg-C;   Vel0= 0.0 m/s;   z0= 0.0 m;   }

     State-1:  Propane(C3H8);
     Given:       { T1= 19.999994 deg-C;   x1= 100.0 %;   Vel1= 0.0 m/s;   z1= 0.0 m;   Vol1= 10.0 gallon;   }

     State-2:  Propane(C3H8);
     Given:       { T2= 40.0 deg-C;   Vel2= 0.0 m/s;   z2= 0.0 m;   m2= "m1" kg;   Vol2= "Vol1" gallon;   }
    }


 



 
 
 

Step 1: Launch the Volume State Daemon with the Phase Change model.
  

Step 2: Calculate the three states and evaluate the desired differences on the I/O Panel.
 

Step 3: Modify the TEST-Code and use it with other models.

 Solution

Obviously the phase-change model is the most accurate model for a saturated vapor. Launch the Volume State Daemon with the phase-change model and select propane. Calculate the three states as described in the TEST-Code. On the I/O panel, evaluate '=p2-p1' as 79.9 kPa, '=m1*(e2-e1)' as 22.27 kJ , '=m1*(s2-s1)' as 0.071 kJ/K, and '=m1*(phi2-phi1)' as 1.1 kJ.

To repeat the solution with a different model, generate the TEST-Code by clicking Super-Calculate button. Start the volume State daemon of a different model, say, perfect gas. Copy and paste the code onto the I/O panel of the new daemon, Load and Super-Calculate. Notice that State-1 and 2 are not successfully calculated. This is because the property quality (x1) is not understood by the perfect gas model. To rectify the situation , modify the TEST-Code to replace x1=100% with p1=828.5 kPa. Or, evaluate the states without using TEST-Code. The change in pressure, energy and exergy are calculated as 52.5 kPa,  18.1 kJ, and  0.29 kJ. The TEST-Code generated by Super-Calculate will, now, work with the ideal gas or the real gas model. With the ideal gas model the pressure difference remains unchanged, the energy and exergy differences become 18.3 kJ and  0.3 kJ respectively. There is no significant difference between the PG and IG model because the temperature change in this problem is rather mild.

With the real gas (RG)  model, the results are not much improved. Changes in p, E, S and Phi are calculated as   83.7 kPa,  27.0 kJ, 0.087 kJ/K, and  1.07 kJ respectively.

States close to the saturation dome is modeled  more accurately by the RG model. Of course, the PC (phase-change) model is the most accurate and should be used whenever possible.



 
                                EXAMPLE-3 A piston cylinder device of volume 10 L contains 50 g of air - a mixture of 77% N2 and 23% O2 by mass -  at -195 deg-C. If the air is compressed in an isentropic manner to a final volume of 1 L, (a) determine the final temperature. 

What-if scenario:   (b) How would the answer change if the volume (compression) ratio were 5 instead?



Time Saver: To reproduce the visual  solution, copy and paste  these TEST-codes on the I/O Panel  of the appropriate daemon, then click the Load and Super-Calculate buttons.
#  Home>Daemons>States>Volume>RG/RG Model;

   States    { 
     State-1:  N2, O2;
     Given:       { T1= -195.0 deg-C;   m1= 50.0 g;   Vol1= 10.0 L;   x_A1= 77.0 %;   }

     State-2:  N2, O2;
     Given:       { s2= "s1" kJ/kg.K;   m2= "m1" g;   Vol2= "Vol1/10" L;   x_A2= "x_A1" %;   }

     State-3:  N2, O2;
     Given:       { s3= "s1" kJ/kg.K;   m3= "m1" g;   Vol3= "Vol1/5" L;   x_A3= "x_A1" %;   }
    }
 



 
 
 

Step 1: Launch the Volume State Real Gas Mixture Daemon.
 
 

Step 2: Calculate State-1. Note that air is a two-phase mixture with a quality of 84%.
 

Step 3: Calculate State-2.

 Solution

The problem, clearly, is a closed-process problem ( read Navigation section). However, in this particular case, it can be also solved as a State evaluation problem as no process quantities such as work or heat transfer is involved.  To arrive at the appropriate daemon on the primary window click on Daemons, States, Volume, and RealGasMixture in sequence. Otherwise use the TEST-Map and jump to the daemon page directly. 

State-1: Choose State-1, enter x_A1 (77%), m1 , Vol1 and T1, Calculate .

State-2: Choose State-2, enter x_A2 (77% or '=x_A1'), m2(='m1'), Vol2 (='Vol1/10') and  s2 ('=s1'), Calculate . The final temperature is -143 o C.

To explore the effect of compression ratio, simply change Vol2 (='Vol1/5') and Calculate the new answer as: -174oC.
 



The Steam Table Daemon
Fig. 3.1  Mixture daemons of two gases look very similar to other state daemons. The only new
properties are x_A, mass fraction of species A and y_A, mole fraction of species A.



 
                                EXAMPLE-4 A gas mixture made of equal proportions (by mass) of N2, O2, and CO2 enters a constant area duct at a pressure of 100 kPa, temperature 500 K, velocity 10 m/s and a mass flow rate of 6 kg/min. If the exit pressure and temperature are 90 kPa and 700 K, determine (a) the partial pressure of N2, (b) the cross-sectional area of the duct, (c) exit velocity. Use the ideal gas mixture model.

What-if scenario:   How would the duct area change if the mixture contained only N2 and O2? 



Time Saver: To reproduce the visual  solution, copy and paste  these TEST-codes on the I/O Panel  of the appropriate daemon, then click the Load and Super-Calculate buttons.
#  Home>Daemons>States>Surface>nIdealGases;

   States    { 
     State-0:  Propane(C3H8);
     Given:       { p0= 100.0 kPa;   T0= 25.0 deg-C;   Vel0= 0.0 m/s;   z0= 0.0 m;   }

     State-1:  Propane(C3H8);
     Given:       { T1= 20 deg-C;   x1= 100.0 %;   Vel1= 0.0 m/s;   z1= 0.0 m;   Vol1= 10.0 gallon;   }

     State-2:  Propane(C3H8);
     Given:       { T2= 40.0 deg-C;   Vel2= 0.0 m/s;   z2= 0.0 m;   m2= "m1" kg;   Vol2= "Vol1" gallon;   }
    }



 
 
 

Step 1: Launch the Volume State Daemon with the Phase Change model.
  

Step 2: Calculate the three states and evaluate the desired differences on the I/O Panel.
 

Step 3: Modify the TEST-Code and use it with other models.

 Solution

Launch the Surface State Daemon with the general mixture model (n gases). To set up the mixture, select N2, select  'Percent by Mass', enter 33.33 and click the Add/Modify button. Repeat with other species. The mole fractions are displayed on the right hand list. The partial pressure of N2 can be calculated as 100*0.398=39.8 kPa.

Now that the mixture composition is known, evaluate the states as described in the TEST-Code. Note that Velocity must be made an unknown (by removing its default value of zero) in State-2. The duct area is calculated as  124.3 cm^2 ,  and the exit velocity is found as Vel2= 15.55 m/s.

To change the mixture composition, select CO2, enter a value of zero and click Add/Modify. To update all calculations, simply Super-Calculate. The new duct area is calculated as 139.2 cm^2. 

Notice that although the gas is lighter due to the absence of CO2, the exit velocity does not change. 


 
The Steam Table Daemon
Fig.  3.1 The General Mixture daemon can handle any number of species. The mixture needs to be set up only once.


 
 
  E XAMPLE-5 Consider 100 m3 of moist air at  100 kPa, 30 o C and 70% relative humidity. Calculate the mass of dry air and mass of vapor. Calculate the amount of water vapor condensed if the mixture is cooled to 5oC in a constant-pressure process. 

What-if scenario:   How would the answer change if the total pressure were 200 kPa? 



Time Saver: To reproduce the visual  solution, copy and paste  these TEST-codes on the I/O Panel  of the appropriate daemon, then click the Load and Super-Calculate buttons.
#  TEST>Daemons>States>Volume>MoistAir;

   States { 
                State-1:  MoistAir;
               Given:       { p1= 100.0 kPa;   T1= 30.0 deg-C; 
                          Vel1= 0.0 m/s;   z1= 0.0 m;   Vol1= 100.0 m^3; 
                          RH1= 70.0 %;   }

               State-2:  MoistAir;
               Given:       { p2= "p1" kPa;   T2= 5.0 deg-C; 
                           Vel2= 0.0 m/s;   z2= 0.0 m;   m2= "m1" kg; 
                            RH2= 100.0 %;   }
   }
 



 

Step 1: Launch the Moist Air Volume State Daemon.
 
 
 
 
 

Step 2: Calculate the States.
 
 
 
 
 
 
 
 
 
 

Step 3: Change a parameter and click the Calculate and Super-Calculate buttons 
to update all calculations.
 

Solution

Once again we have a closed process described in the problem (read Navigation), which can also be solved with the moist air state daemon. To arrive at the appropriate daemon on the primary window click on Daemons, States, Volume,   and MoistAir in sequence after launching TEST on the primary browser. Or use the TEST-Map and jump to the daemon page directly. 

State-1: Choose State-1, enter T1 and phi1 , and Vol1. The default pressure is 100 kPa.  Calculate . The mass of  dry air and water vapor are calculated as: m1=111.5 kg and m_v1=2.125 kg respectively.

State-2: Choose State-2. Note that T2 being less than the dew point temperature, T_dp1=23.9oC, there will be condensation in this process, and therefore, air must be saturated at  State-2 .  Enter T2 , phi2(100%), and m2 ('=m1', the mass of dry air will remain unchanged during the process). Enter p2 as '=p1' in preparation to the parametric study. Calculate . The mass of water vapor  m_v2=0.61 kg . Hence the amount of condensation must be 2.12-0.61 or  1.51 kg .

Get back to State-1, change the p1 to 200 kPa, Calculate and Super-Calculate . The amount of vapor, m_v1 and m_v2, can be found to be  completely unaffected by a change in the  total pressure.

To solve the problem using the appropriate process daemon, visit the HVAC chapter of the tutorial.


The Steam Table Daemon
Fig. 5.1  Image of the Moist Air State daemon with a psychrometric plot superposed. 




                                EXAMPLE-6 Use the real-gas volume-state daemon to investigate how the internal energy of air changes with temperature over a range  of 200 K to 1500 K at (a) 100 kPa, (b) 1 MPa and (c) 10 MPa.? Use the real gas model. 

What-if scenario: How would the behavior change if the gas were argon instead? 



Time Saver: To reproduce the visual  solution, copy and paste  these TEST-codes on the I/O Panel  of the appropriate daemon, then click the Load and Super-Calculate buttons.
#  TEST>Daemons>States>Volume>RG Model;

  States    { 
     State-1:  Air;
     Given:       { p1= 100.0 kPa;   T1= 200.0 K;   Vel1= 0.0 m/s;   z1= 0.0 m;   }

     State-2:  Air;
     Given:       { p2= "p1" kPa;   T2= "T1+100" K;   Vel2= 0.0 m/s;   z2= 0.0 m;   }

     State-3:  Air;
     Given:       { p3= "p1" kPa;   T3= "T2+100" K;   Vel3= 0.0 m/s;   z3= 0.0 m;   }

   .........

    }

 



 

Step 6.1: Launch the Real Gas Volume State Daemon.
 

Step 5.2: Determine State-1-13 from the known temperatures and pressures.
 
 

Step 5.3: Calculate a second state using the new temperature.

 

 Solution

Clearly the problem involves nothing more than state evaluation. Arrive at the appropriate State daemon page, Daemons. States. Volume. RealGas  using the Child Tables or the  TEST-Map. Select Air as the working fluid.

State-1 : Enter p1 (100 kPa), T1 (200 K), and Calculate

State-2 : Enter p2 ('=p1')) and T2 ('=T1+100'), and Calculate
..
..
State-13 : Enter p13 ('=p1')) and T2 ('=T1+1200'), and Calculate

Select  u-T from the pull-down plot menu. Click the ‘Plot-Data’ button to display the data used for the plot. Copy the data to a spreadsheet. To repeat the calculation with a different pressure, change p1 to 1 MPa and  T1 to 250 K (this shift will help avoid having data points on top of each other). A Super-Calculate will update all the states and generate detailed output on the I/O window. Go back to the States panel, plot the u-T  diagram, and copy the data to the spreadsheet. Repeat the same procedure with the third value of pressure and then with the second gas argon. Note that the table of thermodynamic properties for all the calculated states generated by the Super-Calculate operation can also be similarly copied to a spreadsheet for plotting or further processing.


Fig. 7.1 u-T plots (T on the x-axis) at three different pressures for air and argon. The plot was made with Microsoft Excel. Note that the behavior is linear for argon, a truly perfect gas. 



 
 


More examples!
For more solved examples on this topic, visit the TEST>Slides and TEST.Problems pages. If you would like more examples on a particular topic, please send us a note using the TEST.Comments page.

Takes you to Manual page This is the Examples page

Copyright 1998-: Subrata Bhattacharjee