Báo cáo môn Mô phỏng và tối ưu hóa các quá trình hóa học - Phần 2: Mô phỏng máy tính - Hoàng Ngọc Hà

Phần 2: mô phỏng máy tính  
Modeling, simulation and optimization for chemical process  
Instructor: Hoang Ngoc Ha  
Bộ môn QT&TB  
Introduction  
Numerical  
Analysis  
Computer  
Programming  
SIMULATION  
Computer simulation  
„ Some simulation techniques for solving some  
of the systems of equations  
‰ Solution of (nonlinear) algebraic equations  
‰ Ordinary differential equations (ODEs)  
‰ Partial differential equations (PDEs)  
„ Numerical methods  
‰ Iterative methods  
‰ Discrete difference methods  
Matlab/Simulink  
‰ Femlab, Fortran, Ansys…  
Computer simulation  
„ Computer programming  
‰ Assume that you know some computer  
programming language  
‰ We are not interested in generating the most  
efficient and elegant code but in solving problems  
(from point of view of engineers)  
„ Including extensive comment statements  
„ Use of symbols (the same ones in the equations  
describing the systems)  
„ Debugging (for mistakes in coding and/or in logic)  
„ …  
Computer simulation  
Example:  
Computer simulation  
Computer simulation  
Computer simulation  
„ Interval halving (chia đôi khoảng)  
Computer simulation  
„ This problem can be formulated under the  
following form:  
f(x) = 0, x ∈ R  
„ The goal is to find the solution of this  
nonlinear equations (in ONE VARIABLE)  
„ Tools (Iterative methods)  
‰ Bisection method (phương pháp phân đoạn)  
‰ Newton’s (or Newton-Raphson) method  
Iterative method  
„ Intermediate value theorem  
‰ If f is a real-valued continuous function on the  
interval [a, b], and u is a number between f(a) and  
c ∈ [a, b]  
f(b), then there is a  
such that f(c) = u  
If f(a) and f(b) are of opposite sign, there exist a number p in [a, b] with f(p)=0  
Iterative method  
„ Bisection method  
Computer programming: Matlab  
Iterative method  
„ Newton’s method  
Numerical solutions of nonlinear systems of equations (of  
SEVERAL VARIABLES)Î (See Ref.)  
Computer simulation  
„ Interpolation and polynomial approximation  
‰ Interpolation and the Lagrange polynomial  
‰ Cubic spline interpolation  
‰ …  
„ Numerical differentiation and intergration  
‰ Numerical differentiation  
‰ Richardson’s extrapolation  
‰ …  
(See Ref.)  
Numerical intergration of Ordinary  
Differential Equations (ODEs)  
Numerical intergration of Ordinary  
Differential Equations (ODEs)  
y(t )  
y(t)  
0
y(t1)  
x
y(tN )  
x
x
Interpolation  
t0 t1  
tN  
t
Numerical intergration of Ordinary  
Differential Equations (ODEs)  
„ Tools:  
‰ Euler’s method  
‰ Higher-Order Taylor methods  
‰ Runge-Kutta methods  
‰ …  
Numerical intergration of Ordinary  
Differential Equations (ODEs)  
„ Euler’s method  
Numerical intergration of Ordinary  
Differential Equations (ODEs)  
„ Euler’s method  
Numerical intergration of Ordinary  
Differential Equations (ODEs)  
„ Example  
y0 = y − t2 + 1, t ∈ [0 2]  
y(0) = 0.5  
P/p Euler n=10?  
Approximate solution?  
b−a  
n = 10 ⇒ h = = 0.2  
n
Exact solution?  
y(t) = −0.5 exp(t) + (t + 1)2  
Computer programming: Matlab  
Numerical intergration of Ordinary  
Differential Equations (ODEs)  
„ Local truncation error  
Definition  
The local truncation error in Euler’s method is  
O(h)  
Tải về để xem bản đầy đủ
pdf 46 trang myanh 29120 Free
Bạn đang xem 20 trang mẫu của tài liệu "Báo cáo môn Mô phỏng và tối ưu hóa các quá trình hóa học - Phần 2: Mô phỏng máy tính - Hoàng Ngọc Hà", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbao_cao_mon_mo_phong_va_toi_uu_hoa_cac_qua_trinh_hoa_hoc_pha.pdf