0.002432 1.002432. where x is check for normality T 105.67 5.2546

Similar documents
Turbulent Mixing and Chemical Reaction in Stirred Tanks

vap H = RT 1T 2 = kj mol kpa = 341 K

Solutions to Sample Problems for Test 3

Heat transfer to or from a fluid flowing through a tube

Physics 111. Exam #1. January 24, 2014

Lecture 9 Solving Material Balances Problems Involving Non-Reactive Processes

Thermodynamics. Chapter 13 Phase Diagrams. NC State University

MECH Statics & Dynamics

ESCI 340 Physical Meteorology Cloud Physics Lesson 2 Formation of Cloud Droplets

Chapter 12 IVP Practice Problems

FLUID MECHANICS. TUTORIAL No.4 FLOW THROUGH POROUS PASSAGES

= 800 kg/m 3 (note that old units cancel out) J 1000 g = 4184 J/kg o C

F321 MOLES. Example If 1 atom has a mass of x g 1 mole of atoms will have a mass of x g x 6.02 x = 7.

ME THERMODYNAMICS I

Unit 11 Using Linear Regression to Describe Relationships

Figure 56. Simple mixing process with process specification for the outlet stream.

ChE 344 Chemical Reaction Engineering Winter 1999 Exam I Part 1 (80%) Solution

Gas Laws. The kinetic theory of matter states that particles which make up all types of matter are in constant motion.

AS1 MOLES. oxygen molecules have the formula O 2 the relative mass will be 2 x 16 = 32 so the molar mass will be 32g mol -1

σ m using Equation 8.1 given that σ

v = x t = x 2 x 1 t 2 t 1 The average speed of the particle is absolute value of the average velocity and is given Distance travelled t

1) What is the overall order of the following reaction, given the rate law?

Module 5: Combustion Technology. Lecture 34: Calculation of calorific value of fuels

Phase Equilibrium: Fugacity and Equilibrium Calculations. Fugacity

Chemistry 212 VAPOR PRESSURE OF WATER LEARNING OBJECTIVES

EXERCISES. 16. What is the ionic strength in a solution containing NaCl in c=0.14 mol/dm 3 concentration and Na 3 PO 4 in 0.21 mol/dm 3 concentration?

Final Exam CHM 3410, Dr. Mebel, Fall 2005

MSc Financial Economics: International Finance. Bubbles in the Foreign Exchange Market. Anne Sibert. Revised Spring Contents

Math 22B, Homework #8 1. y 5y + 6y = 2e t

CHEMISTRY GAS LAW S WORKSHEET

CHAPTER 12. Gases and the Kinetic-Molecular Theory

Testing Documentation for CCIH Database Management System By: John Reeves, Derek King, and Robert Watts

ES-7A Thermodynamics HW 5: 5-62, 81, 96, 134; 7-29, 40, 42, 67, 71, 106 Spring 2003 Page 1 of 7

Using Excel (Microsoft Office 2007 Version) for Graphical Analysis of Data

Optical Illusion. Sara Bolouki, Roger Grosse, Honglak Lee, Andrew Ng

Assessing the Discriminatory Power of Credit Scores

1 Exercise 2.19a pg 86

IB Chemistry. DP Chemistry Review

k 2f, k 2r C 2 H 5 + H C 2 H 6

MBA 570x Homework 1 Due 9/24/2014 Solution

Chapter 18 Homework Answers

atm = 760 torr = 760 mm Hg = kpa = psi. = atm. = atm. = 107 kpa 760 torr 1 atm 760 mm Hg = 790.

EXPERIMENT 11 CONSOLIDATION TEST

= atm. 760 mm Hg. = atm. d. 767 torr = 767 mm Hg. = 1.01 atm

The Gas Laws. Our Atmosphere. Pressure = Units of Pressure. Barometer. Chapter 10

Thermodynamics of Mixing

Gases. States of Matter. Molecular Arrangement Solid Small Small Ordered Liquid Unity Unity Local Order Gas High Large Chaotic (random)

Answer, Key Homework 6 David McIntyre 1

Calorimetry: Heat of Vaporization


The first law: transformation of energy into heat and work. Chemical reactions can be used to provide heat and for doing work.

You may use a scientific calculator (non-graphing, non-programmable) during testing.

Chem 420/523 Chemical Thermodynamics Homework Assignment # 6

Summary of important mathematical operations and formulas (from first tutorial):

