有限差分方法基礎(chǔ)31255_第1頁
有限差分方法基礎(chǔ)31255_第2頁
有限差分方法基礎(chǔ)31255_第3頁
有限差分方法基礎(chǔ)31255_第4頁
有限差分方法基礎(chǔ)31255_第5頁
已閱讀5頁,還剩82頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、材料計算機數(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é) 差分原理及逼近誤差/非均勻步長Ox圖2-1 非均勻步長差分H is not a const.一階向后差商一階中心差商43第一節(jié) 差分原理及逼近誤差/非均勻步長(2/3)圖1-2 均勻和非均勻網(wǎng)格實例144第一節(jié) 差分原理及逼近誤差/非均勻步長(3/3)圖1-3 均勻和非均勻網(wǎng)格實例245第二節(jié) 差分方程、截斷誤差和相容性/差分方程(1/3)差分相應于微分,差商相應于導數(shù)。差分和差商是用有限形式表示的,而微分和導數(shù)則是以極限形式表示的。如果將微分方程中的導數(shù)用相應的差商近似代替,就可得到有限形式的差分方程。現(xiàn)以對流方程為例,列出對應的差分方程。(2-1)46圖2-1 差分網(wǎng)格第二節(jié) 差分方程

26、、截斷誤差和相容性/差分方程(2/3)47若時間導數(shù)用一階向前差商近似代替,即空間導數(shù)用一階中心差商近似代替,即則在點的對流方程就可近似地寫作(2-2)(2-3)(2-4)第二節(jié) 差分方程、截斷誤差和相容性/差分方程(3/3)48第二節(jié) 差分方程、截斷誤差和相容性/截斷誤差(1/6)按照前面關(guān)于逼近誤差的分析知道,用時間向前差商代替時間導數(shù)時的誤差為 ,用空間中心差商代替空間導數(shù)時的誤差為,因而對流方程與對應的差分方程之間也存在一個誤差,它是這也可由Taylor展開得到。因為(2-5)(2-6)49第二節(jié) 差分方程、截斷誤差和相容性/截斷誤差(2/6)一個與時間相關(guān)的物理問題,應用微分方程表示

27、時,還必須給定初始條件,從而形成一個完整的初值問題。對流方程的初值問題為這里為某已知函數(shù)。同樣,差分方程也必須有初始條件: 初始條件是一種定解條件。如果是初邊值問題,定解條件中還應有適當?shù)倪吔鐥l件。差分方程和其定解條件一起,稱為相應微分方程定解問題的差分格式。(2-7)(2-8)50第二節(jié) 差分方程、截斷誤差和相容性/截斷誤差(3/6)FTCS格式(2-9)FTFS格式(2-10)(2-11)FTBS格式51第二節(jié) 差分方程、截斷誤差和相容性/截斷誤差(5/6) (a) FTCS (b)FTFS (c)FTBS圖2-2 差分格式52第二節(jié) 差分方程、截斷誤差和相容性/截斷誤差(6/6)FTCS

28、格式的截斷誤差為FTFS和FTBS格式的截斷誤差為(2-12)(2-13)3種格式對都有一階精度。53第二節(jié) 差分方程、截斷誤差和相容性/相容性(1/3)一般說來,若微分方程為其中D是微分算子,f是已知函數(shù),而對應的差分方程為其中是差分算子,則截斷誤差為這里為定義域上某一足夠光滑的函數(shù),當然也可以取微分方程的解 。(2-14)(2-15)(2-16)如果當、時,差分方程的截斷誤差的某種范數(shù)也趨近于零,即則表明從截斷誤差的角度來看,此差分方程是能用來逼近微分方程的,通常稱這樣的差分方程和相應的微分方程相容(一致)。如果當、時,截斷誤差的范數(shù)不趨于零,則稱為不相容(不一致),這樣的差分方程不能用來

29、逼近微分方程。(2-17)54第二節(jié) 差分方程、截斷誤差和相容性/相容性(2/3)若微分問題的定解條件為其中B是微分算子,g是已知函數(shù),而對應的差分問題的定解條件為其中是差分算子,則截斷誤差為(2-18)(2-19)(2-20)55第二節(jié) 差分方程、截斷誤差和相容性/相容性(3/3)只有方程相容,定解條件也相容,即和整個問題才相容。 (2-21)無條件相容 條件相容以上3種格式都屬于一階精度、二層、相容、顯式格式。56第三節(jié) 收斂性與穩(wěn)定性/收斂性(1/6),也是微分問題定解區(qū)域上的一固定點,設(shè)差分格式在此點的解為 , 相應的微分問題的解為,二者之差為稱為離散化誤差。如果當時,離散化誤差的某種

30、范數(shù)趨近于零,即則說明此差分格式是收斂的,即此差分格式的解收斂于相應微分問題的解,否則不收斂。與相容性類似,收斂又分為有條件收斂和無條件收斂。(3-1)、(3-2)57第三節(jié) 收斂性與穩(wěn)定性/收斂性(3/6)相容性不一定能保證收斂性,那么對于一定的差分格式,其解能否收斂到相應微分問題的解?答案是差分格式的解收斂于微分問題的解是可能的。至于某給定格式是否收斂,則要按具體問題予以證明。下面以一個差分格式為例,討論其收斂性:微分問題的FTBS格式為在某結(jié)點(xi , tn)微分問題的解為,差分格式的解為,則離散化誤差為(3-6)(3-5)(3-4)58第三節(jié) 收斂性與穩(wěn)定性/收斂性(4/6)按照截斷

31、誤差的分析知道以FTBS格式中的第一個方程減去上式得或?qū)懗扇魲l件和成立,即,則式中表示在第n層所有結(jié)點上的最大值。(3-7)(3-8)(3-9)(3-10)59第三節(jié) 收斂性與穩(wěn)定性/收斂性(5/6)由上式知,對一切i有故有于是綜合得(3-11)(3-13)(3-12)(3-14)60第三節(jié) 收斂性與穩(wěn)定性/收斂性(6/6)由于初始條件給定函數(shù)的初值,初始離散化誤差。并且是一有限量,因而可見本問題FTBS格式的離散化誤差與截斷誤差具有相同的量級。最后得到這樣就證明了,當時,本問題的RTBS格式收斂。這種離散化誤差的最大絕對值趨于零的收斂情況稱為一致收斂。(3-15)(3-16)此例介紹了一種證

32、明差分格式收斂的方法,同時表明了相容性與收斂性的關(guān)系:相容性是收斂性的必要條件,但不一定是充分條件,還可能要求其他條件,如本例就是要求61第三節(jié) 收斂性與穩(wěn)定性/穩(wěn)定性(1/8)首先介紹一下差分格式的依賴區(qū)間、決定區(qū)域和影響區(qū)域。還是以初值問題(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格式計算,且計算中不產(chǎn)生任何誤差,則結(jié)果也是零,即當采用不同差分格式時,其依賴區(qū)間、決定區(qū)域和影響區(qū)域可以是不一樣的。依賴區(qū)間、決定區(qū)域和影響區(qū)域是由差分格式本身的構(gòu)造所決定的,并與步長比有關(guān)。 (3-18)(3-19)64(3-20)假設(shè)在第k層上的第j點,由于計算誤差得到不妨設(shè)k=0, j=0, ,即相當于FTBS格式寫成65第三節(jié) 收斂

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論