第二章 定常不可压势流的数值计算 chapter 2 numerical computation of steady...

33
第第第 第第第第第第第第第第第第 Chapter 2 Numerical computation of Steady Incompressi ble Potential Flow 2.1 第第第第第第第第第第第第 The Basic Equation of Incompressible Potential Flow 第第第第第第 第第第第第第第 第第第 Laplace 第第 When the flow is irrotational ,there must be exists the potential function ,and it is satisfies the Laplace Equation . 第第第第第第第第第第 In Cartesian coordinate ,the Laplace Equation is (2D) (3D) 2 0 0 xx yy zz 0 xx yy

Upload: muireann-chesney

Post on 30-Dec-2015

68 views

Category:

Documents


4 download

DESCRIPTION

第二章 定常不可压势流的数值计算 Chapter 2 Numerical computation of Steady Incompressible Potential Flow. 2.1 定常不可压势流的基本方程 The Basic Equation of Incompressible Potential Flow 当流场无旋时,存在速度势函数 , 应满足 Laplace 方程 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

第二章 定常不可压势流的数值计算Chapter 2 Numerical computation of Steady Incompressible Potential Flow

2.1 定常不可压势流的基本方程 The Basic Equation of Incompressible Potential Flow 当流场无旋时,存在速度势函数 , 应满足 Laplac

e 方程 When the flow is irrotational ,there must be exists the potential function ,a

nd it is satisfies the Laplace Equation .

在直角坐标系中可写成 In Cartesian coordinate ,the Laplace Equation is (2D)

(3D)

2 0

0xx yy zz

0xx yy

Page 2: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

在柱坐标系中 In cylindrical coordinate ,it is

计算出 ,即可得到 和 After gained ,the velocity and pressure can be obtained as follow

2 2

2 2 2

2 2 2

2 2 2 2

1 10 ( )

1 10 ( )

r r r r

r r r r z

二维轴对称

三维

V

p

2

2

,

1

2

V V V V

p v p const

Page 3: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

若流场中有源或者汇,则 If there exist a source or sink in the flow ,then

The equation becomes

2,V q Q

( )xx yy zz Q

Page 4: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

假设流场中源的分布(平面问题), Assume: the distribution of the source and sink is

following

the field within a cycle regime

则 PDE 为Therefore the PDE is

0 04r r r

00

, 0r

q qr

00

1rr r

rq

r r

0 0( , 4 ]r r r

2.2 由分布的源,汇引起的径向流动计算The computation of the flow introduced by the distributed source and sink .

Page 5: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

无量纲化参数 choose the dimensionless parameters as follows,

无量纲方程 the dimensionless equation becomes

0 0 0 0

, , rUrR U

r rV U

2

1( )d d

dRdR R dR

0 0 0/q r v

Page 6: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

流场区域 Flow field regained is limited as

此方程为二阶线性齐次方程,存在精确解This eq is a two order linear equation ,it has a accurate solution

对于

则,精确解为The accurate solution is

1 4R 1 4R

31ln

9R R

0

9, 24

3 24lnR R

Page 7: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

对应的方程阶为The corresponding PDE is

边界条件 R=1 时 B.C R=4 时

速度解The solution of velocity

19RR R R

R

1 64 24ln 4

2 242U R

R

Page 8: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

下面讨论其数值解 The numerical value solution will be discussed as following

一般线性二项齐次常微分方程边值问题: In general case , the 2D liner PDE can be written in to express , using centeral difference scheme, which has 2 order accuracy.

xf xxf

( ) ( ) ( )xx xf A x f B x f D x

min maxx x x

Page 9: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

将方程中 和 用中心差分格式表示(具有二阶精度)

微分方程可化为差分方程:Then ,the PDE can be written into FDE form.

xf xxf

1 1

1 12

1( )

21

( 2 )

x i i i

i i i i

f f f fh

f f f fh

x1if if 1if

1i i1i

hh

Page 10: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

1 1 1 12

1( 2 ) ( )

2i

i i i i i i i i

Af f f f f B f D

h h

1 1 2 3 1 4i i i i i i iC f C f C f C

That is

1 12i i

hC A 2

2 2i iC h B

其中:where

3 12i i

hC A 2

4i iC h D

Page 11: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

对于 n 各节点( i=1,2,3,……n ) , 上式构成一个线性方程组,可写为一个三对角矩阵For node number n , the series equations can be written as a linear equations, also can be express as a triangle array as following.

1

11 12 13 141

24221 22 23

34331 32 33

1,4,1 1,2 1,3 1

41 2 3

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

...... ... ... ... ... ... ... ... ...

0 0 0 0 0

0 0 0 0 0n nn n n

n nn n n

C C C Cf

CfC C C

CfC C C

CC C C f

f CC C C

Page 12: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

