Category: Problem Solving in Chemical

  • Vapor Pressure Correlation by Clapeyron and Antoine Equations

    Concepts Demonstrated

    Use of the Clapeyron and Antoine equations for vapor pressure correlation and estimation of latent heat of vaporization from the Clapeyron equation.

    Numerical Methods Utilized

    Linear regressions after proper transformations to a linear expression.

    Problem Statement

    The Clapeyron equation is commonly used to correlate vapor pressure (Pv) with absolute temperature (T) in °C where ΔHv is the latent heat of vaporization.

    Equation 2-25. 

    Another common vapor pressure correlation is the Antoine equation, which utilizes three parameters AB, and C, with Pv typically in mm Hg and T in °C.

    Equation 2-26. 

    A particular chemical is to be liquefied and stored in gas cylinders in an outside storage shed. The following data were obtained in the laboratory bomb calorimeter measurements. In this calorimeter, the liquid was slowly heated in a sealed container while the temperature and pressure of Table 2-8 were recorded.

    Table 2-8. Vapor Pressure Data

    T (°C)17181921252728
    P(mm Hg)13.622.2135.5485.98413.23832.621160.23
    1. Determine the heat vaporization and the constant B using the Clapeyron equation.
    2. Assuming the yearly low and hot temperatures in the storage shed are 10°F and 120°F, calculate the expected vapor pressures at these temperature extremes.
    3. How do your answers to (b) change when you use the Antoine correlation given by Equation (2-26)?
    4. What do you think about storing the cylinders outside?

    Solution (Partial)

    Finding the heat of vaporization and B in Equation (2-25) requires fitting a straight line to the experimental data. This is accomplished by the regression of log(Pv) versus 1/T, where T is the absolute temperature. This is explained in more detail in Problem 2.5. After the parameters of the regression have been determined, the values of ΔHv and B can be calculated.

    The Antoine equation must first be linearized. This is accomplished by multiplication of both sides of Equation (2-26) by T + C, yielding

    Equation 2-27. 

    Equation (2-27) can be rearranged:

    Equation 2-28. 

    Evaluation of the parameters of Equation (2-27) can be accomplished by defining one new dependent and two new independent variables (columns) given by

    Linear regression with Trec and logPonT as independent and logP as dependent variables will yield the desired parameters.

    The linearization of the Antoine equation, in the form of Equation (2-28), is somewhat problematic, in a statistical sense, since the original dependent variable Pv appears in both sides of the equation. However, this linearization usually yields acceptable results. Nonlinear regression will be used in Problem 3.1 to calculate the Antoine equation parameters, and this is the preferred approach in a statistical sense.

    Once the constants of the Clapeyron and Antoine equations have been found, the equations can be used to calculate the vapor pressure at different temperatures.

    Gas Volume Calculations using Various Equations of State

    Concepts Demonstrated

    Gas volume calculations using the ideal gas, van der Waals, Soave-Redlich-Kwong, Peng-Robinson, and Beattie-Bridgeman equations of state.

    Numerical Methods Utilized

    Solution of a single nonlinear algebraic equation.

    Problem Statement

    It is proposed to use a steel tank to store carbon dioxide at 300 K. The tank is 2.5 m3 in volume, and the maximum pressure it can safely withstand is 100 atm.

  • System of Linear Algebraic Equations

    A system of linear algebraic equations can be represented by the equation:

    Equation 1-2. 

    where A is an n × n matrix of coefficients, x is an n × 1 vector of unknowns and b an n × 1 vector of constants. Note that the number of equations is equal to the number of the unknowns. A detailed description of the various aspects of the solution of systems of linear equations is provided in Problem 2.4 (Steady-State Material Balances on a Separation Train).

    (c) One Nonlinear (Implicit) Algebraic Equation

    A single nonlinear equation can be written in the form

    Equation 1-3. 

    where f is a function and x is the unknown. Additional explicit equations, such as those shown in Section (a), may also be included. Solved problems associated with the solution of one nonlinear equation are presented in Problems 2.1 (Molar Volume and Compressibility Factor from Van Der Waals Equation), 2.9 (Gas Volume Calculations using Various Equations of State), 2.10 (Bubble Point Calculation for an Ideal Binary Mixture), and 2.13 (Adiabatic Flame Temperature in Combustion). These problems should be reviewed before proceeding further. The use of the various software packages for solving single nonlinear equations is demonstrated in solved Problems 4.2 and 5.2 (Calculation of the Flow Rate in a Pipeline). Please study those solved problems as well.

    (d) Multiple Linear and Polynomial Regressions

    Given a set of data of measured (or observed) values of a dependent variable: yi versus n independent variables x1ix2i, … xni, multiple linear regression attempts to find the “best” values of the parameters a0a1, …an for the equation

    Equation 1-4. 

    where ŷi is the calculated value of the dependent variable at point i. The “best” parameters have values that minimize the squares of the errors

    Equation 1-5. 

    where N is the number of available data points.

    In polynomial regression, there is only one independent variable x, and Equation (1-4) becomes

    Equation 1-6. 

    Multiple linear and polynomial regressions using POLYMATH are demonstrated in detail in solved Problems 3.3 (Correlation of Thermodynamic and Physical Properties of n-Propane) and 3.5 (Heat Transfer Correlations from Dimensional Analysis). The use of Excel and MATLAB for the same purpose is demonstrated respectively in Problems 4.4 and 5.4 (Correlation of the Physical Properties of Ethane). These examples should be studied before proceeding further.

    (e) Systems of First-Order Ordinary Differential Equations (ODEs) – Initial Value Problems

    A system of n simultaneous first-order ordinary differential equations can be written in the following (canonical) form

    Equation 1-7. 

    where x is the independent variable and y1y2, … yn are dependent variables. To obtain a unique solution of n simultaneous first-order ODEs, it is necessary to specify n values of the dependent variables (or their derivatives) at specific values of the independent variable. If those values are specified at a common point, say x0,

    Equation 1-8. 

    then the problem is categorized as an initial value problem.

    The solution of systems of first-order ODE initial value problems is demonstrated in Problems 2.14 (Unsteady-state Mixing in a Tank) and 2.16 (Heat Exchange in a Series of Tanks) where POLYMATH is used to obtain the solution. The use of Excel and MATLAB for systems of first-order ODEs is demonstrated respectively in Problems 4.3 and 5.3 (Adiabatic Operation of a Tubular Reactor for Cracking of Acetone).

    (f) System of Nonlinear Algebraic Equations (NLEs)

    A system of nonlinear algebraic equations is defined by

    Equation 1-9. 

    where f is an n vector of functions, and x is an n vector of unknowns. Note that the number of equations is equal to the number of the unknowns. Solved problems in the category of NLEs are Problems 8.11 (Flow Distribution in a Pipeline Network) and 6.6 (Expediting the Solution of Systems of Nonlinear Algebraic Equations). More advanced treatment of systems of nonlinear equations (obtained when solving a constrained minimization problem), is demonstrated along with the use of various software packages in Problems 4.5 and 5.5 (Complex Chemical Equilibrium by Gibbs Energy Minimization).

  • Manual Problem Solving

    The problem solving tools on the desktop that were used by engineers prior to the introduction of the handheld calculators (i.e., before 1970) are shown in Figure 1-1. Most calculations were carried out using the slide rule. This required carrying out each arithmetic operation separately and writing down the results of such operations. The highest precision of such calculations was to three decimal digits at most. If a calculational error was detected, then all the slide rule and arithmetic calculations had to be repeated from the point where the error occurred. The results of the calculations were typically typed, and hand-drawn graphs were often prepared. Temperature- and/or composition-dependent thermodynamic and physical properties that were needed for problem solving were represented by graphs and nomographs. The values were read from a straight line passed by a ruler between two points. The highest precision of the values obtained using this technique was only two decimal digits. All in all, “manual” problem solving was a tedious, time-consuming, and error-prone process.

    The Engineer’s Problem Solving Tools Prior to 1970

    Figure 1-1. The Engineer’s Problem Solving Tools Prior to 1970

    During the slide rule era, several techniques were developed that enabled solving realistic problems using the tools that were available at that time. Analytical (closed form) solutions to the problems were preferred over numerical solutions. However, in most cases, it was difficult or even impossible to find analytical solutions. In such cases, considerable effort was invested to manipulate the model equations of the problem to bring them into a solvable form. Often model simplifications were employed by neglecting terms of the equations which were considered less important. “Short-cut” solution techniques for some types of problems were also developed where a complex problem was replaced by a simple one that could be solved. Graphical solution techniques, such as the McCabe-Thiele and Ponchon-Savarit methods for distillation column design, were widely used.

    After digital computers became available in the early 1960’s, it became apparent that computers could be used for solving complex engineering problems. One of the first textbooks that addressed the subject of numerical solution of problems in chemical engineering was that by Lapidus.[3] The textbook by Carnahan, Luther and Wilkes[4] on numerical methods and the textbook by Henley and Rosen[5] on material and energy balances contain many example problems for numerical solution and associated mainframe computer programs (written in the FORTRAN programming language). Solution of an engineering problem using digital computers in this era included the following stages: (1) derive the model equations for the problem at hand, (2) find the appropriate numerical method (algorithm) to solve the model, (3) write and debug a computer language program (typically FORTRAN) to solve the problem using the selected algorithm, (4) validate the results and prepare documentation.

    Problem solving using numerical methods with the early digital computers was a very tedious and time-consuming process. It required expertise in numerical methods and programming in order to carry out the 2nd and 3rd stages of the problem-solving process. Thus the computer use was justified for solving only large-scale problems from the 1960’s through the mid 1980’s.

    Mathematical software packages started to appear in the 1980’s after the introduction of the Apple and IBM personal computers. POLYMATH version 1.0, the software package which is extensively used in this book, was first published in 1984 for the IBM personal computer.

    Introduction of mathematical software packages on mainframe and now personal computers has considerably changed the approach to problem solving. Figure 1-2 shows a flow diagram of the problem-solving process using such a package. The user is responsible for the preparation of the mathematical model (a complete set of equations) of the problem. In many cases the user will also need to provide data or correlations of physical properties of the compounds involved. The complete model and data set must be fed into the mathematical software package. It is also the user’s responsibility to categorize the problem type. The problem category will determine the type of numerical algorithm to be used for the solution. This issue will be discussed in detail in the next section.

    Problem Solving with Mathematical Software Packages

    Figure 1-2. Problem Solving with Mathematical Software Packages

    The mathematical software package will then solve the problem using the selected numerical technique. The results obtained together with the model definition can serve as partial or complete documentation of the problem and its solution.

    Categorizing Problems According to the Solution Technique Used

    Mathematical software packages contain various tools for problem solving. In order to match the tool to the problem in hand, you should be able to categorize the problem according to the numerical method that should be used for its solution. The discussion in this section details the various categories for which representative examples are included in the book. Note that the study of the following categories (a) through (e) is highly recommended prior to using Chapters 7 through 14 of this book that are associated with particular subject areas. Categories (f) through (n) are advanced topics that should be reviewed prior to advanced problem solving.

     

  • Problem Solving with Mathematical Software Packages

    As an engineering student or professional, you are almost always involved in numerical problem solving on a personal computer. The objective of this book is to enable you to solve numerical problems that you may encounter in your student or professional career in a most effective and efficient manner. The tools that are typically used for engineering or technical problem solving are mathematical software packages that execute on personal computers on the desktop. In order to solve your problems most efficiently and accurately, you must be able to select the appropriate software package for the particular problem at hand. Then you must also be proficient in using your selected software tool.

    In order to help you achieve these objectives, this book provides a wide variety of problems from different areas of chemical, biochemical, and related engineering and scientific disciplines. For some of these problems, the complete solution process is demonstrated. For some problems, partial solutions or hints for the solution are provided. Other problems are left as exercises for you to solve.

    Most of the chapters of the book are organized by chemical and biochemical engineering subject areas. The various chapters contain between five and twenty-eight problems that represent many of the problem types that require a computer solution in a particular subject area. All problems presented in the book have the same general format for your convenience. The concise problem topic is first followed by a listing of the engineering or scientific concepts demonstrated by the problem. Then the numerical methods utilized in the solution are indicated just before the detailed problem statement is presented. Typically a particular problem presents all of the detailed equations that are necessary for solution, including the appropriate units in a variety of systems, with Système International d’Unités (SI) being the most commonly used. Physical properties are either given directly in the problem or in the appendices. Complete and partial solutions are provided to many of the problems. These solutions will help you learn to formulate and then to solve the unsolved problems in the book as well as the problems that you will face in your student and/or professional career.

    Three widely used mathematical software packages are used in this book for solving the various problems: POLYMATH,[*] Excel,[†] and MATLAB.[‡] Each of these packages has specific advantages that make it the most appropriate for solving a particular problem. In some cases, a combined use of several packages is most desirable. These mathematical software packages that solve the problems utilize what are called “numerical methods.” This book presents the fundamental and practical approaches to setting up problems that can then be solved by mathematical software that utilizes numerical methods. It also gives much practical information for problem solving. The details of the numerical methods are beyond the scope of this book, and reference can be made to textbook by Constantinides and Mostoufi.[1] More advanced and extensive treatment of numerical methods can be found in the book of Press et al.[2]

    The first step in solving a problem using mathematical software is to prepare a mathematical model of the problem. It is assumed that you have already learned (or you will learn) how to prepare the model of a problem from in particular subject area (such as thermodynamics, fluid mechanics, or biochemical engineering). A general approach advocated in this book is to start with a very simple model and then to make the model more complex as necessary to describe the problem. Engineering and scientific fundamentals are important in model building. The first step in the solution process is to characterize the problem according to the type of the mathematical model that is formulated: a system of algebraic equations or a system of ordinary differential equations, for example. When the problem is characterized in these terms, the software package that efficiently solves this type of problems can be utilized. Most of the later part of this chapter is devoted to learning how to characterize a problem in such mathematical terms.

    In order to put the use of mathematical software packages for problem solving into proper perspective, it is important and interesting to review the history in which manual problem solving has been replaced by numerical problem solving.