版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、材料计算机数值模拟讲义 The Finite Difference Calculus11、 Introduction to Numerical Methods2 、the Taylor Series3 、Difference Calculus2The Purpose and Power of Numerical Methods as well as their LimitationsNumerical Methods are a class of methods for Solving a wide variety of Mathematical Problems:the Electronic
2、 Computers have been in widespread use since the middle 1950s;Numerical Methods actually predate electronic computers by many years;Numerical Methods came of age with the introduction of the Electronic Computer. 3The Combination of Numerical Methods and digital computers has created a tool of immens
3、e power in Mathematical Analyses:the Numerical Methods are capable of handling the nonlinearities, complex geometries, and large systems of coupled equations which are necessary for the accurate simulation of many real physical situations;Numerical Methods have displaced classical mathematical analy
4、sis in many industrial and research applications;Numerical Methods are so easy and iexpensive to employ and are often available as prepackaged Programs. 4There are many problems which are still impossible (in some cases we should say “impractical”) to solve using Numerical Methods :for some of these
5、 problems no accurate and complete mathemetical model has yet been found;Other problems are simply so enourmous that their solution is beyond practical limits in terms of current computer technology;Of course, the entire question of practicality is strongly dependent upon how much one is willing to
6、spend . 5To study Numerical Methods :No complex physical situation can be exactly simulated by a mathematical model;No numerical method is completely trouble-free in all situation;No numerical method is completely error-free;No numerical method is optimal for all situation.6Computer languages to Num
7、erical Methods :“high level” computer language such as FORTRAN, ALGOL, or BASIC;Compiler to convert “high level” language to machine code;By far the most widely used algebraic language for scientific purpose is FORTRAN.Now, some language such as MATLAB7The Verification Problem to Numerical Analysis:
8、One of the most vita and yet difficult tasks which must be carried out in obtaining a numerical solution to any problem is to verify that the computer program and the final solution are correct;The verification procedure can actually be more expensive and time consuming than obtaining the final desi
9、re answer;The process of verification for a general program or library subprogram, which would be employed by many users to solve a wide variety of problems, would be similar but necessarily even more extensive and painstaking8The need to get involved :Numerical Methods cannot be read about, they mu
10、st be used in order to be understood;Personal experience that the best test of whether one understands a method is not to carry out a hand calculation but to write a computer program;It is remarkable how hazy concepts can become clear under the resulting pressure to be completely precise and unambig
11、uous.9The Taylor SeriesThe Taylor Series is the foundation of Mathematical Problems:If the value of a function can be expressed in a region of closed to by the infinite power series10The Taylor SeriesThe Taylor Series is the foundation of Mathematical Problems:for11The Taylor SeriesThe error in the
12、Taylor Series for when the series is truncated after the term containing is not greater than accurate to 12The Finite Difference CalculusForward and Backward Differences:Consider a function which is analytic in the neighborhood of a pointWe find by expanding in a Taylor Series about13We shall employ
13、 the subscript notation:Using this notation, thenWe define the first forward difference of at , 14The expression for may now be written as The term is called a first forward difference approximation of error order to 15We now use the Taylor Series expression of about to determine16Using this notatio
14、n, thenWe define the first backward difference of at , 17The expression for may now be written as The term is called a first backward difference approximation of error order to 18We will proceed to find approximations to higher order derivative:Use the Taylor Series expression for19Using the notatio
15、n, thenWe define the second forward difference of at , 20The expression for may now be written as The term is called a second forward difference approximation of error order to 21We will proceed to find approximations to higher order derivative:Use the Taylor Series expression for22Using the notatio
16、n, thenWe define the second forward difference of at , 23The expression for may now be written as The term is called a second backward difference approximation of error order to 24 The procedures for higher forward and backward differences and for approximating higher order derivatives.Any forward a
17、nd backward difference may be obtained starting from the first forward and backward differences by using the following recurrence formulas:25Forward and backward differences for expressions for higher order derivatives of any order are given byNote that each one of these expressions for the derivati
18、ves is of . 26Forward and backward differences for expressions for higher order derivativesIt may be convenient memory aid to note that the coefficients of the forward difference expressions for nth derivative starting from i and proceeding forward are given by the coefficients of in order.27the coe
19、fficients for the forward difference expressions for nth derivative starting from i and proceeding backward are given by the coefficients of in order.28 The difference expressions for derivatives which we have thus far obtained are of . More accurate expressions may be found by simply taking more te
20、rms in the Taylor series expression.Consider the series for Higher order Accurate forward & backward difference expressionsAs before, solving for yields29As before, solving for , we have a forward difference expression complete with its error termSubstituting expression into expression , we obtain30
21、Collecting terms,or in subscript notation,Note that the expression is exact for a parabola since the error involves only third and higher derivatives.31Forward and backward difference expressions of for higher derivatives can be obtained by simply replacing the first error term in the difference exp
22、ressions by an approximation. 32333435Subtracting the backward expansion from the forward expansion, we note that the terms involving even powers of h, such as , cancel, yieldingCentral differencesConsider again the analytic function, the forward and backward Taylor series expansions about x are res
23、pectively36Solving for ,Employing subscript notation,This difference representation, called a central difference representation, is accurate to37An expression of for is readily obtainable by adding the two equationsSolving for to yield38The central difference expressions of for derivatives up to the
24、 fourth order are tabulated as follows39An convenient memory aid for this central difference expressions of in terms of ordinary forward and backward differences is given by40The central difference expressions of for derivatives up to the fourth order are tabulated as follows41Errors calculation42第一
25、节 差分原理及逼近误差/非均匀步长Ox图2-1 非均匀步长差分H is not a const.一阶向后差商一阶中心差商43第一节 差分原理及逼近误差/非均匀步长(2/3)图1-2 均匀和非均匀网格实例144第一节 差分原理及逼近误差/非均匀步长(3/3)图1-3 均匀和非均匀网格实例245第二节 差分方程、截断误差和相容性/差分方程(1/3)差分相应于微分,差商相应于导数。差分和差商是用有限形式表示的,而微分和导数则是以极限形式表示的。如果将微分方程中的导数用相应的差商近似代替,就可得到有限形式的差分方程。现以对流方程为例,列出对应的差分方程。(2-1)46图2-1 差分网格第二节 差分方程
26、、截断误差和相容性/差分方程(2/3)47若时间导数用一阶向前差商近似代替,即空间导数用一阶中心差商近似代替,即则在点的对流方程就可近似地写作(2-2)(2-3)(2-4)第二节 差分方程、截断误差和相容性/差分方程(3/3)48第二节 差分方程、截断误差和相容性/截断误差(1/6)按照前面关于逼近误差的分析知道,用时间向前差商代替时间导数时的误差为 ,用空间中心差商代替空间导数时的误差为,因而对流方程与对应的差分方程之间也存在一个误差,它是这也可由Taylor展开得到。因为(2-5)(2-6)49第二节 差分方程、截断误差和相容性/截断误差(2/6)一个与时间相关的物理问题,应用微分方程表示
27、时,还必须给定初始条件,从而形成一个完整的初值问题。对流方程的初值问题为这里为某已知函数。同样,差分方程也必须有初始条件: 初始条件是一种定解条件。如果是初边值问题,定解条件中还应有适当的边界条件。差分方程和其定解条件一起,称为相应微分方程定解问题的差分格式。(2-7)(2-8)50第二节 差分方程、截断误差和相容性/截断误差(3/6)FTCS格式(2-9)FTFS格式(2-10)(2-11)FTBS格式51第二节 差分方程、截断误差和相容性/截断误差(5/6) (a) FTCS (b)FTFS (c)FTBS图2-2 差分格式52第二节 差分方程、截断误差和相容性/截断误差(6/6)FTCS
28、格式的截断误差为FTFS和FTBS格式的截断误差为(2-12)(2-13)3种格式对都有一阶精度。53第二节 差分方程、截断误差和相容性/相容性(1/3)一般说来,若微分方程为其中D是微分算子,f是已知函数,而对应的差分方程为其中是差分算子,则截断误差为这里为定义域上某一足够光滑的函数,当然也可以取微分方程的解 。(2-14)(2-15)(2-16)如果当、时,差分方程的截断误差的某种范数也趋近于零,即则表明从截断误差的角度来看,此差分方程是能用来逼近微分方程的,通常称这样的差分方程和相应的微分方程相容(一致)。如果当、时,截断误差的范数不趋于零,则称为不相容(不一致),这样的差分方程不能用来
29、逼近微分方程。(2-17)54第二节 差分方程、截断误差和相容性/相容性(2/3)若微分问题的定解条件为其中B是微分算子,g是已知函数,而对应的差分问题的定解条件为其中是差分算子,则截断误差为(2-18)(2-19)(2-20)55第二节 差分方程、截断误差和相容性/相容性(3/3)只有方程相容,定解条件也相容,即和整个问题才相容。 (2-21)无条件相容 条件相容以上3种格式都属于一阶精度、二层、相容、显式格式。56第三节 收敛性与稳定性/收敛性(1/6),也是微分问题定解区域上的一固定点,设差分格式在此点的解为 , 相应的微分问题的解为,二者之差为称为离散化误差。如果当时,离散化误差的某种
30、范数趋近于零,即则说明此差分格式是收敛的,即此差分格式的解收敛于相应微分问题的解,否则不收敛。与相容性类似,收敛又分为有条件收敛和无条件收敛。(3-1)、(3-2)57第三节 收敛性与稳定性/收敛性(3/6)相容性不一定能保证收敛性,那么对于一定的差分格式,其解能否收敛到相应微分问题的解?答案是差分格式的解收敛于微分问题的解是可能的。至于某给定格式是否收敛,则要按具体问题予以证明。下面以一个差分格式为例,讨论其收敛性:微分问题的FTBS格式为在某结点(xi , tn)微分问题的解为,差分格式的解为,则离散化误差为(3-6)(3-5)(3-4)58第三节 收敛性与稳定性/收敛性(4/6)按照截断
31、误差的分析知道以FTBS格式中的第一个方程减去上式得或写成若条件和成立,即,则式中表示在第n层所有结点上的最大值。(3-7)(3-8)(3-9)(3-10)59第三节 收敛性与稳定性/收敛性(5/6)由上式知,对一切i有故有于是综合得(3-11)(3-13)(3-12)(3-14)60第三节 收敛性与稳定性/收敛性(6/6)由于初始条件给定函数的初值,初始离散化误差。并且是一有限量,因而可见本问题FTBS格式的离散化误差与截断误差具有相同的量级。最后得到这样就证明了,当时,本问题的RTBS格式收敛。这种离散化误差的最大绝对值趋于零的收敛情况称为一致收敛。(3-15)(3-16)此例介绍了一种证
32、明差分格式收敛的方法,同时表明了相容性与收敛性的关系:相容性是收敛性的必要条件,但不一定是充分条件,还可能要求其他条件,如本例就是要求61第三节 收敛性与稳定性/稳定性(1/8)首先介绍一下差分格式的依赖区间、决定区域和影响区域。还是以初值问题(3-17)(a) FTCS (b) FTFS (c) FTBS 图3-1差分格式的依赖区间62第三节 收敛性与稳定性/稳定性(2/8)FTCS格式 (b) FTFS格式 (c) FTBS格式图3-2 差分格式的影响区域63第三节 收敛性与稳定性/稳定性(3/8)其解为零,即若用FTBS格式计算,且计算中不产生任何误差,则结果也是零,即当采用不同差分格式时,其依赖区间、决定区域和影响区域可以是不一样的。依赖区间、决定区域和影响区域是由差分格式本身的构造所决定的,并与步长比有关。 (3-18)(3-19)64(3-20)假设在第k层上的第j点,由于计算误差得到不妨设k=0, j=0, ,即相当于FTBS格式写成65第三节 收敛
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 电气工程师的工作总结
- 2025年度商业写字楼车位使用权转让合同模板
- 二零二五年度大型商场消防工程验收及安全评估合同3篇
- 二零二五年度个人消费信贷合同模板8篇
- 二零二五年度青少年户外夏令营活动参加协议3篇
- 二零二五版房地产售后服务居间合同范本
- 二零二五年度个人房产买卖合同终止协议3篇
- 二零二五年度钢材采购与供应合同范本
- 二零二五年度深海探测设备制造个人工劳务分包合同4篇
- 二零二五年度离婚探望权协议范本与子女监护权规定3篇
- 给排水科学与工程基础知识单选题100道及答案解析
- 2024年土地变更调查培训
- 2024年全国外贸单证员鉴定理论试题库(含答案)
- 新版中国食物成分表
- 《财务管理学(第10版)》课件 第5、6章 长期筹资方式、资本结构决策
- 房屋永久居住权合同模板
- 初中英语不规则动词表(译林版-中英)
- 2024年3月四川省公务员考试面试题及参考答案
- 新生儿黄疸早期识别课件
- 医药营销团队建设与管理
- 二年级数学上册口算题100道(全册完整)
评论
0/150
提交评论