此线性方程组可用追赶法求解,也可用高斯法求解,还可以采用迭代法求解This linear equations can be solved using gauss method ,or Saidel iterative method对于源汇问题:For above distributed source problem

可以求出: The potential function can be solved ,and the velocity can be calculated .

( i=1,2,3,……n )

作业:用书上的程序计算出数值解,并与精确解进行比较。Question : using the fortran program provided in the text book (in p13) to get the numerical solution ,and compare the results with the accuracy solution.

( ) 1/A R R ( 0B R ) ( ) 9D R R

min 1R max 4R

i

hu iii 2

11

Page 13: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

用点源(汇)分布在对称轴上来模拟流体绕过任意旋转体

Source and sink are used to simulate the flow past a rotational body.

轴对称不可压流动流函数方程为: The steam function equation for axis-symmetric flow is :

该方程是线性方程,其通解为: It is a linear PDE , and the general solution is

2.3 旋转体绕流的数值解法(源、汇、偶极子)Numerical method for a Rotational Body Flow

(source , sink and doublets)

2 2

2 2

10

rZ r r

Page 14: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

上式代表点源 It denotes a flow introduced by a source.

可以用基本解叠加构成绕旋转体的解。 采用在 Z 轴上分布的源 ,使这些点源在物体表面各点的

扰动速度与自由来流叠加后在 法线方向都为 0. To distribute source and sink on the axis of the body and let the normal component of velocity on body surface zero.

各点处线源的流函数为 The stream function of the line source element on

2 2( )

jq ddr z

22ln),( zrczr

jq

d

Page 15: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

其中 为源的线密度线元 和 上的源流函数 :

stream function on linear source from to

jq

jZ 1jZ

1 2 2 2 21[ ( ) ( ) ]

J

j

Z

j j j jZd q r z z r z z

jZ 1jZ

P(zi,ri)

P(zj, rj)d(zj+1,rj+1)

Z

r

d

d(zj, rj)

Page 16: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

把 AB 分成 n 段,其总的流函数为:divide AB into n segments and the stream functi

on is :

在旋转体子午线上任意一点 上的流函

数为:for a point on the surface the stream function is :

2 2 2 2 21

1

1( , ) [ ( ) ( ) ]

2

n

j j jj

r z Ur q r z z r z z

( , )i ir z

2 2 2 2 21

1

1( , ) [ ( ) ( ) ]

2

n

i i j i i j i i jj

r z Ur q r z z r z z

Page 17: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

是一条流线上的点,通常称为零流线 Since is on the surface ,it is defined as zero streamline

• 令 ,

q /J jQ U

( , )i ir z

( , ) 0i ir z

( , )i ir z

2 2 2 2 21

1

1[ ( ) ( ) ] 0

2

n

i j i i j i i ji

Ur q r z z r z z

, , 1j i j i jd d d

表面为零流线

Page 18: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

则 then

上式是关于 的线性方程组,同时,要使 的总和为 0 ,即 which denotes a linear equations about ,and the total net volume flax inside the body must be zero, so:

2

1

1

2

n

j J ij

d Q r

JQJQ

JQ

1

0n

j Jj

S Q

总源强为零

Page 19: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

在物面上其 n-1 个点 ,构成 n-1 组线性方程,再加上面的方程即可构成线性方程:

n-1 points on surface and above equation construct a closed linear equations as following:

( , )i ir z

2

1

1

1( 1,2,......, 1)

2

0

n

j J ij

n

j Jj

d Q r i n

S Q

Page 20: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

求解此方程可得到 ,从而得到流线数解 和 solving this equation ,the source can be got .

JQ q j JQ

2 2 2 21 1

1

2 2 2 21 1

1 11 [ ]

( ) ( )

[ ]( ) ( )

n

jj j j

nj jJ

yj j j

Vx U Qy r z z r z z

z z z zUQV

x r r z z r z z

2 2 2 2 21

1

1[ ( ) ( ) ]

2

n

j j jj

Ur q r z z r z z

Page 21: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

利用伯努利方程可得: Using Bernoulli equation , then

2 2 2

2 2

1 1( )

2 2

1 ( ) ( )

x y

r zp

p p U V V

V VC

U U

Page 22: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

§2.4 椭圆型偏微分方程的数值解 Numerical solution of the ellipse PPE

二阶偏微分方程的一般形式 General form of 2nd order PPE

af xx+bf xy +cfyy=F(x,y,z,f,fx,fy)

● 具有三种可能的类型 It can be three following types

(1) 椭圆型(方程),当 b2-4ac<0

Ellipse, when

(2) 抛物型(方程),当 b2-4ac=0

Parabola ,when

(3) 双曲型(方程),当 b2-4ac>0

Hyperbola when

Page 23: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

以泊松方程为例说明椭圆型方程的数值解法To explain the numerical solution using a Possion equation

f x x + f y y=q (x , y) 2D Possion equation

用 i 代表 x 方向节点序号i denote the sequence where in x direction j 代表 y 方向节点序号j denote the sequence where in y direction左边界( 1, j )left右边界( m, j )Right内点 ( i, j )inner (1<i<m)上边界点( i, n ) (i=1,2…,m)

b2-4ac=0-4*1*1<0

Page 24: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

若△ x= y=h,△ 则上式可解为Give x= y=h,then△ △

jijijijijijiji qfffy

fffx ,1,,1,2,1,,12

)2()(

1)2(

)(

1

将 Possion 方程写成差分方程 To write the Possion equation into FDE

21, 1, , 1 , 1

1 1( )

4 4ij i j i j i j i j ijf f f f f h q

Up boundary下边界点( i, 1 ) (i=1,2…,m)

Low boundary内点 ( i, j ) (i=2,3…,m-1,j=2,3, …,n-1)

Inner point

Page 25: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

Laplace 调和函数的平均值定理 Average of the Laplace function

此式在给定边界值时构成一个 (m-2)*(n-2) 阶的代数方程组。可以用多种方法。 When the boundary value is known, it constructs a (m-2)*(n-2)order linear equations

直接法 direct method 矩阵求逆 Array LU 分解 decompose 迭代法 iterative method

Page 26: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

( 1) ( 1) ( ) ( 1) ( ) 21, 1, , 1 , 1

1 1( )

4 4 (i=2,3,4,.....,m-1,j=2,3,4,.....,n-1)

n n n n nij i j i j i j i j ijf f f f f h q

前三种方法要求的计算内存和计算时间长 The first three methods ned more memory and CPU time

迭代法:对计算机资源要求低(逐点迭代) Iteration method requires less resource of computer

每一点都同周围四点的最新值平均和当前点的原项值求解 Value on every points is the average of surroundings

Page 27: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

可以证明,当 n→ 时 , 将接近有限差分方程的解

It is proved that when n→ , will approach the DE solution.

( ),

ni jf

,i jf

( ),

ni jf

1

( ) ( ), , ,

( ) ( ) ( ) ( ) ( ), 1, 1, , 1 , 1

( 1) ( ) ( ) ( ) ( ), 1, 1, , 1 , 1

( ) (0)

1( )

41

4

11

4n

n ni j i j i j

n n n n ni j i j i j i j i j

n n n n ni j i j i j i j i j

NN

e f f

e e e e e

e e e e e

E EM

)0()( )4

11( EE N

MnM

Page 28: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

当节点数比较多时,迭代收敛很慢 When the number of node is large convergence will be slowly

超松弛迭代: Super-Relaxation iteration

把迭代计算结果作为中间值, The iterativation solution is give as median

( 1) ( 1) ( ) ( ) 2

1, , 1 , 1 1, ,

1( 0.5) ( )4

n n n n

i j i j i j i j i j

n f f f f h qf

Page 29: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

将 与 进行加权平均得到

The wrighted average of the and

或写成: or

( ),n

i jf1

( )2

,

n

i jf

( ),n

i jf1

( )2

,

n

i jf

1( )( 1) ( )2

, , ,(1 )nn n

i j i j i jf wf w f

1( )( 1) ( ) ( ) ( )2

, , , , , ,( ) ( 0,0 2)nn n n n

i j i j i j i j i j i jf w f f f f w f w w

Page 30: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

把两次迭代得到的差别(利用松弛因子对修正量进行放大或缩小)To apply the difference between the cuidial and calculated value当 时为弱松弛 When it is so called weak relaxation

当 时为超松弛 When it is so called weak relaxation

最佳超松弛因子 Optical best value of the Relaxation factor

0 1w 0 1w

1 2w 1 2w

2

2

8 4 4

cos cos

optw

m n

Page 31: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

例:不可压平面流通过二维容器(如图) Example 2D incompressible flow in a conduct

差分方程的迭代公式 iteration of the equation formula

边界条件: BC

容器的进口的体积流量为 AB 线上的任意一点与其表面上点的连线上 的体积流量为 1

2 2

2 20

x y

, , 1, 1, , 1 , 1(1 )

4i j i j i j i j i j i j

ww

0

1he

在 线上 onAB AB

在其余边界上 on other B

y

xmA B

n=17

0

Page 32: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow

小 结• 本章内容( contents )

定常不可压势流差分方法( FDM of elliptic PDE for steady incompressible potential flow )

定常不可压势流源汇法( Source and sink method for axis-symmetric incompressible flow )

椭圆型偏微分方程数值方法( Numerical method for elliptic PDEs )

本章重点( focus )椭圆型偏微分方程数值方法( Numerical method for ellipt

ic DEs )

Page 33: 第二章 定常不可压势流的数值计算 Chapter 2  Numerical computation of Steady Incompressible Potential Flow