CE 502 SWI, Assignment # 6
Due by 5:00 p.m. on Monday, April 17, 2000

An Advanced Set of Problems on Matlab and Maple. This assignment is designed to assist in the updating of the Ceng 303 notes and packages of programs.

These problems utilize techniques that have only recently been available in Matlab 5.0. For the first time in Matlab one can use multidimensional arrays and "cells" to hold data structures that are more complicated than simple vectors and matrices. A new chapter of the Matlab Notes describes these structures and shows how we started using them this year in a new version of the start programs for Ceng 301.

Laboratory Problems

These problems may be completed with help from any of your fellow students (as well as the instructor). You may not copy anyone else's work, but you can get other users to give you suggestions and point out mistakes that should be corrected.

Problems should be completed using the tools suggested and the results stored in a file that the instructor can look at.

1)

a) A frequently used equation for ideal gas heat capacity is:

Cp=A + B*((C/T)/sinh(C/T))^2 +D1*((E1/T)/cosh(E1/T))^2
(Note that D1 and E1 are used rather than D & E since Maple reserves those names for differentiation and exponentiation.)

Suppose we want to integrate this relation for Cp between the limits T1 and T2. Determine whether Maple can find a closed form for this specific integral over arbitrary limits in terms of the symbols: A, B, C, D1, E1, T1 and T2.

b) For a certain compound, we are given that:

A=7.214e+04, B=1.815e+05, C=2030, D1=1.314e+05, E1=860 for T in K.
The equation is suppose to be valid for the range: T= 298.15 to 1500K and it is reported that
at 298.15, Cp = 8.5754e+04 and 

at 1500K Cp=2.0567e+05 J/kmol/K.
Use either Matlab or Maple to verify that the function does give the reported values for Cp at 298.15 and 1500K. Use either program to determine the integral of Cp between the limits:
T1 = 300K and T2=1200K.
Problem (2) was specific to the Rice University course and has been deleted.

3) Use Maple to find the bubble point of an equimolar mixture of benzene, toluene and o-xylene at 2 atmospheres pressure. Compare with the value found with the Matlab program: bubpt . The vapor pressure determination in Maple should help in the development of these functions.
 

Test Problems

Work one of the following problems with minimal help ONLY from the course instructor.

1) a) Develop a Maple function that will be an improved version of the show2 display function. Make sure that it will still list the flows in a reasonable format when some of the flows are symbolic.

b) Extend your function so it can be used to display mass and energy balance data for a unit like the Matlab function showe.

2) Write, test and demonstrate Maple programs that can be used for basic VLE calculations. This includes a program for determining the bubble point of a mixture and one for doing flash calculations. The Matlab programs: bubpt and flash should serve as models to be emulated. The vapor pressure determination in Maple should help in the development of these functions.

3) Write, test and demonstrate Maple programs for basic energy balance calculations. This includes a program to determine the sensible enthalpy change for all compounds specified like the Matlab program enth3, a program to determine the total enthalpy of a stream like the Matlab program HinkJ, and a mass & energy balance around one of the modules for a mixer, reactor or separator like the Matlab programs: mixe, reacte or sepe. The Maple session to find the enthalpy of a mixture should help get these started.

4) Work out a scheme to enter the stoichiometric coefficients and check to see if the equation they represent is balanced in a Matlab session.

5) Work out a scheme to enter the stoichiometric coefficients and check to see if the equation they represent is balanced in a Maple session.