Computational Method in Chemical Engineering (TKK-2109)

Slides:



Advertisements
Similar presentations
Ordinary Differential Equations
Advertisements

Derivation of the third-order
Chapter 6 Differential Equations
Computer Programming (TKK-2144) 13/14 Semester 1 Instructor: Rama Oktavian Office Hr.: M.13-15, W Th , F
ORDINARY DIFFERENTIAL EQUATIONS (ODE)
Ordinary Differential Equations
Mechanical Engineering Majors Authors: Autar Kaw, Charlie Barker
PART 7 Ordinary Differential Equations ODEs
Dr. Jie Zou PHY Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (I) 1 1 Besides the main textbook, also see Ref.: “Applied.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
Mech300 Numerical Methods, Hong Kong University of Science and Technology. 1 Part Seven Ordinary Differential Equations.
Development of Dynamic Models Illustrative Example: A Blending Process
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 32 Ordinary Differential Equations.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
Numerical Solutions of Ordinary Differential Equations
Ordinary Differential Equations S.-Y. Leu Sept. 21, 2005.
Differential Equations and Boundary Value Problems
CISE301_Topic8L1KFUPM1 CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1.
Numerical Solution of Ordinary Differential Equation
8/8/ Euler Method Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker
CSE 330 : Numerical Methods Lecture 17: Solution of Ordinary Differential Equations (a) Euler’s Method (b) Runge-Kutta Method Dr. S. M. Lutful Kabir Visiting.
PART 7 Ordinary Differential Equations ODEs
THEORETICAL MODELS OF CHEMICAL PROCESSES
Computer Programming (TKK-2144) 13/14 Semester 1 Instructor: Rama Oktavian Office Hr.: M.13-15, W Th , F
Lecture 35 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
9/22/ Runge 2 nd Order Method Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Fin500J Topic 6Fall 2010 Olin Business School 1 Fin500J: Mathematical Foundations in Finance Topic 6: Ordinary Differential Equations Philip H. Dybvig.
Ordinary Differential Equations
10/20/ Runge 2 nd Order Method Chemical Engineering Majors Authors: Autar Kaw, Charlie Barker
5/30/ Runge 4 th Order Method Chemical Engineering Majors Authors: Autar Kaw, Charlie Barker
Numerical Methods for Solving ODEs Euler Method. Ordinary Differential Equations  A differential equation is an equation in which includes derivatives.
11/16/ Euler Method Electrical Engineering Majors Authors: Autar Kaw, Charlie Barker
Numerical Solutions of ODE
Ch 1.3: Classification of Differential Equations
Chapter 2 Modeling Approaches  Physical/chemical (fundamental, global) Model structure by theoretical analysis  Material/energy balances  Heat, mass,
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Numerical Analysis – Differential Equation
Suppose we are given a differential equation and initial condition: Then we can approximate the solution to the differential equation by its linearization.
1/16/ Runge 4 th Order Method Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
1/19/ Runge 4 th Order Method Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker
Dr. Mujahed AlDhaifallah ( Term 342)
Today’s class Ordinary Differential Equations Runge-Kutta Methods
2/28/ Runge 4 th Order Method Computer Engineering Majors Authors: Autar Kaw, Charlie Barker
Section 1.1 Basic Definitions and Terminology. DIFFERENTIAL EQUATIONS Definition: A differential equation (DE) is an equation containing the derivatives.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Ordinary Differential Equations (ODEs). Objectives of Topic  Solve Ordinary Differential Equations (ODEs).  Appreciate the importance of numerical methods.
Introduction to Differential Equations
Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
Part 7 - Chapter 25.
Introduction to Differential Equations
Basic Definitions and Terminology
CHAPTER III LAPLACE TRANSFORM
Computer Engineering Majors Authors: Autar Kaw, Charlie Barker
Ordinary Differential Equations
Numerical Solution of Ordinary Differential Equation
525602:Advanced Numerical Methods for ME
Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
Chemical Engineering Majors Authors: Autar Kaw, Charlie Barker
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L4&5.
Part 7 - Chapter 25.
Industrial Engineering Majors Authors: Autar Kaw, Charlie Barker
Numerical Analysis Lecture 37.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L2.
Numerical Analysis Lecture 38.
Numerical solution of first-order ordinary differential equations
Numerical Computation and Optimization
Sec 23: Runge–Kutta Methods
CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L1 KFUPM.
Numerical solution of first-order ordinary differential equations 1. First order Runge-Kutta method (Euler’s method) Let’s start with the Taylor series.
Presentation transcript:

Computational Method in Chemical Engineering (TKK-2109) 14/15 Semester 5 Computational Method in Chemical Engineering (TKK-2109) Instructor: Rama Oktavian Email: rama.oktavian@ub.ac.id Office Hr.: M.13-15, T. 13-15, W. 13-15, F. 13-15

Ordinary Differential Equation An equation relating a dependent variable to one or more independent variables by means of its differential coefficients with respect to the independent variables is called a “differential equation”. Ordinary differential equation -------- only one independent variable involved: x Partial differential equation --------------- more than one independent variable involved: x, y, z, 

Ordinary Differential Equation Ordinary differential equations are classified in terms of order and degree Order of an ordinary differential equation is the same as the highest order derivative The degree of a differential equation is the highest power of the highest order differential coefficient that the equation contains after it has been rationalized.

Ordinary Differential Equation Ordinary differential equations are classified in terms of order and degree 3rd order O.D.E. 1st degree O.D.E. 1st order O.D.E. 2nd degree O.D.E.

Ordinary Differential Equation Linear or non-linear Differential equations are said to be non-linear if any products exist between the dependent variable and its derivatives, or between the derivatives themselves. Product between two derivatives ---- non-linear Product between the dependent variable themselves ---- non-linear

Ordinary Differential Equation Swinging pendulum A second-order nonlinear ODE. Falling parachutist problem

Ordinary Differential Equation Ordinary differential equations are classified in terms of order and degree 3rd order O.D.E. 1st degree O.D.E. 1st order O.D.E. 2nd degree O.D.E.

Ordinary Differential Equation ODE in chemical engineering Illustrative Example: A Blending Process An unsteady-state mass balance for the blending system:

Ordinary Differential Equation ODE in chemical engineering or where w1, w2, and w are mass flow rates. The unsteady-state component balance is: For constant , Eqs. 2-2 and 2-3 become:

Ordinary Differential Equation ODE in chemical engineering Equation 2-13 can be simplified by expanding the accumulation term using the “chain rule” for differentiation of a product: Substitution of (2-14) into (2-13) gives: Substitution of the mass balance in (2-12) for in (2-15) gives:

Ordinary Differential Equation ODE in chemical engineering After canceling common terms and rearranging (2-12) and (2-16), a more convenient model form is obtained:

Ordinary Differential Equation ODE in chemical engineering

Ordinary Differential Equation Numerical method for solving ODE Euler’s method Φ Step size, h x y x0,y0 True value y1, Predicted value Slope Figure 1 Graphical interpretation of the first step of Euler’s method http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Numerical method for solving ODE Euler’s method Φ Step size h True Value yi+1, Predicted value yi x y xi xi+1 Figure 2. General graphical interpretation of Euler’s method http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Numerical method for solving ODE Euler’s method How does one write a first order differential equation in the form of Example is rewritten as In this case http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Example Numerical method for solving ODE Euler’s method The concentration of salt, in a home made soap maker is given as a function of time by At the initial time, t = 0, the salt concentration in the tank is 50g/L. Using Euler’s method and a step size of h = 1.5 min, what is the salt concentration after 3 minutes.

Ordinary Differential Equation Example Numerical method for solving ODE Euler’s method Step 1: is the approximate concentration of salt at

Ordinary Differential Equation Example Numerical method for solving ODE Euler’s method Step 2: is the approximate concentration of salt at

Ordinary Differential Equation Numerical method for solving ODE The exact solution of the ordinary differential equation is given by The solution to this nonlinear equation at t=3 minutes is

Ordinary Differential Equation Numerical method for solving ODE Figure 3. Comparing exact and Euler’s method

Ordinary Differential Equation Numerical method for solving ODE Table 1. Concentration of salt at 3 minutes as a function of step size, h 3 1.5 0.75 0.375 0.1875 −362.50 720.31 284.65 10.718 10.714 373.22 −709.60 −273.93 −0.0024912 0.0010803 3483.0 6622.2 2556.5 0.023249 0.010082 Step

Ordinary Differential Equation Numerical method for solving ODE Figure 4. Comparison of Euler’s method with exact solution for different step sizes

Ordinary Differential Equation Numerical method for solving ODE Runge Kutta 2nd order method Taylor’s expansion http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Numerical method for solving ODE Runge Kutta 2nd order method Taylor’s expansion http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Numerical method for solving ODE Runge Kutta 2nd order method However, it is relatively difficult to find second derivative of ODE For Runge Kutta 2nd order method is given by where http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Numerical method for solving ODE Heun’s method x y xi xi+1 yi+1, predicted yi Here a2=1/2 is chosen resulting in where Figure 1 Runge-Kutta 2nd order method (Heun’s method) http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Midpoint Method Numerical method for solving ODE Here is chosen, giving resulting in where http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Ralston’s Method Numerical method for solving ODE Here is chosen, giving resulting in where http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Example The concentration of salt, in a home made soap maker is given as a function of time by At the initial time, t = 0, the salt concentration in the tank is 50g/L. Using Euler’s method and a step size of h=1.5 min, what is the salt concentration after 3 minutes. http://numericalmethods.eng.usf.edu

Solution Step 1: x1 is the approximate concentration of salt at http://numericalmethods.eng.usf.edu

Solution Step 2: x1 is the approximate concentration of salt at http://numericalmethods.eng.usf.edu

Solution Table 1. Effect of step size for Heun’s method Step size, 3 1.5 0.75 0.375 0.1875 1803.1 3579.6 442.05 11.038 10.718 −1792.4 −3568.9 −431.34 −0.32231 −0.0024979 16727 33306 4025.4 3.0079 0.023311 (exact) http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Numerical method for solving ODE Runge Kutta 4th order method Taylor’s expansion http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Numerical method for solving ODE Runge Kutta 4th order method However, it is relatively difficult to find second and third derivative of ODE For Runge Kutta 4th order method is given by http://numericalmethods.eng.usf.edu

Ordinary Differential Equation Example The concentration of salt, in a home made soap maker is given as a function of time by At the initial time, t = 0, the salt concentration in the tank is 50g/L. Using Euler’s method and a step size of h=1.5 min, what is the salt concentration after 3 minutes. http://numericalmethods.eng.usf.edu

Solution Step 1: http://numericalmethods.eng.usf.edu

Solution is the approximate concentration of salt at http://numericalmethods.eng.usf.edu

Solution Step 2: http://numericalmethods.eng.usf.edu

Solution is the approximate concentration of salt at http://numericalmethods.eng.usf.edu

Solution Table 1 Value of concentration of salt at 3 minutes for different step sizes Step size, 3 1.5 0.75 0.375 0.1875 14120 11455 25.559 10.717 10.715 −14109 −11444 −14.843 −0.0014969 −0.00031657 131680 106800 138.53 0.013969 0.0029544 (exact) http://numericalmethods.eng.usf.edu

Thank You !