华北电力大学本科毕业设计(论文)
二维抛物方程的有限差分法
摘要
二维抛物方程是一类有广泛应用的偏微分方程,由于大部分抛物方程都难以求得解析解,故考虑采用数值方法求解。有限差分法是最简单又极为重要的解微分方程的数值方法。本文介绍了二维抛物方程的有限差分法。
首先,简单介绍了抛物方程的应用背景,解抛物方程的常见数值方法,有限差分法的产生背景和发展应用。讨论了抛物方程的有限差分法建立的基础,并介绍了有限差分方法的收敛性和稳定性。其次,介绍了几种常用的差分格式,有古典显式格式、古典隐式格式、Crank-Nicolson隐式格式、Douglas差分格式、加权六点隐式格式、交替方向隐式格式等,重点介绍了古典显式格式和交替方向隐式格式。进行了格式的推导,分析了格式的收敛性、稳定性。并以热传导方程为数值算例,运用差分方法求解。通过数值算例,得出古典显式格式计算起来较简单,但稳定性条件较苛刻;而交替方向隐式格式无条件稳定。
关键词:二维抛物方程;有限差分法;古典显式格式;交替方向隐式格式
I
华北电力大学本科毕业设计(论文)
FINITE DIFFERENCE METHOD FOR TWO-DIMENSIONAL PARABOLIC
EQUATION
Abstract
Two-dimensional parabolic equation is a widely used class of partial differential
equations. Because this kind of equation is so complex, we consider numerical methods instead of obtaining analytical solutions. finite difference method is the most simple and extremely important numerical methods for differential equations. The paper introduces the finite difference method for two-dimensional parabolic equation.
Firstly, this paper introduces the background and common numerical methods for Parabolic Equation, Background and development of applications. Discusses the basement for the establishment of the finite difference method for parabolic equation And describes the convergence and stability for finite difference method.Secondly, Introduces some of the more common simple differential format,for example, the classical explicit scheme, the classical implicit scheme, Crank-Nicolson implicit scheme, Douglas difference scheme, weighted six implicit scheme and the alternating direction implicit format. The paper focuses on the classical explicit scheme and the alternating direction implicit format. The paper takes discusses the derivation convergence,and stability of the format . The paper takes And the heat conduction equation for the numerical example, using the differential method to solve. Through numerical examples, the classical explicit scheme is relatively simple for calculation, with more stringent stability conditions; and alternating direction implicit scheme is unconditionally stable.
Keywords: Two-dimensional Parabolic Equation; Finite-Difference Method; Eclassical
Explicit Scheme; Alternating Direction Implicit Scheme
II
华北电力大学本科毕业设计(论文)
目 录
摘要 .................................................................................................................................................. I Abstract .......................................................................................................................................... II 1绪论 .............................................................................................................................................. 1 1.1课题背景 ................................................................................................................................... 1 1.2发展概况 ................................................................................................................................... 1 1.2.1抛物型方程的常见数值解法 ................................................................................................ 1 1.2.2有限差分方法的发展 ............................................................................................................ 2 1.3差分格式建立的基础 ............................................................................................................... 3 1.3.1区域剖分 ................................................................................................................................ 3 1.3.2差商代替微商 ........................................................................................................................ 3 1.3.3差商代替微商格式的误差分析 ............................................................................................ 4 1.4本文主要研究内容 ................................................................................................................... 5 2显式差分格式 .............................................................................................................................. 7 2.1常系数热传导方程的古典显式格式 ....................................................................................... 7 2.1.1古典显式格式格式的推导 .................................................................................................... 7 2.1.3古典显式格式的算法步骤 .................................................................................................... 8 3隐式差分格式 ............................................................................................................................ 10 3.1古典隐式格式 ......................................................................................................................... 10 3.2 Crank-Nicolson隐式格式 ...................................................................................................... 12 3.3 Douglas差分格式 ................................................................................................................... 13 3.4加权六点隐式格式 ................................................................................................................. 14 3.5交替方向隐式格式 ................................................................................................................. 15 3.5.1 Peaceman-Rachford格式 .................................................................................................... 15 3.5.2 Rachford-Mitchell格式 ....................................................................................................... 15 3.5.3 Mitchell-Fairweather格式 ................................................................................................... 15 3.5.4交替方向隐式格式的算法步骤 .......................................................................................... 16 4实例分析与结果分析 ................................................................................................................ 17 4.1算例 ......................................................................................................................................... 17 4.1.1已知有精确解的热传导问题 .............................................................................................. 17 4.1.2未知精确解的热传导问题 .................................................................................................. 19 4.2结果分析 ................................................................................................................................. 20 5稳定性探究与分析 .................................................................................................................... 21 5.1稳定性问题的提出 ................................................................................................................. 21
华北电力大学本科毕业设计(论文)
5.2 几种分析稳定性的方法 ........................................................................................................ 21 5.3 r变化对稳定性的探究 ........................................................................................................ 23 5.3.1 古典显式格式的稳定性 ..................................................................................................... 23 5.3.2 P-R格式格式的稳定性 ....................................................................................................... 24 结语 ............................................................................................................................................... 26 参考文献 ....................................................................................................................................... 27 附录 P-R格式的C++实现代码 ................................................................................................. 28 致谢 ............................................................................................................................................... 30
华北电力大学本科毕业设计(论文)
1绪论
1.1课题背景
抛物方程是一类特殊的偏微分方程,二维抛物方程的一般形式为
?u?Lu (1-1) ?t其中
L??u?u?u?u?u?u(a1(x,y,t))?(a2(x,y,t))?b1(x,y,t)?b2(x,y,t)?C(x,y,t) ?x?x?y?y?x?ya1?0,a2?0,C?0。[1]
渗流、扩散和热传导、静电场等很多领域经常会遇到求解二维抛物型方程。微分方程愈复杂,找出解的解析表达式愈困难。对大部分的抛物方程而言,找出解的解析表达式及其困难。因此求出抛物方程的近似解是很有意义的[1]。
本文研究的近似方法是数值方法,目标在于给出解在一些离散点上的近似解值。常见的数值求解方法有有限差分法,有限元法,有限体积法等。有限差分法(Finite Difference Methed)是在1966年Yee提出的,用于解决电机工程中电磁场的初值和边值问题[2]。有限差分法得到迅速发展后,不仅广泛应用于自然科学,在社会科学的各领域也在越来越多地被应用着[2]。某些常用的数值解法,欧拉方法,隐式欧拉法,一般单步法,Crank-Nicolson隐式格式,Runge-Kutta方法等,已成为微分方程数值解领域的经典方法.,在工程计算中的应用随处可见[1];基于这些方法,人们也在做更深的研究。
采用有限差分法解决二维抛物方程,一些研究者采用一维抛物型方程的古典显格式,古典隐格式,Crank-Nicolson隐式格式,加权六点隐格式等的直接推广;还有有一些研究者采用交叉方向的隐式差分格式(Alternating Direction Implicit Scheme)等基于二维的方法。
1.2发展概况
1.2.1抛物型方程的常见数值解法
抛物型方程的常见数值解法有有限差分法,有限元法,有限体积法,有限单元法,无网格方法等。
有限差分法(Finite Difference Methed)的主要思想是将问题离散化,将问题离散化,用差商代替微商,将微分方程和定界问题都用代数方程来代替。然后解这些代数问题构成的方程组。该方法包括区域剖分和差商代替导数两个过程。具体地,首先将求解区域划分为差分网格,用有限个网格节点代替连续的求解区域。其次,利用Taylor级数展开等方法将偏微分方程中的导数项在网格节点上用函数值的差商代替来进行离散,从而建立以网格节点上的值为未知量的代数方程组[1]。
1