




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、材料計(jì)算機(jī)數(shù)值模擬講義 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、節(jié) 差分原理及逼近誤差/非均勻步長(zhǎng)Ox圖2-1 非均勻步長(zhǎng)差分H is not a const.一階向后差商一階中心差商43第一節(jié) 差分原理及逼近誤差/非均勻步長(zhǎng)(2/3)圖1-2 均勻和非均勻網(wǎng)格實(shí)例144第一節(jié) 差分原理及逼近誤差/非均勻步長(zhǎng)(3/3)圖1-3 均勻和非均勻網(wǎng)格實(shí)例245第二節(jié) 差分方程、截?cái)嗾`差和相容性/差分方程(1/3)差分相應(yīng)于微分,差商相應(yīng)于導(dǎo)數(shù)。差分和差商是用有限形式表示的,而微分和導(dǎo)數(shù)則是以極限形式表示的。如果將微分方程中的導(dǎo)數(shù)用相應(yīng)的差商近似代替,就可得到有限形式的差分方程。現(xiàn)以對(duì)流方程為例,列出對(duì)應(yīng)的差分方程。(2-1)46圖2-1 差分網(wǎng)格第二節(jié) 差分方程
26、、截?cái)嗾`差和相容性/差分方程(2/3)47若時(shí)間導(dǎo)數(shù)用一階向前差商近似代替,即空間導(dǎo)數(shù)用一階中心差商近似代替,即則在點(diǎn)的對(duì)流方程就可近似地寫作(2-2)(2-3)(2-4)第二節(jié) 差分方程、截?cái)嗾`差和相容性/差分方程(3/3)48第二節(jié) 差分方程、截?cái)嗾`差和相容性/截?cái)嗾`差(1/6)按照前面關(guān)于逼近誤差的分析知道,用時(shí)間向前差商代替時(shí)間導(dǎo)數(shù)時(shí)的誤差為 ,用空間中心差商代替空間導(dǎo)數(shù)時(shí)的誤差為,因而對(duì)流方程與對(duì)應(yīng)的差分方程之間也存在一個(gè)誤差,它是這也可由Taylor展開得到。因?yàn)椋?-5)(2-6)49第二節(jié) 差分方程、截?cái)嗾`差和相容性/截?cái)嗾`差(2/6)一個(gè)與時(shí)間相關(guān)的物理問(wèn)題,應(yīng)用微分方程表示
27、時(shí),還必須給定初始條件,從而形成一個(gè)完整的初值問(wèn)題。對(duì)流方程的初值問(wèn)題為這里為某已知函數(shù)。同樣,差分方程也必須有初始條件: 初始條件是一種定解條件。如果是初邊值問(wèn)題,定解條件中還應(yīng)有適當(dāng)?shù)倪吔鐥l件。差分方程和其定解條件一起,稱為相應(yīng)微分方程定解問(wèn)題的差分格式。(2-7)(2-8)50第二節(jié) 差分方程、截?cái)嗾`差和相容性/截?cái)嗾`差(3/6)FTCS格式(2-9)FTFS格式(2-10)(2-11)FTBS格式51第二節(jié) 差分方程、截?cái)嗾`差和相容性/截?cái)嗾`差(5/6) (a) FTCS (b)FTFS (c)FTBS圖2-2 差分格式52第二節(jié) 差分方程、截?cái)嗾`差和相容性/截?cái)嗾`差(6/6)FTCS
28、格式的截?cái)嗾`差為FTFS和FTBS格式的截?cái)嗾`差為(2-12)(2-13)3種格式對(duì)都有一階精度。53第二節(jié) 差分方程、截?cái)嗾`差和相容性/相容性(1/3)一般說(shuō)來(lái),若微分方程為其中D是微分算子,f是已知函數(shù),而對(duì)應(yīng)的差分方程為其中是差分算子,則截?cái)嗾`差為這里為定義域上某一足夠光滑的函數(shù),當(dāng)然也可以取微分方程的解 。(2-14)(2-15)(2-16)如果當(dāng)、時(shí),差分方程的截?cái)嗾`差的某種范數(shù)也趨近于零,即則表明從截?cái)嗾`差的角度來(lái)看,此差分方程是能用來(lái)逼近微分方程的,通常稱這樣的差分方程和相應(yīng)的微分方程相容(一致)。如果當(dāng)、時(shí),截?cái)嗾`差的范數(shù)不趨于零,則稱為不相容(不一致),這樣的差分方程不能用來(lái)
29、逼近微分方程。(2-17)54第二節(jié) 差分方程、截?cái)嗾`差和相容性/相容性(2/3)若微分問(wèn)題的定解條件為其中B是微分算子,g是已知函數(shù),而對(duì)應(yīng)的差分問(wèn)題的定解條件為其中是差分算子,則截?cái)嗾`差為(2-18)(2-19)(2-20)55第二節(jié) 差分方程、截?cái)嗾`差和相容性/相容性(3/3)只有方程相容,定解條件也相容,即和整個(gè)問(wèn)題才相容。 (2-21)無(wú)條件相容 條件相容以上3種格式都屬于一階精度、二層、相容、顯式格式。56第三節(jié) 收斂性與穩(wěn)定性/收斂性(1/6),也是微分問(wèn)題定解區(qū)域上的一固定點(diǎn),設(shè)差分格式在此點(diǎn)的解為 , 相應(yīng)的微分問(wèn)題的解為,二者之差為稱為離散化誤差。如果當(dāng)時(shí),離散化誤差的某種
30、范數(shù)趨近于零,即則說(shuō)明此差分格式是收斂的,即此差分格式的解收斂于相應(yīng)微分問(wèn)題的解,否則不收斂。與相容性類似,收斂又分為有條件收斂和無(wú)條件收斂。(3-1)、(3-2)57第三節(jié) 收斂性與穩(wěn)定性/收斂性(3/6)相容性不一定能保證收斂性,那么對(duì)于一定的差分格式,其解能否收斂到相應(yīng)微分問(wèn)題的解?答案是差分格式的解收斂于微分問(wèn)題的解是可能的。至于某給定格式是否收斂,則要按具體問(wèn)題予以證明。下面以一個(gè)差分格式為例,討論其收斂性:微分問(wèn)題的FTBS格式為在某結(jié)點(diǎn)(xi , tn)微分問(wèn)題的解為,差分格式的解為,則離散化誤差為(3-6)(3-5)(3-4)58第三節(jié) 收斂性與穩(wěn)定性/收斂性(4/6)按照截?cái)?/p>
31、誤差的分析知道以FTBS格式中的第一個(gè)方程減去上式得或?qū)懗扇魲l件和成立,即,則式中表示在第n層所有結(jié)點(diǎn)上的最大值。(3-7)(3-8)(3-9)(3-10)59第三節(jié) 收斂性與穩(wěn)定性/收斂性(5/6)由上式知,對(duì)一切i有故有于是綜合得(3-11)(3-13)(3-12)(3-14)60第三節(jié) 收斂性與穩(wěn)定性/收斂性(6/6)由于初始條件給定函數(shù)的初值,初始離散化誤差。并且是一有限量,因而可見本問(wèn)題FTBS格式的離散化誤差與截?cái)嗾`差具有相同的量級(jí)。最后得到這樣就證明了,當(dāng)時(shí),本問(wèn)題的RTBS格式收斂。這種離散化誤差的最大絕對(duì)值趨于零的收斂情況稱為一致收斂。(3-15)(3-16)此例介紹了一種證
32、明差分格式收斂的方法,同時(shí)表明了相容性與收斂性的關(guān)系:相容性是收斂性的必要條件,但不一定是充分條件,還可能要求其他條件,如本例就是要求61第三節(jié) 收斂性與穩(wěn)定性/穩(wěn)定性(1/8)首先介紹一下差分格式的依賴區(qū)間、決定區(qū)域和影響區(qū)域。還是以初值問(wèn)題(3-17)(a) FTCS (b) FTFS (c) FTBS 圖3-1差分格式的依賴區(qū)間62第三節(jié) 收斂性與穩(wěn)定性/穩(wěn)定性(2/8)FTCS格式 (b) FTFS格式 (c) FTBS格式圖3-2 差分格式的影響區(qū)域63第三節(jié) 收斂性與穩(wěn)定性/穩(wěn)定性(3/8)其解為零,即若用FTBS格式計(jì)算,且計(jì)算中不產(chǎn)生任何誤差,則結(jié)果也是零,即當(dāng)采用不同差分格式時(shí),其依賴區(qū)間、決定區(qū)域和影響區(qū)域可以是不一樣的。依賴區(qū)間、決定區(qū)域和影響區(qū)域是由差分格式本身的構(gòu)造所決定的,并與步長(zhǎng)比有關(guān)。 (3-18)(3-19)64(3-20)假設(shè)在第k層上的第j點(diǎn),由于計(jì)算誤差得到不妨設(shè)k=0, j=0, ,即相當(dāng)于FTBS格式寫成65第三節(jié) 收斂
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年健身氣功課考試題及答案
- 2025年預(yù)審學(xué)考試題型及答案
- 2025年三級(jí)教育抹灰試題及答案
- 2025年高考語(yǔ)文備考之小說(shuō)閱讀:考點(diǎn)剖析+教材銜接
- 2025年有趣知識(shí)的測(cè)試題及答案
- 2025年溫州銀行筆試試題及答案
- 2025年考試題型改革及答案
- 2025年宿舍管理面試試題及答案
- 2025年廣西南職面試題及答案
- 2025年醫(yī)學(xué)保研面試題及答案
- 學(xué)校衛(wèi)生監(jiān)督協(xié)管巡查記錄
- 管理學(xué)原理(南大馬工程)
- 《勾股定理在實(shí)際生活中的應(yīng)用》教學(xué)反思
- 游泳池給水排水安裝工程識(shí)圖
- 配位鍵和配位化合物課件
- 政 審 表打印模板
- 成人心肺復(fù)蘇(雙人)課件
- 蘇教版數(shù)學(xué)二年級(jí)下冊(cè)《認(rèn)識(shí)時(shí)分》教案(無(wú)錫公開課)
- 《民航地面服務(wù)與管理》項(xiàng)目六課件
- 立體構(gòu)成半立體構(gòu)成ppt課件
- 數(shù)獨(dú)比賽“六宮”練習(xí)題(96道)練習(xí)
評(píng)論
0/150
提交評(píng)論