1. Trang chủ
  2. » Công Nghệ Thông Tin

Bài giảng Phần 2: Mô phỏng máy tính

46 74 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 46
Dung lượng 772,43 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Nội dung của bài giảng trình bày ba dạng phương trình đạo hàm riêng cơ bản; bài toán Parabolic (mô hình truyền nhiệt); bài toán Parabolic (mô hình truyền nhiệt tổng quát); bài toán Elliptic; xấp xỉ sai phân...

Trang 1

Phần 2: mô phỏng máy tính

Modeling, simulation and optimization for chemical process

Instructor: Hoang Ngoc Ha Email: ha.hoang@hcmut.edu.vn

Bộ môn QT&TB

Trang 2

Numerical Analysis

Computer Programming

S IMU L AT I O N

Trang 3

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

‰ Femlab, Fortran, Ansys… Matlab/Simulink

Trang 4

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)

„ …

Trang 5

Computer simulation

Example:

Trang 6

Computer simulation

Trang 7

Computer simulation

Trang 8

Computer simulation

„ Interval halving (chia đôi khoảng)

Trang 9

Computer simulation

„ This problem can be formulated under the following form:

„ 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

f (x) = 0, x ∈ R

Trang 10

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

f(b), then there is a such that f(c) = u c ∈ [a, b]

If f(a) and f(b) are of opposite sign, there exist a number p in [a, b] with f(p)=0

Trang 11

Iterative method

„ Bisection method

Computer programming: Matlab

Trang 12

Iterative method

„ Newton’s method

Numerical solutions of nonlinear systems of equations ( of

SEVERAL VARIABLES )Î (See Ref.)

Trang 13

Computer simulation

„ Interpolation and polynomial approximation

‰ Cubic spline interpolation

Trang 14

Numerical intergration of Ordinary

Differential Equations (ODEs)

Trang 15

Numerical intergration of Ordinary

Differential Equations (ODEs)

Interpolation

Trang 16

Numerical intergration of Ordinary

Differential Equations (ODEs)

Trang 17

Numerical intergration of Ordinary

Differential Equations (ODEs)

„ Euler’s method

Trang 18

Numerical intergration of Ordinary

Differential Equations (ODEs)

„ Euler’s method

Trang 19

Numerical intergration of Ordinary

Differential Equations (ODEs)

Trang 20

Numerical intergration of Ordinary

Differential Equations (ODEs)

„ Local truncation error

The local truncation error in Euler’s method is O(h)

Definition

Trang 21

Numerical intergration of Ordinary

Differential Equations (ODEs)

„ Higher-Order Taylor methods

Trang 22

Numerical intergration of Ordinary

Differential Equations (ODEs)

„ Higher-Order Taylor methods

Trang 23

Numerical intergration of Ordinary

Differential Equations (ODEs)

„ Runge-Kutta methods

Trang 24

Numerical intergration of Ordinary

Differential Equations (ODEs)

„ Runge-Kutta methods

‰ Xây dựng công thức tính theo mà không phải đạo hàm « tay », cần xấp xỉ mà không dùng đạo hàm với

„ Minh họa qua k=2

T (k) O(h k )

f (t, y)

T (2) (t, y) = f (t, y) + h 2 f 0 (t, y)

f 0 (t, y) = f t 0 (t, y) + f y 0 (t, y)y 0 (t)

Trang 25

Numerical intergration of Ordinary

Differential Equations (ODEs)

Trang 26

Numerical intergration of Ordinary

Differential Equations (ODEs)

Trang 27

Numerical intergration of Ordinary

Differential Equations (ODEs)

Sơ đồ trung điểm (R_K bậc 2)

Trang 28

Numerical intergration of Ordinary

Differential Equations (ODEs)

Trang 29

Numerical intergration of Partial

Differential Equations (PDEs)

„ Click here

Trang 30

Giới thiệu chung

u = u(x , t) một đại lượng vật lý của hệ khảo sát

n chemical species

Inlet material and/or

energetic flux

Outlet material and/or energetic flux

Trang 31

Ba dạng phương trình đạo hàm riêng cơ bản

Trang 32

Ba dạng phương trình đạo hàm riêng cơ

bản

„ Phương pháp tìm nghiệm

‰ Phương pháp giải tích

‰ Phương pháp số

Ý tưởng : xấp xỉ sai phân các đạo hàm riêng tại các điểm rời rạc (kg,tg)

và tính giá trị của u = u(x , t) tại đó

u(x, t)

Trang 35

BÀI TOÁN ELLIPTIC

„ Bài toán elliptic với điều kiện biên Dirichlet

(

∆u = ∂ ∂x 2 u 2 + ∂ ∂y 2 u 2 = f (x, y), (x, y) ∈ Ω ⊂ R 2

Trang 36

BÀI TOÁN ELLIPTIC

„ Phân hoạch và tạo lưới : chia nhỏ bởi

Lần lượt thay vào phương trình elliptic, sử

dụng công thức xấp xỉ & điều kiên biên

P k = (x k , y k )

Hệ PTTT ẩn u k = u(P k )

Trang 37

BÀI TOÁN ELLIPTIC

„ Example

Lưới 4 nút ẩn đánh số 4 giá trị cần tìm SD PTSP & Giá trị trên biên Hệ PTTT

Mô phỏng Matlab

Trang 38

BÀI TOÁN PARABOLIC (mô hình

truyền nhiệt)

Trang 39

BÀI TOÁN PARABOLIC (mô hình

truyền nhiệt)

Trang 41

BÀI TOÁN PARABOLIC (mô hình

truyền nhiệt)

„ Ví dụ

Sơ đồ hiện (s/p tiến) Sơ đồ ẩn (s/p lùi)

Trang 42

BÀI TOÁN PARABOLIC (mô hình

truyền nhiệt tổng quát)

Trang 43

BÀI TOÁN PARABOLIC (mô hình

truyền nhiệt)

Trang 44

BÀI TOÁN PARABOLIC (mô hình

truyền nhiệt)

Trang 45

BÀI TOÁN PARABOLIC (mô hình

truyền nhiệt)

„ Sơ đồ Crank-Nicholson

Trang 46

„ Part III: Optimization of chemical processes

Ngày đăng: 11/01/2020, 20:09

TỪ KHÓA LIÊN QUAN