1st Edition

Numerical Methods for Chemical Engineers Using Excel, VBA, and MATLAB

By Victor J. Law Copyright 2013
    247 Pages 150 B/W Illustrations
    by CRC Press

    While teaching the Numerical Methods for Engineers course over the last 15 years, the author found a need for a new textbook, one that was less elementary, provided applications and problems better suited for chemical engineers, and contained instruction in Visual Basic® for Applications (VBA). This led to six years of developing teaching notes that have been enhanced to create the current textbook, Numerical Methods for Chemical Engineers Using Excel®, VBA, and MATLAB®.

    Focusing on Excel gives the advantage of it being generally available, since it is present on every computer—PC and Mac—that has Microsoft Office installed. The VBA programming environment comes with Excel and greatly enhances the capabilities of Excel spreadsheets. While there is no perfect programming system, teaching this combination offers knowledge in a widely available program that is commonly used (Excel) as well as a popular academic software package (MATLAB). Chapters cover nonlinear equations, Visual Basic, linear algebra, ordinary differential equations, regression analysis, partial differential equations, and mathematical programming methods.

    Each chapter contains examples that show in detail how a particular numerical method or programming methodology can be implemented in Excel and/or VBA (or MATLAB in chapter 10). Most of the examples and problems presented in the text are related to chemical and biomolecular engineering and cover a broad range of application areas including thermodynamics, fluid flow, heat transfer, mass transfer, reaction kinetics, reactor design, process design, and process control. The chapters feature "Did You Know" boxes, used to remind readers of Excel features. They also contain end-of-chapter exercises, with solutions provided.

    Roots of a Single Nonlinear Equation
    Algorithms for Solving f(x) = 0
    Using Excel to Solve Nonlinear Equations (Goal Seek)
    A Note on In-Cell Iteration References

    Visual Basic® for Applications Programming
    Algorithm Design
    VBA Coding
    Example VBA Project
    Getting Help and Documentation on VBA
    VBA Statements and Features
    Objects and OOP
    Built-In Functions of VBA
    Program Control
    VBA Data Types
    Subs and Functions
    Input and Output
    Array Data Structures
    Alternative I/O Methods
    Using Debugger

    Linear Algebra and Systems of Linear Equations
    Vector Operations
    Matrix Operations
    Solving Systems of Linear Algebraic Equations
    Linear Equations and Vector/Matrix Operations in Excel®
    More About Matrix.xla
    SVD and Pseudo-Inverse of a Matrix

    Numerical Differentiation and Integration
    Numerical Differentiation
    Numerical Integration
    Curve Fitting for Integration

    Ordinary Differential Equations (Initial Value Problems)
    Euler-Type Methods
    RK Methods
    Stiff ODEs
    Solving Systems of ODE-IVPs
    Higher-Order ODEs

    Ordinary Differential Equations (Boundary Value Problems)
    Shooting Method
    Split BVPs Using Finite Differences
    More Complex Boundary Conditions with ODE-BVPs

    Regression Analysis and Parameter Estimation
    General Method of Least Squares
    Linear Regression Analysis
    How Good Is the Fit from a Statistical Perspective?
    Regression Using Excel’s Regression Add-In
    Numerical Differentiation and Integration Revisited

    Partial Differential Equations
    Parabolic PDEs
    Thomas Algorithm for Tridiagonal Systems
    Method of Lines
    Successive Overrelaxation for Elliptic PDEs

    Linear Programming, Nonlinear Programming, Nonlinear Equations, and Nonlinear Regression Using Solver
    Linear Programming
    Nonlinear Programming
    Nonlinear Equations
    Nonlinear Regression Analysis

    Introduction to MATLAB®
    MATLAB® Basics
    MATLAB® Programming Language Statements
    MATLAB® Function Arguments
    Plotting in MATLAB®
    Example MATLAB® Programs
    Closing Comment Regarding MATLAB®

    Appendix A: Additional Features of VBA



    Victor J. Law, Ph.D., FAIChE, FIChemE, CE, initiated a program that was to become the Department of Computer Science at Tulane. During his tenure in computer science, he wrote two textbooks on introductory computer programming. In 1988, Dr. Law returned to the Chemical Engineering Department in order to resume his research career. He has taught classes in process control, transport phenomena, process design, engineering statistics, and numerical methods for chemical engineers. His research has included projects in coastal erosion, methane emissions from rice paddies, thermochemical processes for hydrogen production from water, and butanol production from biomass. Dr. Law is a Fellow of the American Institute of Chemical Engineers; a Fellow of the Institution of Chemical Engineers; a Chartered Engineer in the United Kingdom and Europe; and a Registered Professional Engineer, State of Louisiana.