You are on page 1of 23

Numerical Methods for Chemical Engineers

CHAPTER 1: INTRODUCTION TO NUMERICAL METHODS


1.1 Numerical Methods & Computer NM: technique by which mathematical problems are formulated so that they can be solved with arithmetic operations. Thus, by using computer & NM has significant influence on engineering problem-solving process.

Dr Mariani Idroas

SKF 2133

Numerical Methods for Chemical Engineers 1.2 Advantages and Disadvantages of NM Engineers approached to solve problems during pre-computer era: a. Using analytical or exact methods only for a simple linear models or simple geometry and low dimensionality. b. Graphical solutions to solve complex problems but the results are not precise & can be described using three or less dimensions. c. Calculators approaches to implement NM manually. Although perfectly adequate for solving complex problems, manual calculations are slow, tedious & consistent results are elusive.

Dr Mariani Idroas

SKF 2133

Numerical Methods for Chemical Engineers Nowadays, computer & NM provide an alternative for complicated calculations. Since late 1940s digital computers has lead in the use & development of NMs. There are several advantages of study NMs: a. Powerful-solving tools capable of handling large systems of equations, nonlinearities,and complicated geometries that uncommon in engineering practice & impossible to solve analytically. b. An efficient vehicle for learning to use computers an efficient way to learn programming as NMs are the important part for implementation on computers. c. Reinforce understanding of mathematics function of NM is to reduce high mathematics to basic arithematic operations.
Dr Mariani Idroas SKF 2133 3

Numerical Methods for Chemical Engineers 1.3 Mathematical Modeling A mathematical model can be defined as a formulation or equation that express a physical system or process in mathematical terms. Example 1.1: Very general functional relationship Dependent = f ( independent variables, parameter, variable forcing functions) ---------- Eq. (1) where: dependent variable = behavior or state of the system Independent variable = usually dimensions such as time & space Parameter = system properties or composition Forcing function = external influence Equation (1) can be ranged from a simple algebraic relationship to large complicated sets of differential equations.

Dr Mariani Idroas

SKF 2133

Numerical Methods for Chemical Engineers Example 1.2 : Very simple case. F = ma ------ Eq. (2) (Newton 2nd law of motion) F = net force acting on body (N, kg.m/s2) m = mass of object (kg), a = acceleration (m/s2) Dividing both sides of Eq. (2) by m to give: a = F/m --------- Eq. (3) where, a = dependent variable (or systems behavior) F = forcing function m = parameter (or property of system) No independent variable because we are not yet predicting how acceleration varies in time or space.

Dr Mariani Idroas

SKF 2133

Numerical Methods for Chemical Engineers Equation (3) has characteristics of typical mathematical models: a. Describes a physical system or process in mathematical terms. b. Represents an idealization & simplification of reality by ignores details of natural process & focuses on essential matters. c. Yields reproducible results can be used for predictive purposes. For e.g. if the force on an object and the mass of an object are known, Eq. (1.3) can be used to compute acceleration.

Dr Mariani Idroas

SKF 2133

Numerical Methods for Chemical Engineers Example 1.3: For complex case of falling body (parachutist) Newtons 2nd law can be used to determine terminal velocity of a free-falling body near earths surface. We expressing acceleration as the time rate of change of velocity (dv/dt) & substituting into equation (3) to yield: dv/dt = F/m --------- Eq. (4) Rearrange from equation (4); m dv/dt = F where, v = velocity (m/s) F = net force acting on the body F +ve ------ object will accelerate F ve ------ object will decelerate F = 0 ------ object velocity remain at a constant Now we will express net force in terms of measurable variables & parameters. For a falling object, force is composed of 2 opposing forces; F = FD + FU ---------- Eq. (5)
Dr Mariani Idroas SKF 2133 7

Numerical Methods for Chemical Engineers where; FD = downward force pull of gravity FU = upward force of air resistance If FD is assigned a +ve sign, the 2nd law can be used to formulate the force due to gravity, as; FD = mg -------- Eq. (6) where; g = gravitational constant (9.8 m/s2) Air resistance can be assumed as an upward direction, thus, FU = -cv -------- Eq. (7) where; c = drag coefficient (kg/s) Net force is the difference between FD and FU Therefore, Eq. (6) and Eq. (7) can be combined to yield; dv/dt = (mg cv)/m -------- Eq. (8) simplifying the right side, dv/dt = g (c/m)v -------- Eq. (9) Equation (9) is a model that relates the acceleration of a falling object to the force acting on it. Dr Mariani Idroas SKF 2133 8

Numerical Methods for Chemical Engineers Equations (9) is a differential equation because terms of dv/dt acts as variable that we are interested in predicting. However, from equations (3) & (9) the velocity of falling object cannot be obtained using simple algebraic manipulation. More advance techniques such as calculus must be applied to obtain an exact or analytical solution. Calculus can be used to solve equation (9) for; v(t) = gm/c (1-e-(c/m)t) -------- Eq. (10) Note: equation (10) is in general form of equation (1), where; v(t) = dependent variable c and m = parameters g = forcing function

Dr Mariani Idroas

SKF 2133

Numerical Methods for Chemical Engineers Equation (10) is called an analytical or exact solution because it exactly satisfies the original differential equation. Unfortunately, there are many mathematical models that cannot be solved exactly. In many cases, the only alternative is to develop a numerical solution that approximates the exact solution. As stated previously, numerical method are those in which the mathematical problem is reformulated so it can be solved by arithmetic operation

Dr Mariani Idroas

SKF 2133

10

Numerical Methods for Chemical Engineers Example 1.4: Analytical/Exact Solution of Falling Parachutist Problem Problem statement: A parachutist of mass 68.1 kg jumps out of a stationary hot air balloon. Use equation (10) to compute velocity prior to opening the chute. Drag coefficient is equal to 12.5kg/s. Solution: Inserting the parameter into equation (10) v(t) = 9.8(68.1)/12.5 (1-e-(12.5/68.1)t) = 53.39 (1-e-0.18355t) Then can be used to compute; t, (s) v, (m/s) 0 0.00 2 16.40 4 27.77 6 35.64 8 41.10 10 44.87 12 47.49 Infinity 53.39
Dr Mariani Idroas SKF 2133 11

Numerical Methods for Chemical Engineers Thus, according to the model, the parachutist accelerates rapidly (Fig. 1.1). A velocity of 44.87 m/s is attained after 10 s. After sufficient time, a constant velocity, called as terminal velocity of 53.39 m/s is reached. This velocity is constant because the force of gravity is balanced with the air resistance. Thus, net force is zero & acceleration has ceased or stop to increase.

Dr Mariani Idroas

SKF 2133

12

Numerical Methods for Chemical Engineers

Dr Mariani Idroas

SKF 2133

13

Numerical Methods for Chemical Engineers Numerical method approaches to solve mathematical problem. From Newtons 2nd law, the time rate of change of velocity can be approximated by: (Fig. 1.2) dv/dt=v/t = v(ti+1)v(ti)/ti+1ti --eqn(11) where; v and t = differences in velocity and time computed over finite intervals v(ti) = velocity at an initial time ti , and v(ti+1) = velocity at some later time ti+1

Dr Mariani Idroas

SKF 2133

14

Numerical Methods for Chemical Engineers

Dr Mariani Idroas

SKF 2133

15

Numerical Methods for Chemical Engineers Note that dv/dt v/ t is approximate because t is finite. Equation (11) is called a finite divided difference approximation at time ti. Substituted equation (11) into equation (9) to give; v(ti+1) v(ti)/ti+1-ti = g c/m(v)(ti) And rearranged to yield; v(ti+1) = v(ti)+{gc/m(v)(ti)}(ti+1-ti) --- eqn(12) The term in brackets is the right-hand side of the differential is provides a mean to compute the rate of change or slope of v.

Dr Mariani Idroas

SKF 2133

16

Numerical Methods for Chemical Engineers Thus, the differential equation has been transformed into an equation that can be used to determine the velocity algebraically at ti+1 using the slope and previous values of v and t. If you are given an initial value for velocity at some time ti, you can easily compute velocity at a later time ti+1. This new value of velocity at ti+1 can in turn be employed to compute velocity at ti+2 and so on. Thus; New value = old value + (slope)(step size)

Dr Mariani Idroas

SKF 2133

17

Numerical Methods for Chemical Engineers Example 1.5: Numerical Solution to the Falling Parachutist Problem Problem Statement: Perform the same computation as in Example 1.4 but use equation (12) to compute velocity. Employ a step size of 2 for the calculation. Solution: At the start of the computation (ti = 0), the velocity of the parachutist is zero. Using this information & parameter values from Example 1.4, equation (12) can be used to compute velocity at ti+1 = 2s: v= 0 + {9.8 12.5/68.1(0)}(2) = 19.60 m/s For the next interval (from t = 2 to 4 s) the computation is repeated, with the result; v=19.60+{9.812.5/68.1 (19.60)}(2)=32.00 m/s The calculation is continued in a similar fashion to obtain additional values:
Dr Mariani Idroas SKF 2133 18

Numerical Methods for Chemical Engineers t,(s) 0 2 4 6 8 10 12 v,(m/s) 0.00 19.60 32.00 39.85 44.82 47.97 49.96 53.39

Along with the exact solution, the results above are plotted in Fig. 1.3.There are discrepancy between the two results.One way to minimize such differences is to use a smaller step size. With the aid of computer, large number of calculation can be performed easily.Thus, you can model the case without having to solve the differential equation exactly

Dr Mariani Idroas

SKF 2133

19

Numerical Methods for Chemical Engineers

Dr Mariani Idroas

SKF 2133

20

Numerical Methods for Chemical Engineers 1.3.1 Other Complicate Engineering Cases Aside from Newtons 2nd law, there are other major principles in engineering. For example the conservation laws of science & engineering: Change = increases decreases ---- Eq. (13) If change is zero, equation (13) becomes; Change = 0 = increases decreases or Increases = Decreases -------- Eq. (14) Thus, if no change occurs, the increases & decreases must be in balance, which can be called as steady state computation has many applications in engineering.

Dr Mariani Idroas

SKF 2133

21

Numerical Methods for Chemical Engineers Table 1 summarizes some of simple engineering models. Most of chemical engineering applications will focus on mass balance for reactor depends on mass flow in & out. Both the civil & mechanical engineering applications will focus on conservation of momentum. Electrical engineering applications employ both current & energy balance to model electric circuits.

Dr Mariani Idroas

SKF 2133

22

Numerical Methods for Chemical Engineers

Dr Mariani Idroas

SKF 2133

23

You might also like