ebook img

Introduction to chemical engineering computing PDF

352 Pages·2006·6.02 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Introduction to chemical engineering computing

INTRODUCTION TO CHEMICAL ENGINEERING COMPUTING BRUCE A. FINLAYSON, PH.D. University of Washington Seattle, Washington A JOHN WILEY & SONS, INC., PUBLICATION Microsoft product screen shots reprinted with permission from Microsoft Corporation. Microsoft Excel is either registered trademark or trademarks of Microsoft Corporation in the United States and/or other countries. w MATLAB is a trademark of The Math Works, Inc. and is used with permission. The Math Works does not w warrant the accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB software or related products does not constitute endorsement or sponsorship by The Math Works of a w particular pedagogical approach or particular use of the MATLAB software. w FEMLAB is a trademark of COMSOL AB. COMSOL product screen shots reprinted with permission from COMSOL AB. Copyright # 2006 by John Wiley & Sons, Inc. All rights reserved Published by John Wiley & Sons, Inc., Hoboken, New Jersey Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permission. Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages. For general information on our other products and services or for technical support, please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com. Library of Congress Cataloging-in-Publication Data: Finlayson, Bruce A. Introduction to chemical engineering computing / Bruce A. Finlayson. p. cm. Includes index. ISBN-13: 978-0-471-74062-9 (cloth) ISBN-10: 0-471-74062-4 (cloth) 1. Chemical engineering- -Data processing. I. Title. TP184.F56 2005 0 660 .0285- -dc22 2005019351 Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 CONTENTS Preface xiii 1 Introduction 1 Organization, 2 Algebraic Equations, 2 Process Simulation, 2 Differential Equations, 3 Appendices, 4 2 Equations of State 5 Equations of State – Mathematical Formulation, 6 Solving Equations of State Using Excel (single equation in one unknown), 8 Solution Using ‘Goal Seek’, 8 Solution Using Solver, 9 Example of a Chemical Engineering Problem Solved Using ‘Goal Seek’, 9 Solving Equations of State Using MATLAB (single equation in one unknown), 10 Example of a Chemical Engineering Problem Solved Using MATLAB, 12 Another Example of a Chemical Engineering Problem Solved Using MATLAB, 13 Equations of State with Aspen Plus, 16 Example, 16 Specific Volume of a Mixture, 18 Chapter Summary, 22 Problems, 22 3 Vapor–Liquid Equilibrium 25 Flash and Phase Separation, 25 v vi CONTENTS Isothermal Flash – Development of Equations, 26 Example Using Excel, 28 Thermodynamic Parameters, 29 Example Using MATLAB, 30 Example Using Aspen Plus, 31 Nonideal Liquids – Test of Thermodynamic Model, 35 Chapter Summary, 37 Problems, 37 4 Chemical Reaction Equilibrium 41 Chemical Equilibrium Expression, 42 Example of Hydrogen for Fuel Cells, 43 Solution Using Excel, 44 w Solution Using MATLAB , 45 Chemical Equilibria with Two or More Equations, 47 Multiple Equations, Few Unknowns Using MATLAB, 48 Method 1 Using the ‘fsolve’ Command, 48 Method 2 Using the ‘fminsearch’ Function, 49 Variations in MATLAB, 50 Chemical Equilibria Using Aspen Plus, 52 Chapter Summary, 52 Problems, 52 5 Mass Balances With Recycle Streams 55 Mathematical Formulation, 56 Example Without Recycle, 58 Example With Recycle; Comparison of Sequential and Simultaneous Solution Methods, 60 Example of Process Simulation Using Excel for Simple Mass Balances, 62 Example of Process Simulation With Excel Including Chemical Reaction Equilibrium, 63 Example of Process Simulation With Excel Including Phase Equilibrium, 63 Did Iterations Converge?, 66 Extensions, 66 Chapter Summary, 66 Class Exercises, 67 Class Discussion, 67 Problems, 67 6 Simulation of Mass Transfer Equipment 73 Thermodynamics, 74 Example: Multicomponent Distillation With Shortcut Methods, 75 Mathematical Development, 77 Multicomponent Distillation With Rigorous Plate-to-Plate Methods, 80 Example: Packed Bed Absorption, 82 Example: Gas Plant Production Separation, 85 Chapter Summary, 87 CONTENTS vii Class Exercise, 87 Problems (Using Aspen Plus), 87 7 Process Simulation 89 Model Library, 90 Example: Ammonia Process, 91 Utility Costs, 97 Convergence Hints, 100 Optimization, 105 Chapter Summary, 108 Class Exercise, 108 Problems, 108 8 Chemical Reactors 111 Mathematical Formulation of Reactor Problems, 112 Example: Plug Flow Reactor and Batch Reactor, 112 Example: Continuous Stirred Tank Reactor, 114 Using MATLAB to Solve Ordinary Differential Equations, 114 Simple Example, 114 Use of the ‘Global’ Command, 116 Passing Parameters, 117 Example: Isothermal Plug Flow Reactor, 118 Example: Nonisothermal Plug Flow Reactor, 121 Using FEMLAB to Solve Ordinary Differential Equations, 123 Simple Example, 124 Example: Isothermal Plug Flow Reactor, 125 Example: Nonisothermal Plug Flow Reactor, 127 Reactor Problems with Mole Changes and Variable Density, 130 Chemical Reactors with Mass Transfer Limitations, 131 Continuous Stirred Tank Reactors, 134 Solution Using Excel, 135 Solution Using MATLAB, 135 CSTR With Multiple Solutions, 136 Solutions to Multiple Equations Using MATLAB, 136 Transient Continuous Stirred Tank Reactors, 137 Chapter Summary, 141 Problems, 142 9 Transport Processes in One Dimension 147 Applications in Chemical Engineering – Mathematical Formulations, 148 Heat Transfer, 148 Diffusion and Reaction, 148 Fluid Flow, 149 Unsteady Heat Transfer, 151 Example: Heat Transfer in a Slab, 152 Example: Reaction and Diffusion, 154 viii CONTENTS Parametric Solution, 155 Example: Flow of a Newtonian Fluid in a Pipe, 156 Example: Flow of a Non-Newtonian Fluid in a Pipe, 159 Example: Transient Heat Transfer, 162 Example: Linear Adsorption, 164 Example: Chromatography, 167 Chapter Summary, 169 Problems, 169 10 Fluid Flow in Two and Three Dimensions 175 Mathematical Foundation of Fluid Flow, 176 Navier–Stokes Equation, 176 Non-Newtonian Fluid, 177 Example: Entry Flow in a Pipe, 179 Example: Entry Flow of a Non-Newtonian Fluid, 184 Example: Flow in Microfluidic Devices, 186 Example: Turbulent Flow in a Pipe, 189 Example: Start-Up Flow in a Pipe, 191 Example: Flow Through an Orifice, 193 Example: Flow in a Serpentine Mixer, 199 Boundary Conditions, 199 Nondimensionalization, 201 Chapter Summary, 203 Problems, 203 11 Convective Diffusion Equation in Two and Three Dimensions 207 Convective Diffusion Equation, 208 Nondimensional Equations, 209 Boundary Conditions, 209 Example: Heat Transfer in Two Dimensions, 210 Example: Heat Conduction With a Hole, 213 Example: Dispersion in Microfluidic Devices, 214 Effect of Peclet Number, 215 Example: Concentration-Dependent Viscosity, 217 Example: Viscous Dissipation, 218 Example: Chemical Reactor, 221 Example: Wall Reactions, 221 Example: Mixing in a Serpentine Mixer, 222 Chapter Summary, 223 Problems, 224 Appendix A Hints When Using Excel 229 Cell Organization, 229 Cell Contents, 229 Format, 230 Comments, 230 CONTENTS ix Pictures, Equations, Web Links, 231 Select Columns for Charts, Regression, and Printing, 231 Copy Formulas Across and Down the Spreadsheet, 231 Insert Rows and Columns, 231 Split/Freezing, 231 Iteration on, Tolerance, 232 Paste, 232 Plot – xy Scatter, Edit, Multiple Curves, Surface Plots, 233 Arrange Spreadsheet, 235 Import and Export Text Files, One Column at a Time, 236 Import and Export Text Files, Multiple Columns, 236 Export a Text File, 236 Tools, 237 Functions, 237 Matrices, 237 Excel Help, 238 Applications of Excel, 238 w Appendix B Hints When Using MATLAB 239 General Features, 239 Start the Program, 239 Screen Format, 240 Stop/Closing the Program, 240 m-Files, 241 Workspaces and Transfer of Information, 241 ‘Global’ Command, 241 Display Tools, 242 Finding MATLAB Errors, 243 Debug the Program; That is, Find Your Errors, 243 Input/Output, 244 Loops, 245 Conditional Statements, 245 Timing Information, 246 Matrices, 246 Matrix Multiplication, 246 Element-by-Element Calculations, 248 Eigenvalues of a Matrix, 248 Evaluate an Integral, 248 Solve Algebraic Equations Using ‘fsolve’, 248 Solve Algebraic Equations Using ‘fzero’ or ‘fminsearch’ (both in standard MATLAB), 249 Integrating Ordinary Differential Equations that are Initial Value Problems, 249 Checklist for Using ‘ode45’ and Other Integration Packages, 251 Spline Interpolation, 252 Interpolate Data, Evaluate the Polynomial, and Plot the Result, 252 Plotting, 253 x CONTENTS Plotting Results from Integration of Partial Differential Equations Using the Method of Lines, 253 Simple Plots, 253 Add Data to an Existing Plot, 254 Dress Up Your Plot, 254 Multiple Plots, 255 Three-Dimensional Plots, 255 More Complicated Plots, 256 Use Greek Letters and Symbols in the Text, 257 MATLAB Help, 257 Applications of MATLAB, 257 Appendix C Hints When Using Aspen Plus 259 Quick Tour, 259 Start, 259 Setup, 260 Model Library, 260 Place Units on Flowsheet, 261 Connect the Units with Streams, 262 Data Entry, 262 Specify Components, 262 Specify Properties, 262 Specify the Input Streams, 263 Specify Block Parameters, 264 Run the Problem, 264 Scrutinize the Stream Table, 264 Checking Your Results, 265 Transfer the Flowsheet and Mass and Energy Balance to a Word Processing Program, 265 Change Conditions, 266 Prepare Your Report, 266 Save Your Results, 267 Getting Help, 268 Applications of Aspen Plus, 268 Appendix D Hints When Using FEMLAB 269 Basic FEMLAB Techniques, 270 Opening Screens, 270 Equations, 270 Draw, 272 Mesh, 272 Subdomain Settings, 273 Boundary Settings, 273 Solve, 275 Postprocessing, 276 Surface Plots, 276 Contour Plots, 278 CONTENTS xi Cross-Sectional Plots, 278 Boundary Plots, 278 Integrals, 279 Advanced Features, 280 Model Navigator, 280 Internal Boundaries, 281 Expressions, 281 Coupling Variables and Additional Geometries, 282 Applications of FEMLAB, 288 Appendix E Parameter Estimation 293 Mathematical Formulation, 293 Straight Line, 294 Straight Line Curve Fit Using Excel, 294 Plotting the Trendline, 295 Straight Line Curve Fit Using MATLAB, 295 Polynomial Regression, 296 Polynomial Regression Using Excel, 297 Polynomial Regression Using MATLAB, 298 Multiple Regression Using Excel, 298 Nonlinear Regression, 304 Nonlinear Regression Using Excel, 304 Nonlinear Regression Using MATLAB, 305 Appendix F Mathematical Methods 307 Algebraic Equations, 307 Successive Substitution, 308 Newton–Raphson, 308 Ordinary Differential Equations as Initial Value Problems, 310 Euler’s Method, 310 Runge–Kutta Methods, 311 Ordinary Differential Equations as Boundary Value Problems, 312 Finite Difference Method, 312 Finite Element Method, 314 Initial Value Methods, 317 Finite Difference Method in Excel, 317 Partial Differential Equations in Time and One Space Dimension, 317 Partial Differential Equations in Two Space Dimensions, 320 Finite Difference Method for Elliptic Equations, 321 Summary, 322 References 323 Author Index 327 Chemical Index 329 Computer Command Index 331 Subject Index 335

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.