Review of Chemical Equilibrium Introduction

Sample Test 1 SAMPLE TEST 1. CHAPTER 12

48 Practice Problems for Ch Chem 1C - Joseph

WEEK 1. Engineering Calculations Processes Process Variables

Question 2: How do you solve a matrix equation using the matrix inverse?

1. Thermite reaction 2. Enthalpy of reaction, H 3. Heating/cooling curves and changes in state 4. More thermite thermodynamics

CHEM 36 General Chemistry EXAM #1 February 13, 2002

A technical guide to 2014 key stage 2 to key stage 4 value added measures

Kinetic Theory of Gases. 6.1 Properties of Gases 6.2 Gas Pressure. Properties That Describe a Gas. Gas Pressure. Learning Check.

DISTRIBUTED DATA PARALLEL TECHNIQUES FOR CONTENT-MATCHING INTRUSION DETECTION SYSTEMS. G. Chapman J. Cleese E. Idle

TIME SERIES ANALYSIS AND TRENDS BY USING SPSS PROGRAMME

Calculations with Chemical Formulas and Equations

Everest. Leaders in Vacuum Booster Technology

a) Use the following equation from the lecture notes: = ( J K 1 mol 1) ( ) 10 L

Exergy: the quality of energy N. Woudstra

How To Calculate Mass In Chemical Reactions

1) Assume that the sample is an SRS. The problem state that the subjects were randomly selected.

Thermodynamics of Adsorption

Molar Mass of Butane

A Spam Message Filtering Method: focus on run time

Energy and Chemical Reactions. Characterizing Energy:

DETERMINING THE ENTHALPY OF FORMATION OF CaCO 3

DISTRIBUTED DATA PARALLEL TECHNIQUES FOR CONTENT-MATCHING INTRUSION DETECTION SYSTEMS

A note on profit maximization and monotonicity for inbound call centers

Module 8. Three-phase Induction Motor. Version 2 EE IIT, Kharagpur

Incline and Friction Examples

Solution of the Heat Equation for transient conduction by LaPlace Transform

Gases. Macroscopic Properties. Petrucci, Harwood and Herring: Chapter 6

Chemistry B11 Chapter 4 Chemical reactions

6 4 Applications of the Normal Distribution

Chapter H - Problems

Problem Set 3 Solutions

CHEM 105 HOUR EXAM III 28-OCT-99. = -163 kj/mole determine H f 0 for Ni(CO) 4 (g) = -260 kj/mole determine H f 0 for Cr(CO) 6 (g)

Lecture 3 Fluid Dynamics and Balance Equa6ons for Reac6ng Flows

Lecture Notes: Gas Laws and Kinetic Molecular Theory (KMT).

The Nonlinear Pendulum

Chapter 7 Energy and Energy Balances

PV (0.775 atm)( L) n = = = mol RT -1-1

IB Chemistry 1 Mole. One atom of C-12 has a mass of 12 amu. One mole of C-12 has a mass of 12 g. Grams we can use more easily.

Chemistry 13: States of Matter

VAPOR PRESSURE AS A FUNCTION OF TEMPERATURE. This laboratory covers material presented in section 11.8 of the 9 th Ed. of the Chang text.

Unit 5 Practice Test. Name: Class: Date: Multiple Choice Identify the choice that best completes the statement or answers the question.

Chemical Process Simulation

1. What is the molecular formula of a compound with the empirical formula PO and a gram-molecular mass of 284 grams?

Chemical Kinetics. Reaction Rate: The change in the concentration of a reactant or a product with time (M/s). Reactant Products A B

Transcription:

