You are on page 1of 3

ChE212 Stoichiometry LabSolving Implicit Equations & Optimization roblems !

ith E"cel #e$erence% &ott$rie'( )*S*( +Sprea'sheet ,ools $or Engineers E"cel 2--.ersion/(pp*10--2--( pp*121-134(5c&ra!-6ill( 2--Solving Trial & Error & Optimization Problems with Excel ,he solution to some stoichiometry problems involves trial an' error analysis* ,hese problems may involve solving an implicit equation !ith one un7no!n variable* 8or e"ample( given the values o$ absolute pressure9 :( the i'eal gas constant 9 # :(the absolute temperature 9,: an' the values o$ the t!o constants a & b 'etermine the value o$ the speci$ic volume o$ a real gas $rom the $ollo!ing .an 'er ;aals< mo'el% a a 9 P + 2 :9V b: = RT or F 9V : = 9 P + 2 :9V b: RT = -*V V 8urthermore( the .an 'er ;aals< constants +a/ an' +b/ may be appro"imate' $rom 7no!le'ge o$ the critical temperature 9,c:an' pressure 9 c: o$ the gas $rom the $ollo!ing relations%
2> R 2T 2 c =2 P c RT c b= 4P c a=

Any problem like this may be transformed into the following problem 8in' the value o$ the root ? so that 89?:@-*-* Such problems are usually solve' by an iterative proce'ure that starts !ith an initial guess an' then using that value an' succee'ing values to converge to the solution* It must be note' that such a problem may have no real solution or more than one real solution 9multiple roots:* 8or e"ample the .an 'er ;aals mo'el may be trans$orme' into the cubic G 9V : = 9 PV 2 + a :9V b: V 2 RT = -*- * ,his equation has three91: roots* ,he root( to !hich one converges( is usually the one closest to the initial guess* !oal Seek ,o use the !oal Seek $eature one must initially speci$y a $ormula $or 89?: in an E"cel cell 9target cell: an' the value o$ ? in another cell* One ne"t accesses the E"cel &oal See7 $eature $rom the ,ools 5enu* ,he &oal See7 'ialog bo" !ill appear an' you must enter the $ollo!ing in$ormation% a:,he a''ress o$ the E"cel cell 9target cell: that contains the $ormula $or 89?:( b:,he value +-/ in the ,o value entry location( an' c:A''ress o$ the cell 9target cell: containing the initial value in the entry location )y changing cell* ,hen select OB* &oal See7 !ill then converge to the root( i$ it e"ists( that is closest to the initial guess* Experiment with the "se of !oal Seek by solving the following problem % 8in' the speci$ic volume 9. litersCmole: $or CO2 $or the $ollo!ing con'itions% ,c@1-2oB c@>2*4 atm #@-*-42-32 liter atmCmoleCoB @2- & 1-- atmospheres , @ 3-- oB

8irst tabulate 89.: vs .( plot 89.: vs . $or both 2- an' 1-- atmospheres an' 'etermine !here 89.: is appro"imately -*-* De"t use &oal See7 to $in' a more precise value o$ the speci$ic volume o$ the real gas $rom .an 'er ;aals equation* #se of Excel Solver for $ore %omplex Problems E"cel also has a much more po!er$ul $eature that may be use' to solve more comple" problems( e*g*( 8in' ?( E & F such that 89?(E(F:@&9?(E(F:@69?(E(F:@-G!here all three equations are nonlinear* ,his system involves the intersection o$ three91: curve' sur$aces in 1-H space* Again multiple solutions are possible* 6o!ever( the E"cel &oal See7 $eature may not be use' to solve such a system* 8or these problems one simply 'e$ines one o$ $unctions as the obIective $unction an' the other t!o $unctions as constraints an' then have the E"cel +Solver/ $eature search the ?(E(F space so as to meet the obIective $unction an' constraint requirements( i*e*( ObIective 8unction & ObIective% 5inimize Absolute .alue o$ 89?(E(F: SubIect to &9?(E(F:@an' 69?(E(F:@-* ?loJ?J?hi EloJEJEhi FloJ?JFhi E"cel requires that you also speci$y that you !ant to continue the search until 89?(E(F: is close to -* E"cel Solver may also be use' to solve optimization problems !hich involve 'etermining the values o$ the in'epen'ent variables 9?(E & F: that either ma"imize or minimize an obIective $unction 89?(E(F(;: subIect to a set o$ constraints( e*g*( $aximize or $inimize &'()*)+),SubIect to% &9?(E(F(;:KorJor @-*69?(E(F(;:JorKor @-*?loJ?J?hi EloJEJEhi FloJFJFhi ;loJ;J;hi %hecking for Availability of Solver Eou can con$irm that the E"cel Solver is available by clic7ing on E"cel ,ools an' loo7ing $or Solver in the menu that appears* I$ it is not present( you must install Solver by choosing A''-Ins $rom the ,ools menu* De"t select Solver A''-In $rom the resulting 'ialog bo"* Once Solver is installe'( it !ill remain installe' unless you reverse the above proce'ure*

Proced"re for #sing Solver for Optimization Problems 91:Enter values $or each in'epen'ent variable !ithin a bloc7 o$ a'Iacent cells* 92:Lse an E"cel cell an' the cell locations 'e$ine' in 91: to 'e$ine the obIective $unction* 91:Lse a set o$ E"cel cells to enter all o$ system constraints again using the cell locations in 91: to 'e$ine these $unctions 92:Select Solver $rom the ,ools menu 93:Enter the $ollo!ing in$ormation in the Solver arameters 'ialog bo" % a:,he a''ress o$ the obIective $unction in the Set ,arget Cell location b:Select either 5a" ( 5in or +-/ in the area labele' Equal to belo! the ,arget cell location c:Speci$y the range o$ cell a''resses that contain the in'epen'ent variables in the portion o$ the Solver arameters 'ialog bo"* ':Speci$y the cell a''resses $or the constraints( the type o$ constraint 9J@(K@ or @:( & values o$ right-han' si'e* A$ter entering each constraint clic7 on A'' to insert another constraint e:Although it is not necessary you may choose to clic7 on the Options button an' e"periment !ith 'i$$erent tolerance settings( ma"imum number o$ permissible iterations( metho' $or $inite 'i$$erence appro"imation o$ 'erivatives 9central 'i$$erence( reverse or $or!ar' 'i$$erence: an' other options* $:Once a solution is obtaine' ( the optimal values o$ the in'epen'ent variables( the optimal value o$ the obIective $unction an' the value o$ each constraint !ill appear !ithin their cells* #se of Solver to .etermine Antoine %onstants for ,ater #esolve the .an 'er ;aals speci$ic volume problem you previously solve' !ith &oal See7 !ith the E"cel Solver*
M Hetermine the values o$ the three Antoine constants A( ) & C 9 log1- p = A

!ater vapor pressure bet!een 1- an' >-oC* Lse the 'ata 9pv9mm 6g: vs ,9oC:: $rom ,able )*1 in 8el'er & #ousseau* Accomplish this !ith E"cel minimizing the $ollo!ing obIective $unction%
p M pv 2 9 p : M1-= v

B : $or T +C

91-= is a scaling $actor that ten's to improve the per$ormance o$ E"cel Solver Optimizer: Compare your ans!ers $or A( ) & C !ith the values in ,able )*2* #epeat this mo'eling process $or !ater bet!een >- an' 1--oC* lot your results- pM & pv vs , $or both temperature ranges*

You might also like