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

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

Đ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

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...

Phần 2: mơ 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 CuuDuongThanCong.com https://fb.com/tailieudientucntt Introduction Numerical Analysis Computer Programming TION SIMULA CuuDuongThanCong.com https://fb.com/tailieudientucntt 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… CuuDuongThanCong.com Matlab/Simulink https://fb.com/tailieudientucntt 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) … CuuDuongThanCong.com https://fb.com/tailieudientucntt Computer simulation Example: CuuDuongThanCong.com https://fb.com/tailieudientucntt Computer simulation CuuDuongThanCong.com https://fb.com/tailieudientucntt Computer simulation CuuDuongThanCong.com https://fb.com/tailieudientucntt Computer simulation „ Interval halving (chia đôi khoảng) CuuDuongThanCong.com https://fb.com/tailieudientucntt 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 CuuDuongThanCong.com https://fb.com/tailieudientucntt 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 c ∈ [a, b] 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 CuuDuongThanCong.com https://fb.com/tailieudientucntt Ba dạng phương trình đạo hàm riêng „ 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 đạo hàm riêng điểm rời rạc (kg,tg) tính giá trị u = u(x , t) t ∂u(x,t) ∂t ≈ u(x,t+∆t)−u(x,t) ∆t CuuDuongThanCong.com (x, ∆t + t) • ∆t u(x, t) • (x, t) x https://fb.com/tailieudientucntt Xấp xỉ sai phân t (x − ∆x, t) (x + ∆x, t) • • • ∆x (x, t) x ∂ u(x,t) ∂x2 CuuDuongThanCong.com ≈ u(x+∆x,t)−2u(x,t)+u(x−∆x,t) (∆x)2 https://fb.com/tailieudientucntt Xấp xỉ sai phân P4 • ∆y P1 • • ∆x P • P2 y h = ∆x = ∆y P3 • P = (x, y) x ∂ u(P ) ∂x2 + ∂ u(P ) ∂y CuuDuongThanCong.com ≈ u(P1 )+u(P2 )+u(P3 )+u(P4 )−4u(P ) h2 https://fb.com/tailieudientucntt BÀI TOÁN ELLIPTIC ( „ Bài toán elliptic với điều kiện biên Dirichlet ∂2u ∂x2 ∂2u ∂y + = f (x, y), (x, y) ∈ Ω ⊂ R2 ∆u = u(x, y) = g(x, y), (x, y) ∈ Γ CuuDuongThanCong.com https://fb.com/tailieudientucntt BÀI TOÁN ELLIPTIC „ Phân hoạch tạo lưới Ω : chia nhỏ Ω đường thẳng // với Ox Oy Tạo lưới bước chia cách h = ∆x = ∆y Kí hiệu P1, P2, P3 P4 điểm rời rạc x/q P u(P1 )+u(P2 )+u(P3 )+u(P4 )−4u(P ) h2 ∆u(P ) ≈ Lần lượt thay Pk = (xk , yk ) vào phương trình elliptic, sử Hệ PTTT ẩn uk = u(Pk ) dụng công thức xấp xỉ & điều kiên biên CuuDuongThanCong.com https://fb.com/tailieudientucntt BÀI TOÁN ELLIPTIC „ Example Lưới nút ẩn đánh số giá trị cần tìm SD PTSP & Giá trị biên Mơ Matlab CuuDuongThanCong.com https://fb.com/tailieudientucntt Hệ PTTT BÀI TỐN PARABOLIC (mơ hình truyền nhiệt) CuuDuongThanCong.com https://fb.com/tailieudientucntt BÀI TỐN PARABOLIC (mơ hình truyền nhiệt) CuuDuongThanCong.com https://fb.com/tailieudientucntt BÀI TỐN PARABOLIC (mơ hình truyền nhiệt) „ Phân hoạch xấp xỉ Chia cách bước ∆x Mức thứ k: t (k) ∆t = k∆t u = ( uki ) (0) u Mức thứ 0: biết (1) u Mức thứ 1: chưa biết Xấp xỉ đạo hàm riêng cấp 1: CuuDuongThanCong.com ∂u(x,t) ∂t TIẾN - LÙI https://fb.com/tailieudientucntt BÀI TỐN PARABOLIC (mơ hình truyền nhiệt) „ Ví dụ Sơ đồ (s/p tiến) CuuDuongThanCong.com Sơ đồ ẩn (s/p lùi) https://fb.com/tailieudientucntt BÀI TỐN PARABOLIC (mơ hình truyền nhiệt tổng quát) Miền Xấp xỉ Ω = {(x, t)|0 ≤ x ≤ 1, t ≥ 0} ∂u ∂u ∂ u , , ∂t ∂x ∂x2 & ĐK biên, đầu Giá trị u điểm lưới Sai phân tiến & Sai phân lùi CuuDuongThanCong.com https://fb.com/tailieudientucntt BÀI TỐN PARABOLIC (mơ hình truyền nhiệt) CuuDuongThanCong.com https://fb.com/tailieudientucntt BÀI TỐN PARABOLIC (mơ hình truyền nhiệt) Kí hiệu u(k) CuuDuongThanCong.com = [uk1 ukn ], f (k) = [f1k fnk ] https://fb.com/tailieudientucntt BÀI TỐN PARABOLIC (mơ hình truyền nhiệt) „ Sơ đồ Crank-Nicholson CuuDuongThanCong.com https://fb.com/tailieudientucntt Outline „ General introduction ‰ ‰ ‰ „ „ „ Structure and operation of chemical engineering systems What is a chemical process? Motivation examples Part I: Process modeling Part II: Computer simulation Part III: Optimization of chemical processes CuuDuongThanCong.com https://fb.com/tailieudientucntt ... intergration of Ordinary Differential Equations (ODEs) „ Runge-Kutta methods ‰ Xây dựng cơng thức tính wi+1 theo wi mà khơng phải đạo hàm « tay », cần xấp xỉ T (k) mà không dùng đạo hàm với O(hk

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

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan