第二章定常不可压势流的数值计算Chapter 2 Numerical computation

advertisement
第二章 定常不可压势流的数值计算
Chapter 2 Numerical computation of Steady Incompressible 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 2satisfies the Laplace Equation .
  0
在直角坐标系中可写成
In Cartesian coordinate
xx  yy ,the0 Laplace Equation is
xx  yy  zz  0
(2D)
(3D)
在柱坐标系中
In cylindrical coordinate ,it is
 2 1  1  2

 2
0
(二维轴对称)
2
2
r
r r r 
 2 1  1  2  2

 2
 2 0
(三维)
2
2
r
r r r 
z

V
p
计算出 ,即可得到 和
V  
,
V 2  V V
After gained ,the velocity and pressure can be obtained as follow
1
p   v 2  p  const
2
若流场中有源或者汇,则
If there exist a source or sink in the flow ,then
V  q,
即
 2  Q
The equation becomes
xx  yy  (zz )  Q
2.2 由分布的源,汇引起的径向流动计算
The computation of the flow introduced by the distributed source and sink .
假设流场中源的分布(平面问题),
r0  r  4r0
Assume: the distribution of the source and sink is
r  (r0 , 4r0 ]
following
r cycle
 regime
the field within
a
q  q0 ,
0
r0 
则PDE为 1
r
 rr   r  q0
r
Therefore the PDE
is r0
无量纲化参数
choose the dimensionless parameters as follows,
Ur
r

R  , 
,U 
r0
r0V0
U0
无量纲方程
the dimensionless equation becomes
d
1 d
( 2
)  dR
dR
R dR
  q0 r0 / v0
1

R

4
流场区域
1 R  4
Flow field regained is limited as
此方程为二阶线性齐次方程,存在精确解
This eq is a two order linear equation ,it
 0has a accurate
1
solution
   R 3   ln R  
  9,   24
9
对于
则,精确解为
The accurate solution is
  R3  24ln R
对应的方程阶为
The corresponding PDE is
 RR 
1
 R  9R
R
边界条件 R=1时1 64  24 ln 4
B.C
R=4 时
速度解
24
The solution of U
velocity
2
 2R 
R
下面讨论其数值解The numerical value solution will be discussed as
following
一般线性二项齐次常微分方程边值问题:
In general case , the 2D liner PDE can be written in to express f x ,f xx
using centeral difference scheme, which has 2 order accuracy.
f xx  A( x) f x  B( x) f  D( x)
xmin  x  xmax
将方程中
fx
和
f xx
用中心差分格式表示(具有二阶精度)
1
f x  f i 
( f i 1  f i 1 )
2h
1

f i  2 ( f i 1  2 f i  f i 1 )
h
微分方程可化为差分方程:
Then ,the PDE can be written into FDE form.
i 1
h
fi
i
h
f i 1
i 1
x
f i 1
Ai
1
(
f

2
f

f
)

( fi 1  fi 1 )  Bi fi  Di
i 1
i
i 1
2
h
2h
That is
Ci1 fi 1  Ci 2 fi  Ci 3 fi 1  Ci 4
其中:
where
h
Ci1  1  Ai
2
Ci 2  2  h2 Bi
h
Ci 3  1  Ai
2
Ci 4  h2 Di
对于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.
C11 C12

 0 C21
 0 0

 ... ...
 0 0

 0 0
0
0
0
0
C22 C23
0
0
0
C13
0
0
C31 C32 C33
...
...
... ... ...
0 0 C n1 ,1 Cn1,2 Cn1,3
0
0
0
Cn1
Cn 2
0   f1  C14 
  

0   f 2  C24 
0   f3  C34 
   

...  ...  ... 
0   f n1  Cn1,4 
  

Cn3   f n  Cn 4 
此线性方程组可用追赶法求解,也可用高斯法求解,还可
以采用迭代法求解
This linear equations can be solved using gauss method ,or Saidel iterative
method
对于源汇问题:
For above distributed source problem
A( R)  1/ R
B( R) 0
Rmin  1
R max  4
D( R)  9R
可以求出:The potential function can be solved ,and the velocity can be
calculated .
i (i=1,2,3,……n)
i 1  i 1
ui 
2h
作业:用书上的程序计算出数值解,并与精确解进行比较。
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.
2.3旋转体绕流的数值解法(源、汇、偶极子)
Numerical method for a Rotational Body Flow
(source , sink and doublets)
 用点源(汇)分布在对称轴上来模拟流体绕过任意旋
转体
Source and sink are used to simulate the flow past a rotational
body.
轴对称不可压流动流函数方程为:
The steam function equation for axis-symmetric flow is :
 2 1   2

 2 0
2
Z
r r
r
该方程是线性方程,其通解为:
It is a linear PDE , and the general solution is
 (r, z)  c ln r  z
2
2
上式代表点源
It denotes a flow introduced by a source.
qj
可以用基本解叠加构成绕旋转体的解。
采用在Z轴上分布的源
,使这些点源在物体表面各点的
扰动速度与自由来流叠加后在 法线方向都为0. To distribute
source and sink on the axis of the body and let the normal
component of velocity on body surface zero. d
 各点处线源的流函数为
q j d
The stream function
d ofthe line source element on
r  (z   )
2
2
Z
Z
其中q j 为源的线密度线元
函数 :
j
j 1
和
上的源流
Z
stream function on linear source
from
j
Z j 1
to
Z J 1
r j   d  q j [ r 2  ( z  z j 1 )2  r 2  ( z  z j )2 ]
Z
j
P(zi,ri)
d(zj, rj)
d(zj+1,rj+1)
P(zj, rj)
d
Z
把AB分成n段,其总的流函数为:
divide AB into n segments and the stream
function is :
1
 (r , z )  Ur   q [ r  ( z  z )  r  ( z  z ) ]
2
n
2
2
j 1
j
j 1
2
2
2
j
(ri , zi )
在旋转体子午线上任意一点
上的流函
n
1
2
数为:
 (ri , zi )  Ur   q j [ ri 2  ( zi  z j 1 )2  ri 2  ( zi  z j )2 ]
2
j 1
for a point on the surface the stream function is :
(ri , zi )
Since
(ri , zi )
是一条流线上的点,通常称为零流线
is on the surface ,it is defined as zero streamline
表面为零流
线
 (ri , zi )  0
1 2 n
Uri   q j [ ri 2  ( zi  z j 1 )2  ri 2  ( zi  z j )2 ]  0
2
i 1
QJ  q j / U
• 令
,
d j  di , j  di , j 1
则 then
n
1 2

d
Q

ri

j J
2
j 1
Q
Q
上式是关于
的线性方程组,同时,要使
的总和为0,即 which denotes a Qlinear
J
J
J
equations about
,and the total
net volume
总源强为
零 so:
flax inside the body must be zero,
S Q  0
n
j 1
j
J
(ri , zi )
在物面上其n-1个点
,构成n-1组线性
方程,再加上面的方程即可构成线性方程:
n-1 points on surface and above equation
construct a closed linear equations as following:
1 2
 n
 d j QJ  2 ri (i  1, 2,......, n  1)
 j 1
 n
 S Q 0

j J

 j 1
QJ
求解此方程可得到
和
qj
QJ
,从而得到流线数解
solving this equation ,the source can be got .
1 2 n
  Ur   q j [ r 2  ( z  z j 1 )2  r 2  ( z  z j )2 ]
2
j 1



n


1
1


Vx  
 U 1   Q j [

]

y
r 2  ( z  z j 1 ) 2
r 2  ( z  z j ) 2 
 j 1

n
z  z j 1
z  z j

UQJ

 
[

]
Vy 
2
2
2
2
x
r
j 1
r  ( z  z j 1 )
r  ( z  z j )

利用伯努利方程可得:
Using Bernoulli equation , then
1
1
2
p  p  U   (Vx2  Vy2 )
2
2
Vr 2 Vz 2
Cp  1 ( )  ( )
U
U
§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
以泊松方程为例说明椭圆型方程的数值解法
b2-4ac=04*1*1<0
To explain the numerical solution using a Possion equation
f x x + f y y=q (x , y)
用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)
2D Possion equation
Up boundary
下边界点(i, 1)(i=1,2…,m)
Low boundary
内点
(i, j)(i=2,3…,m-1,j=2,3, …,n-1)
Inner point
将Possion 方程写成差分方程
To write the Possion equation into FDE
1
1
(
f

2
f

f
)

( f i , j 1  2 f i , j  f i , j 1 )  qi , j
i 1, j
i, j
i 1, j
2
2
(x)
(y)
若△x= △y=h,则上式可解为
Give △x= △y=h,then
1
1 2
f ij  ( f i 1, j  f i 1, j  f i , j 1  f i , j 1 )  h qij
4
4
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
前三种方法要求的计算内存和计算时间长
The first three methods ned more memory and CPU time
迭代法:对计算机资源要求低(逐点迭代)
Iteration method requires less resource of computer
1 ( n1)
1 2
( n)
( n1)
( n)
f ij  ( f i1, j  f i1, j  f i , j 1  f i , j 1 )  h qij
4
4
(i=2,3,4,.....,m-1,j=2,3,4,.....,n-1)
( n1)
每一点都同周围四点的最新值平均和当前点的原项值求解
Value on every
points is the average of surroundings
( n)
f
可以证明,当 n→  时 ,
i , j 将接近有限差分
方程的解 f i , j
 , f ( n)i , j will approach the DE solution.
It is proved that when n→
ei(,nj)  f
(n)
i, j
 fi , j
1 (n)
 (ei 1, j  ei(n1,) j  ei(,nj)1  ei(,nj)1 )
4
1  ( n)
( n 1)
ei , j

ei 1, j  ei(n1,) j  ei(,nj)1  ei(,nj)1 

4
ei(,nj)

1  1
(N
( nM
n 1 ) )
E

E
14MM
 1(

4
N
N (0) ( 0 )
)E
E
当节点数比较多时,迭代收敛很慢
When the number of node is large convergence will be slowly
超松弛迭代:
Super-Relaxation iteration
把迭代计算结果作为中间值,
The iterativation solution is give as median

(n0.5)  1 ( f ( n1)  f ( n1)  f ( n)  f ( n) )  h2 q
i 1, j
i , j 1
i , j 1
i 1, j
i, j
f
4
将
f i (, nj )
与
1
(n )
fi , j 2
进行加权平均得到
The wrighted average of the
fi (, nj )
(n
f i (, nj 1)  wf i , j
and
1
)
2
1
(n )
fi , j 2
 (1  w) f i (, nj )
或写成:or
1
(n )
fi(, nj 1)  w( fi , j 2
 fi(, nj ) )  fi(, nj )  fi(, nj )  w fi , j (w 0,0 w 2)
把两次迭代得到的差别(利用松弛因子对修正量进行放
大或缩小)
To apply the difference between the cuidial and calculated value
当 0 w 1 时为弱松弛
When 0 w 1 it is so called weak relaxation
当 1  w
When 1 
2 时为超松弛
w 2 it is so called weak relaxation
最佳超松弛因子
Optical best value of the Relaxation factor
wopt 
8  4 4  2
2
 
 
  cos  m  cos  n
例:不可压平面流通过二维容器(如图)
Example 2D incompressible flow in a conduct
y



0
2
2
x
y
2
2
n=17
差分方程的迭代公式
iteration of the equation formula
w
 i , j  (1  w) i , j   i1, j  i1, j  i , j1  i , j1 
4
边界条件: he  0
BC

  1
0
在 AB 线上 on AB
A
B
m
在其余边界上 on other B
容器的进口的体积流量为AB线上的任意一点与其表面上点的连线上
的体积流量为1
x
小 结
• 本章内容(contents)
 定常不可压势流差分方法(FDM of elliptic PDE for
steady incompressible potential flow)
 定常不可压势流源汇法(Source and sink method for axissymmetric incompressible flow)
 椭圆型偏微分方程数值方法(Numerical method for
elliptic PDEs)
 本章重点(focus)
 椭圆型偏微分方程数值方法(Numerical method for
elliptic DEs)
Download