This page intentionally left blank Numerical Methods for Chemical Engineering Suitableforafirst-yeargraduatecourse,thistextbookunitestheapplicationsofnumerical mathematicsandscientificcomputingtothepracticeofchemicalengineering.Writtenin apedagogicstyle,thebookdescribesbasiclinearandnonlinearalgebraicsystemsallthe way through to stochastic methods, Bayesian statistics, and parameter estimation. These subjectsaredevelopedatanominalleveloftheoreticalmathematicssuitableforgraduate engineers. The implementation of numerical methods in M® is integrated within eachchapterandnumerousexamplesinchemicalengineeringareprovided,togetherwitha libraryofcorrespondingM programs.Althoughtheapplicationsfocusonchemical engineering,thetreatmentofthetopicsshouldalsobeofinteresttonon-chemicalengineers andotherappliedscientiststhatworkwithscientificcomputing.Thisbookwillprovidethe graduatestudentwiththeessentialtoolsrequiredbyindustryandresearchalike. Supplementary material includes solutions to homework problems set in the text, M programs and tutorial, lecture slides, and complicated derivations for the more advancedreader.Theseareavailableonlineatwww.cambridge.org/9780521859714. K JB hasbeenAssistantProfessoratMITsince2000.Hehastaughtexten- sivelyacrosstheengineeringdisciplineatboththeundergraduateandgraduatelevel.This bookisaresultofthesuccessfulcoursetheauthordevisedatMITfornumericalmethods appliedtochemicalengineering. Numerical Methods for Chemical Engineering Applications in M ® ATLAB KENNETH J. BEERS MassachusettsInstituteofTechnology cambridge university press Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo Cambridge University Press The Edinburgh Building, Cambridge cb2 2ru, UK Published in the United States of America by Cambridge University Press, New York www.cambridge.org Information on this title: www.cambridge.org/9780521859714 ©K.J.Beers2007 This publication is in copyright. Subject to statutory exception and to the provision of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published in print format 2006 isbn-13 978-0-511-25650-9eBook (EBL) isbn-10 0-511-25650-7 eBook (EBL) isbn-13 978-0-521-85971-4hardback isbn-10 0-521-85971-9 hardback Cambridge University Press has no responsibility for the persistence or accuracy of urls for external or third-party internet websites referred to in this publication, and does not guarantee that any content on such websites is, or will remain, accurate or appropriate. Contents Preface pageix 1 Linearalgebra 1 Linearsystemsofalgebraicequations 1 Reviewofscalar,vector,andmatrixoperations 3 Eliminationmethodsforsolvinglinearsystems 10 Existenceanduniquenessofsolutions 23 Thedeterminant 32 Matrixinversion 36 Matrixfactorization 38 Matrixnormandrank 44 Submatricesandmatrixpartitions 44 Example.Modelingaseparationsystem 45 Sparseandbandedmatrices 46 MATLABsummary 56 Problems 57 2 Nonlinearalgebraicsystems 61 Existenceanduniquenessofsolutionstoanonlinearalgebraicequation 61 IterativemethodsandtheuseofTaylorseries 62 Newton’smethodforasingleequation 63 Thesecantmethod 69 Bracketingandbisectionmethods 70 Findingcomplexsolutions 70 Systemsofmultiplenonlinearalgebraicequations 71 Newton’smethodformultiplenonlinearequations 72 EstimatingtheJacobianandquasi-Newtonmethods 77 Robustreduced-stepNewtonmethod 79 Thetrust-regionNewtonmethod 81 SolvingnonlinearalgebraicsystemsinMATLAB 83 Example.1-Dlaminarflowofashear-thinningpolymermelt 85 Homotopy 88 Example.Steady-statemodelingofacondensation polymerizationreactor 89 v vi Contents Bifurcationanalysis 94 MATLABsummary 98 Problems 99 3 Matrixeigenvalueanalysis 104 Orthogonalmatrices 104 Aspecificexampleofanorthogonalmatrix 105 Eigenvaluesandeigenvectorsdefined 106 Eigenvalues/eigenvectorsofa2×2realmatrix 107 Multiplicityandformulasforthetraceanddeterminant 109 Eigenvaluesandtheexistence/uniquenesspropertiesoflinear systems 110 Estimatingeigenvalues;Gershgorin’stheorem 111 ApplyingGershgorin’stheoremtostudytheconvergenceofiterative linearsolvers 114 Eigenvectormatrixdecompositionandbasissets 117 NumericalcalculationofeigenvaluesandeigenvectorsinMATLAB 123 Computingextremaleigenvalues 126 TheQRmethodforcomputingalleigenvalues 129 Normalmodeanalysis 134 Relaxingtheassumptionofequalmasses 136 Eigenvalueproblemsinquantummechanics 137 SinglevaluedecompositionSVD 141 Computingtherootsofapolynomial 148 MATLABsummary 149 Problems 149 4 Initialvalueproblems 154 Initialvalueproblemsofordinarydifferentialequations (ODE-IVPs) 155 Polynomialinterpolation 156 Newton–Cotesintegration 162 Gaussianquadrature 163 Multidimensionalintegrals 167 LinearODEsystemsanddynamicstability 169 OverviewofODE-IVPsolversinMATLAB 176 Accuracyandstabilityofsingle-stepmethods 185 StiffstabilityofBDFmethods 192 Symplecticmethodsforclassicalmechanics 194 Differential-algebraicequation(DAE)systems 195 Parametriccontinuation 203 MATLABsummary 207 Problems 208 Contents vii 5 Numericaloptimization 212 Localmethodsforunconstrainedoptimizationproblems 212 Thesimplexmethod 213 Gradientmethods 213 Newtonlinesearchmethods 223 Trust-regionNewtonmethod 225 Newtonmethodsforlargeproblems 227 UnconstrainedminimizerfminuncinMATLAB 228 Example.Fittingakineticratelawtotime-dependentdata 230 Lagrangianmethodsforconstrainedoptimization 231 ConstrainedminimizerfminconinMATLAB 242 Optimalcontrol 246 MATLABsummary 252 Problems 252 6 Boundaryvalueproblems 258 BVPsfromconservationprinciples 258 Real-spacevs.function-spaceBVPmethods 260 Thefinitedifferencemethodappliedtoa2-DBVP 260 Extendingthefinitedifferencemethod 264 Chemicalreactionanddiffusioninasphericalcatalystpellet 265 Finitedifferencesforaconvection/diffusionequation 270 Modelingatubularchemicalreactorwithdispersion;treating multiplefields 279 NumericalissuesfordiscretizedPDEswithmorethantwo spatialdimensions 282 TheMATLAB1-Dparabolicandellipticsolverpdepe 294 Finitedifferencesincomplexgeometries 294 Thefinitevolumemethod 297 Thefiniteelementmethod(FEM) 299 FEMinMATLAB 309 FurtherstudyinthenumericalsolutionofBVPs 311 MATLABsummary 311 Problems 312 7 Probabilitytheoryandstochasticsimulation 317 Thetheoryofprobability 317 Importantprobabilitydistributions 325 Randomvectorsandmultivariatedistributions 336 Browniandynamicsandstochasticdifferentialequations (SDEs) 338 Markovchainsandprocesses;MonteCarlomethods 353 Geneticprogramming 362 viii Contents MATLABsummary 364 Problems 365 8 Bayesianstatisticsandparameterestimation 372 Generalproblemformulation 372 Example.Fittingkineticparametersofachemicalreaction 373 Single-responselinearregression 377 Linearleast-squaresregression 378 TheBayesianviewofstatisticalinference 381 Theleast-squaresmethodreconsidered 388 Selectingapriorforsingle-responsedata 389 Confidenceintervalsfromtheapproximateposteriordensity 395 MCMCtechniquesinBayesiananalysis 403 MCMCcomputationofposteriorpredictions 404 Applyingeigenvalueanalysistoexperimentaldesign 412 Bayesianmultiresponseregression 414 Analysisofcompositedatasets 421 Bayesiantestingandmodelcriticism 426 Furtherreading 431 MATLABsummary 431 Problems 432 9 Fourieranalysis 436 Fourierseriesandtransformsinonedimension 436 1-DFouriertransformsinMATLAB 445 Convolutionandcorrelation 447 Fouriertransformsinmultipledimensions 450 Scatteringtheory 452 MATLABsummary 459 Problems 459 References 461 Index 464
Description: