麻省理工化工数值分析第三十六课
- 格式:pdf
- 大小:230.18 KB
- 文档页数:6
化工数值计算与MATLAB课程设计一、课程背景作为化学工程专业的一门课程,化工数值计算与MATLAB课程设计是一门综合性较强的课程,旨在让学生掌握化工工程中常见的数值计算方法以及MATLAB编程技能,为学生日后从事化工工程工作提供有力的帮助。
二、教学内容本门课程的主要内容包括以下三个方面:1. 常见的数值计算方法这一部分主要介绍化工工程中常用的数值计算方法,包括插值、数值积分、微分方程求解、最小二乘法等。
学生需要掌握这些方法的理论知识和具体应用,能够熟练地运用这些方法解决化工过程中遇到的实际问题。
2. MATLAB编程技能的掌握作为一种强大的计算工具,MATLAB在化工工程中有着广泛的应用。
这一部分主要介绍MATLAB编程语言的基础知识以及一些常见的编程技巧,包括变量、循环、函数、图形输出等。
学生需要通过实践掌握MATLAB编程技能,能够利用MATLAB对化工问题进行编程求解。
3. 化工数值计算与MATLAB综合设计这一部分是本门课程的重点,主要通过一个小型的化工流程仿真设计项目来综合运用前两部分的知识,设计的具体内容需要由教师根据学生实际情况进行调整。
通过这一部分的课程设计,学生能够加深对化工数值计算理论和MATLAB编程技能的理解,提高化工工程问题的解决能力。
三、教学方法本门课程采用理论授课与实践相结合的教学方式。
在理论授课环节,教师主要介绍化工数值计算的理论知识,说明相应的代码实现过程,并举一些实际例子来讲解。
在实践环节,学生需要利用所学知识实现对化工过程的仿真设计。
在实践过程中,教师会提供必要的指导,学生需要通过实践来掌握相应的技能和知识。
四、教学评价为了保证本门课程的教学效果,将采用以下几个方面的考核策略:1. 课堂测试教师会根据课程的重点内容设置相应的测试题目,在测试中检测学生掌握知识的程度。
2. 大作业大作业是本门课程的重要考核方式之一。
学生需要利用所学知识设计并实现一个小型的化工工艺仿真项目,并撰写实验报告。
工程师数学方法I ——MIT课程翻译:温秋芳(Wen, Qiufang)(简介并寄信)编辑:何斌((Bin He)(简介并寄信)《应用数学导论》(Introduction to Applied Mathematics),Gilbert Strang着,Wellesley-Cambridge出版社。
考试考试暂时定在第15, 27,39次课堂上,都是在平时的课上和正常的课程时间。
开卷考试,可带书和笔记。
没有期末考试。
评分作业(9次): 34%考试(3次): 66%作业作业中粗体字的练习尤其重要, 典型的表现了本课程中一些额外的深度知识。
作业及其完成期限的任何改变都将在课堂上和课程网页上宣布。
允许合作完成作业,但是,你必须独立地写出自己的结果,并指出你合作者的名字。
不可使用现成的答案。
I. 应用线性代数1. 高斯消去法和轴化2. 矩阵分解A = LU 和正定矩阵3. 正定矩阵: 2 × 2 (省略n × n 矩阵的详细证明)4. 最小二乘法: A T A5. 弹簧和质量系统II. 离散平衡方程6. 基本平衡方程7. 电网络: A T CA(省略: RLC电路和回路电流)8. 平衡结构: 确定的或不定的9. 不稳定性: 刚性运动及机械装置10. 第1-9课复习11. 有约束的最小化: 拉各朗日乘数(省略: 投影)12. 对偶性, 能量与共能(co-energy)13. 加权最小二乘法14. 测试1前的复习15. 测试1: 第一、二章III. 连续平衡方程16. 弹性棒的平衡17. Sturm-Liouville问题,边界层和Delta函数(delta function)18. 弹性梁的平衡(省略: 样条逼近)19. 势流,斯托克斯定理和散度定理20. 格林定理,边界条件和泊松方程21. 变分法: 介绍(省略: 互补最小原理)22. 变分法: 实例(省略:拉各朗日方程和汉密尔顿方程)23. 三维空间的线积分,位势,旋度和梯度(省略:电磁学)24. 矢量微积分和曲线坐标系25. 流体力学26. 测试2前的复习27. 测试2: 第三章IV. 傅立叶级数和傅立叶变换28. 傅立叶系数29. 正弦级数和余弦级数, Parseval公式30. 拉普拉斯方程的傅立叶解及其收敛性31. 正交函数: 贝塞尔函数32. 离散傅立叶级数和n单位根33. 卷积定则和信号处理34. 常数对角矩阵35. 傅立叶变换: Plancherel公式和测不准原理36. 变换法则: (省略: 积分方程)37. 常微分方程的解和格林函数38. 测试3前的复习39. 测试3: 第四章Course OutlineTextStrang, Gilbert. Introduction to Applied Mathematics. Wellesley-Cambridge Press. (Table of Contents)ExamsThe exams are tentatively scheduled for Sessions 15, 27 and 39. They are in the normal class and class hour and are OPEN BOOK AND NOTES. There is NO FINAL exam.GradesProblem Sets (9): 34%Exams (3): 66%.Problem SetsExercises in bold in the Problem Sets are especially important and typically present some additional insight on the subject. Any changes to problem sets and due dates will be announced in class and on the course web page. Working together is allowed in problem sets. However, you must write up your results individually and indicate the names of your collaborators. Use of existing solutions is not allowed.I. Applied Linear Algebra1. Gaussian elimination and pivots2. Factorization A = LU and positive definite matrices3. Positive definite matrices: 2 × 2 (Omit: detailed proof for n × n)4. Least squares: A T A5. Systems of springs and massesII. Equilibrium Equations: Discrete Case6. Fundamental equations of equilibrium7. Electrical networks: A T CA (Omit: RLC circuit and Loop currents)8. Structures in equilibrium: determinate or indeterminate9. Instability: rigid motion and mechanism10. Review of Lectures 1═911. Minimizing with constraints: Lagrange multipliers (Omit: Projections)12. Duality. Energy and co-energy13. Weighted least squares14. Review for Exam 115. EXAM 1: Chapters 1 and 2III. Equilibrium Equations: Continuous Case16. Equilibrium of an elastic bar17. Sturm-Liouville problem, boundary layers and delta function18. Equilibrium of an elastic beam (Omit: Spline approximations)19. Potential flow, Stokes and divergence theorems20. Green's theorem, boundary conditions and Poisson's equation21. Calculus of variations: introduction (Omit: Complementary minimum principle)22. Calculus of variations: examples (Omit: Lagrangians and Hamilton's equation)23. Line integrals, potentials, curl and gradient in 3D (Omit: Electricity and magnetism)24. Vector calculus and curvilinear coordinate systems25. Fluid mechanics26. Review for Exam 227. EXAM 2: Chapter 3IV. Fourier Series and Transforms28. Fourier coeffiients29. Sine and cosine series, Parseval's formula30. Fourier solution to Laplace equation and convergence31. Orthogonal functions; Bessel functions32. Discrete Fourier series and the n roots of unity33. Convolution rule and signal processing34. Constant-diagonal matrices35. Fourier transforms: Plancherel's formula and uncertainty principle36. Transform rules (Omit: Integral equations)37. Solutions of ODE's and Green's function38. Review for Exam 339. EXAM 3: Chapter 4目录INTRODUCTION TO APPLIED MATHEMATICS Gilbert StrangWellesley-Cambridge Press (1986)TABLE OF CONTENTS1. Symmetric Linear Systems1.1 Introduction1.2 Gaussian Elimination1.3 Positive Definite Matrices1.4 Minimum Principles1.5 Eigenvalues and Dynamical Systems1.6 A Review of Matrix Theory2. Equilibrium Equations2.1 A Framework for the Applications2.2 Constraints and Lagrange Multipliers2.3 Electrical Networks2.4 Structures in Equilibrium2.5 Least Squares Estimation and the Kalman Filter3. Equilibrium in the Continuous Case3.1 One-dimensional Problems3.2 Differential Equations of Equilibrium3.3 Laplace's Equation and Potential Flow3.4 Vector Calculus in Three Dimensions3.5 Equilibrium of Fluids and Solids3.6 Calculus of Variations4. Analytical Methods4.1 Fourier Series and Orthogonal Expansions4.2 Discrete Fourier Series and Convolution4.3 Fourier Integrals4.4 Complex Variables and Conformal Mapping4.5 Complex Integration5. Numerical Methods5.1 Linear and Nonlinear Equations5.2 Orthogonalization and Eigenvalue Problems5.3 Semi-direct and Iterative Methods5.4 The Finite Element Method5.5 The Fast Fourier Transform6. Initial-Value Problems6.1 Ordinary Differential Equations6.2 Stability and the Phase Plane and Chaos6.3 The Laplace Transform and the z-Transform6.4 The Heat Equation vs. the Wave Equation6.5 Difference Methods for Initial-Value Problems 6.6 Nonlinear Conservation Laws7. Network Flows and Combinatorics7.1 Spanning Trees and Shortest Paths7.2 The Marriage Problem7.3 Matching Algorithms7.4 Maximal Flow in a Network8. Optimization8.1 Introduction to Linear Programming8.2 The Simplex Method and Karmarkar's Method8.3 Duality in Linear Programming8.4 Saddle Points (Minimax) and Game Theory8.5 Nonlinear OptimizationSoftware for Scientific ComputingReferences and AcknowledgementsSolutions to Selected ExercisesIndex。
⿇省理⼯化⼯数值分析第六课10.34, Numerical Methods Applied to Chemical EngineeringProfessor William H. Green Lecture #6: Modern Methods for Solving Nonlinear Equations.1D-Problemunknown: T of reactor f(x) = 0Q rxn exp(-Ea /RT ) + h(T – T a ) + c(T 4 – T a 4) = 0heat of reaction convection radiation (+) (-) (-)steady state temperatures Make a plot with MATLAB *nethe a t.m* function qdot = netheat(T) % computes the net heating rate of a reactor % qdot = 0 at the steady state qdot = Q.*exp(-Ea/(R.*T)) + h.*(T-Ta) + c.*(T.^4-Ta.^4);Figure 2. Professor Green modified variables Q and c until the plot looked likethe one above. Increased Q and decreased c.T o solve for steady state zerosf(T Figure 1. 1D problem Q = -2e-5; Ea = 5000; R = 1.987; h = 3; Ta = 300; c = 1e-8; Tvec = linspace(300,3000)qdot = netheat(Tvec) plot(Tvec,qdot) Figure 3. Have computer bracket in and find smallrange where plot goes from negative to positive.Bisection10.34 Numerical Methods Applied to Chemical EngineeringLecture 6 Prof. William GreenPage 2 of 4start a,b such that f(a)<0 and f(b) < 0 2b a x +=Figure 4. Funif f(x) · f(a) > 0 a = xelse b = xThis is a problem of TOLERANCEif((b-a) < tol) stopTypes of tolerance Absolute tolerance Relative tolerance atol: has unitsif |f(x)| < atol·f rtol: if(b-a) < rtol*|a| has to be BIG numberIn MATLAB while abs(b-a) > atolx x = (a+b)/2 if f(x)·f(a) > 0 a = x else b = x end *bisect.m* function x = bisect(f,a,b,atolx,rtolx, atolf) %solves f(x) = 0 while abs(b-a) > atolx x = 0.5*(b+a); if((feval(f,x)*feval(f,a))>0) a =x; else b=x; end endCommand Window x = bisect(@netheat,300,2000,0.1,0,0) x = 1.2373e+003CHECK: netheat(1237) = -1.0474 í closeKeep in mind: never get actual solution, but can come closeWe can change tolerances to improve results. ? while(abs(b-a)>atolx)&&(abs(b-a)>(rtolx*abs(a)))x = 0.5*(b+a); AND: must satisfy both conditions if(a bs(fev a l(f,x))x = 1.2363e+003 looser tolerance gives less accurate answerBisection cuts interval by 2 each timeEvery time we cut 3 times, we lose a sig figIn bisection, time grows linearly with the number of significant figures.a < x true < bx true = x soln ± b-a/2Newton’s Method (1-D)evaluates slope of f(x)next guess is the x new that satisfies f(x new)=0for a line from f(x guess) with the slope at f(x guess)Figure 5. Newton’s Method.For a good guess Newton’s method doublesthe number of significant figures after everyiteration; however, we lose robustness ifguess is poorf(x) = f(x0)+f’(x0)*(x-x0)+O(Δx2)0 = f(x guess)+f’(x guess)*(x-x guess)If f’(x guess) ≈ 0 -- doesn’t workx new = x guess – f(x guess)/f’(x guess)Figure 6.NO intersectionAnother drawback is one needs a derivative of the function. Secant Methodsame as Newton’s, but uses f’(x) approximate]1[][]1[][)()()('=kkkkapproxxxxfxfxfBisection method works only for 1D problems, but Newton/Secant can be used for problems with greater dimension 10.34 Numerical Methods Applied to Chemical Engineering Lecture 6 Prof. William Green Page 3 of 4 Broyden’s Method (Multi-dimensional) F(x) = F(x 010.34 Numerical Methods Applied to Chemical EngineeringLecture 6 Prof. William GreenPage 4 of 4f(x) = 0 approx J = B 2][1||||x B BΔ+=+k ][k Outer Product:ΔΔΔΔΔΔ (32221)2312111x F x F x F x F x F x FNewton’s Method (Multi-dimensional)O = F(x 0)+J(x 0)·(x-x 0)J*Δx = -F(x 0) B [k]Δx = -FLU LU [k+1] without redoing factorization Done in detail in homework problem.。
化工数值方法及matlab应用化工数值方法是应用数学方法解决化工过程中的数学模型和方程的一种技术手段。
它通过建立数学模型,将化工过程转化为数学问题,并采用计算机或其他计算设备进行数值计算,从而求解模型的数值解。
化工数值方法在化工领域的应用非常广泛,例如在反应工程、传热传质、分离过程等方面都有重要的应用。
化工数值方法的主要目标是获得模型的数值解。
通常情况下,化工过程的数学模型是由一组偏微分方程或常微分方程组成。
由于这些方程很难通过解析方法求解,化工数值方法就成为了解决这些问题的主要手段之一。
它将偏微分方程或常微分方程进行离散化处理,将其转化为代数方程组,然后通过数值计算方法求解。
常见的化工数值方法有有限差分法、有限元法和耦合法等。
有限差分法是一种将连续函数在离散点上展开,并通过有限差商来近似微分算子的方法。
它将求解区域划分为网格,然后在网格上进行近似计算。
具体来说,有限差分法将偏微分方程中的导数项用差分近似表示,然后通过求解代数方程组得到数值解。
有限差分法简单易实现,适用于各种类型的边界条件,因此在化工过程的建模和计算中得到了广泛应用。
有限元法是一种基于函数空间分析理论的数学方法。
它将求解区域划分为若干计算单元(有限元),然后在每个单元上构造近似解。
通过构造函数空间,将原始微分方程的解空间与有限维空间构造的函数空间相联系,从而得到近似解。
有限元法能够较好地处理复杂的几何结构和边界条件,因此在建模复杂化工系统时得到了广泛应用。
耦合法是一种将不同物理过程耦合起来求解的方法。
在化工过程中,通常存在着多个物理过程相互耦合的情况,例如传热传质过程中的流体流动和热传导过程。
耦合法通过将不同的物理过程的方程组合在一起,构成一个大的代数方程组,然后通过求解这个方程组得到数值解。
耦合法能够较好地处理不同物理过程之间的相互作用,对于建模和计算复杂化工系统非常有用。
Matlab是一种强大的数值计算和科学计算软件,广泛应用于化工数值方法的计算中。
主讲陶文铨西安交通大学能源与动力工程学院热流中心CFD-NHT-EHT CENTER 2010年9月27日, 西安数值传热学第四章扩散方程的数值解及其应用(1)4.1 一维导热问题4.1.1一维稳态导热的通用控制方程4.1.3界面导热系数的确定方法4.1.4 一维非稳态导热控制方程的离散化4.1.2通用控制方程控制容积积分法的离散4.1.5 数学上的稳定未必导致物理上有意义的解一维稳态导热问题不同坐标系通用控制方程0 P P()0P x x Δ=i调和平均已经广泛为国内外学术界所接受。
≤1数学上的稳定未必导致物理上有意义的解无内热源一维非稳态导热,初场均匀,两表面0]T +代入下式:P(全隐格式)才能满足。
结论:数学上的稳定未必导致物理上有意义的解;推=xΔa TP P极坐标均可以表示成为:2.解决通用化的一种方案为写出适合于三种坐标系中系数的通用表达式,特引进两个辅助变量:(1)x –方向标尺因子,scaling factor ,x-方向的距离表示成为sx x δi 。
对直角、圆柱坐标规定1;sx ≡(2)y-方向引入一个名义半径,R 。
对直角坐标R =1,据此,东西导热距离为:sx xδi 东西导热面积为:R /y sxΔ对极坐标取;sx r =对圆柱与极坐标R =r三种二维正交坐标系中离散方程的统一表达式按这种方式编制程序时,只要设置一个变量MODE,4.3 源项与边界条件的处理4.3.1非常数源项的线性化处理1. 线性化方法4.3.2第二、三类边界条件使方程组封闭的处理2. 线性化方法讨论3. 线性化方法应用实例1. 补充以边界节点代数方程的方法2. 附加源项法S= P2. 线性化方法讨论(1)对与被求解变量有关的非常数源项,线性化比假定为常数更合理:用*()PS f T =来表示P 的源项比落后一个迭代步;P C P T S S S =+(2)任何复杂的函数总可以用线性函数来近似逼近;线性又是建立线性代数方程所必须的;(3)是为保证代数方程迭代求解收敛所必须;0P S ≤P P nb nb a a b φφ=+∑P nb a a ≥∑P nb P a a S V =−Δ∑代数方程迭代求解收敛的充分条件是,因为可以确保代数方程迭代求解收敛。