6 PRACTICAL NUMERICAL METHODS Chapter 3 VBA Practice Problem Ue Excel and VBA to olve the following problem. Document your olution uing the Expert Problem Solving tep outlined in Table 1.2. 1.961 x 0.5 y x 0.002432 1.002432 x 0.203 1. Create a VBA uer function for the following equation to generate normal random number from uni- formly ditributed random number (0<x<1) and the tandard deviation: 94 where x i a uniform random number (0<x<1) and i the tandard deviation. Generatee 1000 normal random value for y. Ue a tandardd deviation of 1 and plot the reult in a hitogram to check for normality viually. 2. The vicoity () of methane ga ha the following function of temperaturee (T). The temperature ha unit of degree Kelvin. The vicoity ha unit of Pa: 5.2546 10 T 105.67 1 T a. Create a uer function of the vicoity equation in VBA. b. Ue the VBA uer function to generate data for the vicoity between 300K and 1000K at 50K increment. Plot the reult in an yx catter plot. Label the axe. c. Ue Goal Seek to find the temperature when the vicoity of methane i 210-5 Pa. 3. Ue programming flowchart ymbol to diagram a macro in thi book, a aigned by the intructor (MS Office application, uch a Excel and Word have drawing tool with flow chart hape. For ex- ample, in Excel elect from the tab Inert>Shape>Flowchart) ). 7 0.59 Anwer: 622.51 K Flowchart Symbol Definition Flowchart Symbol Definition Flowchart Symbol Definition Start/end point Flow line Delay in the program Proce tep or equence of tep Alternate proce Deciion branching point Data Input/Output Subroutine Preparation Manual input Repeat until topped mannually Connect remote flow chart on the ame page Connect remote flow chart on different page Extractt Merge reult from two or more ubprocee Store data Dik torage or direct acce file Diplay information Internal torage Summing junction Or Printable document Collate/format orderr of information Sort data 4. Refer to Example 2.1. Create VBA uer functionn of Fourier erie for the dimenionle temperature at the center of a rectangle with three ide at the ame temperature and the fourth ide at a different 4 Rigg, J.B. (2001) Chemical Proce Control, 2 nd ed.., Ferret Publ., Lubbock, p. 121. 94

PRACTICE PROBLEMS 7 temperature. Your code hould have argument for the ratio of width to length, the number of term in the ummation, and ue a loop and workheet function. What i the dimenionle temperature for width to length ratio of 1, 0.5, 0.25, 0.125, 0.05, 0.025? How doe the number of term in the ummation affect the reult? Anwer: θ = 0.25,0.4451, 0.4976, 0.4999, 0.5 5. Create a VBA uer defined function to calculate the vapor preure of ethanol uing Antoine contant and temperature in degree C. log P B 10 A mmhg T C A = 8.11220, B = 1592.864, C = 226.184. Your function hould return the vapor preure in unit of Pa. Tet your function at T = 25 C Anwer: 7865 Pa 6. Write a VBA uer defined function to convert a mole fraction into a ma fraction of a binary ytem. Tet your function for a binary ytem of ethanol in water. What i the ma fraction of ethanol if the mole fraction i 0.85? Anwer: 0.9354 7. Write a VBA uer defined function to convert a ma fraction into a mole fraction for a binary ytem. Tet your function for a ytem of ethanol in water with a ma fraction of 30% water. Anwer: 0.5229 8. Create a VBA uer-defined function to convert humidity to mole fraction. Tet your function with a humidity of 0.04 kg water in 1 kg of air. Anwer: 0.061 9. Create a VBA macro to calculate the bubble point preure for mixture. Tet your macro with a ternary mixture of 40 mol% butane, 40 mol% pentane, and 20 mol% hexane at 100 C. Aume Raoult law. Antoine Equation for Vapor Preure: ln Component a b c Butane 13.6608 2154.70 238.789 Pentane 13.7667 2451.88 232.014 Hexane 13.8193 2696.04 224.317 b PkPa a T C c Anwer: 878.2 kpa 10. Write a VBA macro to calculate the bubble point temperature for a mixture at a given preure uing Goal Seek. Tet your function with the ternary ytem of Problem 9 at 1 atm. Anwer: 17.9 C 11. Create a VBA macro for calculating the dew point preure of a mixture at a given temperature. Tet your function uing the ternary ytem of Problem 9 at 1 atm preure. Aume Raoult law. 12. Create a VBA macro for calculating the dew point temperature of a mixture at a given preure uing Goal eek. Aume Raoult law. Tet your function. 13. Create a VBA macro to calculate the pecific volume uing the Peng-Robinon equation of tate. Tet your function. 14. Create a VBA macro to calculate the pecific volume uing the Suave Redlich Kwong equation of tate. Tet your function.

8 PRACTICAL NUMERICAL METHODS 15. Conider a binary ytem of methanol and water at one atmophere preure. Create VBA function of vapor preure in term of temperature and activity coefficient in term of mole fraction and temperature for methanol and water. Show your work, including your VBA function code. Calculate the bubble point and dew point temperature for the total range of methanol mole fraction. Show your reult in a Txy plot. Dew Pt T Bubble Pt x or y Calculate the vapor-liquid-equilibrium (VLE) mole fraction for the total range of methanol mole fraction. Show your reult in an yx plot to compare the reult with the experimental data tabulated below. y x Aume a modified form of Raoult law: i T i i i i i i i T yp xp or y xp P (1) where y i and x i are the vapor and liquid phae mole fraction of pecie i, P T and P are the total preure and aturation vapor preure of pecie i, repectively, and i i the activity-coefficient for pecie i. Apply Dalton law of partial preure to calculate the bubble (boiling) point temperature from the expreion: ixipi PT (2) i The dew point temperature i calculated from the expreion: yi 1 (3) P P i i i For binary ytem, the mole fraction of the econd pecie i calculated from the mole fraction of the firt pecie: x 2 = 1 x 1. The bubble and dew point equation become: 1 1 1 21 1 2 T x P x P P T (4) y1 1 y1 1 1 1 1 1 or y 1 1P1 2P2 PT PT 2P2 1P1 2P2 Get temperature correlation for vapor preure from DIPPR or ue the Antoine correlation for vapor preure in the appendice of your Material and Energy Balance or Thermodynamic textbook. Ue Wilon equation to calculate the activity coefficient: 1 (5)

PRACTICE PROBLEMS 9 12 21 ln1 ln x112x2x2 x x x x 1 12 2 21 1 2 12 21 ln 2 ln x2 21x1x1 x x x x 1 12 2 21 1 2 (6) (7) 2 12 11 12 exp 1 RT g 1 21 22 and 21 exp 2 RT g For the methanol (1), water (2) ytem 95 the binary interaction parameter are: 12 11 = 82.9876 cal/mol, 21 22 = 520.6458 cal/mol, and the molar volume are: 1 = 40.73 cm 3 /mol, 2 = 18.07 cm 3 /mol. Methanol-Water Sytem VLE data at P = 1 atm 96 x y x y 0.00 0.000 0.30 0.665 0.02 0.134 0.40 0.729 0.04 0.230 0.50 0.779 0.06 0.304 0.60 0.825 0.08 0.365 0.70 0.870 0.10 0.418 0.80 0.915 0.15 0.517 0.90 0.958 0.20 0.579 0.95 0.979 1.00 1.000 (8) 16. Set up an Excel workheet uing VBA function to calculate the adiabatic flame temperature of methane combution in air. CH 2O CO 2H O (9) 4 2 2 2 F CH4 F air T in q=0 F O2 or F CH4 F CO2 F H2O F N2 T out Calculate the adiabatic flame temperature from an energy balance around the reactant and product that aume no heat lo to the reactor urrounding: F in H in F out H out q 0 (10) where F and H are the inlet or outlet molar flow rate and enthalpie of the molecular pecie involved in the combution reaction. The heat lo, q = 0 under adiabatic condition. The exit tream molar flow rate are determined from the feed condition and toichiometry of the reaction in Equation (9). Calculate the enthalpy of each molecular pecie in either inlet or outlet tream from it heat of formation and heat capacity: 95 Perry Chemical Engineer Handbook, 7 th ed., p. 13-20. 96 Seader and Henley, Separation Proce Principle, 2 nd ed., p. 119

10 PRACTICAL NUMERICAL METHODS Tin Tout (11) H H c dt H H c dt in r p out r p Tr Tr where H r i the tandard heat of formation at the reference temperature, T r = 25C. The adiabatic flame temperature i the exit tream temperature, T out. Heat capacity function of temperature ue polynomial over a limited temperature range. p 2 3 c T abt ct dt (12) Subtitute Equation (12) into Equation (11) to give enthalpy a a function of temperature: 2 2 3 3 4 4 o b c d H H a T T T T T T T T 2 3 4 (13) The coefficient for each pecie are lited in Table 1. Equation (13) ue temperature in degree C. Follow thee tep to et up your Excel workheet for calculating the adiabatic flame temperature: (a) Set up the mole balance for each pecie in an Excel workheet. Aume complete combution and air i made up of 21 mole% O 2 and 79 mole% N 2. Although N 2 i not directly involved in the combution reaction, we mut account for the effect of N 2 on the temperature due to it enible heat. Specify a ratio of air to methane in the feed. Ue an IF() function in Excel to check for the limiting reactant, either CH 4 or O 2 in the feed tream. (b) Create VBA uer-defined function for the enthalpie of each molecular pecie. Ue the uer-function in your Excel workheet to calculate the total energy in and out of the reactor. Specify an inlet tream temperature. Gue the exit tream temperature. (c) Given the inlet tream temperature, the adiabatic flame temperature i the unknown exit tream temperature, T out, from the reactor in Equation (10). Ue Goal Seek to find the exit temperature that et the energy balance to zero. (d) Add a button to the workheet that call Goal Seek to calculate the flame temperature, or T out, for different inlet condition. (e) Tet your workheet for different combination of feed temperature, and flow rate of methane and air. Show all your work. Print the reult for the following three cae of inlet temperature and feed ratio of air to methane. What do you oberve? Cae Tin/C F air /F CH4 1 30 5 2 40 10 3 50 15

PRACTICE PROBLEMS 11 Table 1: Standard heat of formation (kj/mol) at 25C and heat capacity coefficient 97 for methane combution in air (kj/molc) for calculating enthalpy in Equation (12). 98 Specie H r a 10 2 b 10 5 c 10 9 d 10 12 CH 4-74.85 3.431 5.469 3.661-11 O 2 0 2.91 1.158-6.076 1.311 CO 2-393.5 3.611 4.233-28.87 7.464 H 2 O -241.83 3.346 0.688 7.604-3.593 N 2 0 2.9 0.2199 5.723-2.871 Anwer: 1799C, 2007C, 1478C 17. Create VBA uer function for denity and vicoity of ethanol. Ue your VBA function to plot the Reynold number (Re) veru temperature (T) over a range of 0<T<50C, given a diameter D=0.75 m and fluid velocity of v=0.15 m/. Note that T ha unit of degree K in the denity and vicoity function. Label the axe on the plot. Denity 0.232 T 3 ln 0.489 1.29 1 1 kg m 514 782 Pa T Vicoity exp 7.88 3.04lnT Reynold Number (Re) Re 18. Refer to the following equation Dv 2 x 1 0 x 0.5 yx expxinx 0.5 x 1 Create a VBA uer function for y in term of x. Ue your VBA uer function to generate an x-y line plot with marker for the range 0 x 1. Ue x increment of 0.1. Format the plot with x and y-axi label. Generate an x-y plot for the range 0 x 1. 19. Engineer ue tatitical quantitie to decribe experimental reult, uch a mean and tandard deviation. To remove experimental bia in our reult, we randomize the order of experiment. We may obtain a random permutation of number by blindly picking number from hat. Alternatively, we may ue Excel to generate a random permutation. a. Fill a column of 10 cell with integer 1 through 10. b. Select the cell on a workheet adjacent to the firt number from the previou tep and add the workheet formula = Rand() c. Select the cell and fill down 10 row. d. Select the range of cell containing the integer and random number and ort according to the econd column Data>Sort>Cutom Sort. 97 Note, the c p polynomial require temperature in degree C. 98 Felder, R. and R. Rouou, Elementary Principle of Chemical Procee, 3 rd ed. Wiley, New York, p. 635 (2005).

12 PRACTICAL NUMERICAL METHODS Create a VBA ub procedure to generate a random permutation of number on a workheet. a. Open the VBE and inert a module. Inert a Sub procedure and give it a decriptive name, e.g., PERMUTATE. b. Ue an Input Box to prompt the uer to elect a range of cell on the workheet for the random permutation of number. For example, Set p = Application.Inputbox(Prompt:= Select permutation range, _ Type:= 8) c. Aign the ize of the range p to the variable n uing the object modifier n = p.count. d. Create a one-dimenional array named x with ize n. ReDim x(1 to n) e. Ue a For Next loop to fill x with number 1 to n. f. Shuffle the integer in x: Loop through the array tarting from the lat poition For i = n To 2 Step -1 r = Int((i) * Rnd()) + 1 generate a random integer between 1 and i = x(r) Save the number in poition r x(r) = x(i) Replace number in poition r with number in poition i x(i) = Replace the number in poition i with the aved number Next i Ue a For Next loop to fill the range p with the huffled value. Tet your macro. 20. Create a VBA uer defined function of the vapor preure equation of methanol. Tet your function in an Excel workheet to calculate P when T = 300 K: B E P expa ClnT DT T where P and T have unit of Pa and K, repectively, and where A=82.718, B = -6904.5, C = -8.8622, D = 7.4664x10-6, E = 2. Anwer: 18.526 kpa