Document

advertisement
MHD现代算法介绍
张嫚
2011.03.24
主要内容
1
MHD算法简介
2
MHD算法存在的主要问题
3
MHD在太阳风模拟中应用
1
MHD算法简介
理想MHD方程
Classical schemes
迎风差分格式
Unj 1  Unj  r  U nj  U nj 1  , a  0
Unj 1  Unj  r  U nj 1  U nj  , a  0
Lax单步差分格式
U nj 1 
1
1
n
n
U

U

r  U nj 1  U nj 1 

j 1
j 1 
2
2
迎风差分格式Lax单步差分格式是一阶精度,耗散
效应很强,激波会被拉宽或抹平,不存在色散效应,因
此不会出现振荡
Lax-Wendroff scheme
Uin1  Uin 
1 at n
1 at 2 n
n
U

U

(
)  Ui 1  2Uin  Uin1 

i 1
i 1 
2 x
2 x
MacCormack scheme
t
F jn  F jn1 

x
1
1 t
n
n 1/ 2
 U j  U j

F jn11/ 2  F jn 1/ 2 


2
2 x
U nj 1/ 2  U nj 
U nj 1
Lax-Wendroff 和MacCormack都是二阶精度,耗散效
应很弱,存在色散效应,激波附近会产生振荡
Others like Warming-Beam, Rusanov,etc.
Riemann Solvers
从流动的物理特性出发,采用间断分解概念求
解流动方程组,在相邻的网格单元之间形成一个局
部Riemann问题,转化为求解黎曼问题,在此基础上
发展了一系列Riemann solvers
Godunov Riemann solvers
流动量在每个网格内以常数分布求解过程物理概念
清晰,能较好反应流动特性,计算效果较好,但是
该算法只有一阶精度。
发展高阶精度的Godunov 是必要的,MUSCUL和
PPM差分算法是这方面的典型
要获得黎曼精确解是非常复杂的,并且很
大程度上也没有必要,因此数值方法上很少涉
及到精确解,广泛应用的是近似的黎曼解,下
面介绍几种常用的近似黎曼解
Roe (linearized) type solvers
假定间断面两侧流动量常数分布,构造一个合理
的线性近似系数矩阵 A  UL , UR  来代替非线性Jiacobian
系数矩阵 A  UL , UR  把非线性矢量方程转化为线性矢量方
程,求出近似解
HLL (non linear) type solvers
These non-linear solvers are based on approximating
the wave structure of the full Riemann problem by a
simplified wave structure
HLL
Riemann solver
.
SR  x / t
SL  x / t
U*
UR
这种方法可以保持正压,保持正压在low-beta是
非常重要的,但是具有较强的耗散性,在此基础上
发展的HLLC和HLLE克服这一缺点
HLLC Riemann solver
The HLLC flux based on the approximate Riemann
solver is a modification to account for the shortcoming of
the HLL flux offset the influence of intermediate waves
HLLD Riemann solver
High resolution comparable to Roe scheme
HLLE, HLLEM .etc
2
MHD算法存在的主要问题
保正性
MHD模拟的困难之一就是保持压力为正,由于MHD总能
量包含三个分量:内能,磁能和动能,在low-beta区域,
磁能相比于动能很大,因此,在计算总能量,动能和磁
能时产生的离散误差很大程度上很导致负压的产生,出
现非物理解。为了保持正压性,我们在局部区域用熵密
度方程或者压强方程来代替能量方程求解MHD方程,为
此我们需要用开关函数来判断可能出现负压的地方参考
(Dinshaw S. Balsara* and Daniel Spicer. Jcp)给出开关函数
It consists of 3 sub-switches which includes or excludes some
flow conditions.
Switch 1 (SW1 for short) is designed to indicate whether
the pressure is very low. So SW1 is on when
and it is switched off in other situations,
Switch 2 the second switch SW2 is intended to exclude the
regions of strong magnetosonic shocks. This is accomplished
by ensuring that the local minima and maxima pressure are not
too far apart. It is on when
The third switch SW3 is used to exclude the regions where
mildly compressive motions(also strong compressive motions)
may take place. It is on when
can be adjusted in different situations.
Typically, we use
and the pressure equation is used only when all of the
three switches are on
保持磁场散度为零
MHD不同于Euler方程的就是存在磁场效应,如何处理磁
场使之散度为零也是求解MHD的一个重要方面,有很多
种方法可以用来处理磁场
Projection method, 8-wave formulation,
Constrained Transport (CT) method, Central difference
Diffusive control,GLM-MHD, Vector potential
Hyperbolic divergence cleaning
Splitting-based schemes
Projection method
在每个计算一个时间步之后对磁场进行更新
8-wave formulation
在方程右边加入Powell源项

   v  0
t


 v
B2
    vv  pI 
I  BB   B B
t
2


e

t

 B2

v
e

p

v
I

BB




   B v B
2



B
   vB  Bv    v B
t
The eight-wave scheme is computationally inexpensive,
easy to add an existing code, and quite robust,
Constrained Transport (CT) method
采用交错网格方法,计算面上的磁场,
之后将其投影到网格中心处
这种方法是严格守恒的,可以通过不同的构造电场磁
场方法达到高阶精度,但是延伸到一般的网格上比较困难,
不能直接应用于AMR
Central difference
CD算法是在简化CT算法基础上发展的,在时间和空
间上都是二阶精度
Diffusive control
Modifying the magnetic equation by adding a source term
proportional to the gradient of divergence B so that the
divergence satisfies an advection-diffusion equation
This technique, referred as diffusive control of divergence B ,
has the same advantages and disadvantages as eight-wave
approach, but appears to keep the level of divergence B lower
than the eight-wave approach
GLM-MHD
采用9个方程来控制divergence B
hyperbolic correction
Hyperbolic divergence cleaning
显式的抛物型方法中 C p 的取值受到稳定性条件的限制,
结果不是很满意,为了克服这一缺点,将抛物型和双曲
型方法结合起来
Vector potential
use vector potential A as the primary variable instead of B,
and the divergence free property is automatically ensured
3
MHD在太阳风模拟中应用
——球坐标下太阳风模拟
目前太阳风模拟大多是在直角坐标系下进行,
计算量比较大,直接应用于AMR比较困难,鉴
于计算区域为球面网格划分,所以考虑在球坐标
下实现太阳风模拟,达到稳定所需时间比较短,
关于磁场处理部分,用一种可以直接应用于AMR
的CT方法实现,不用求解Possion方程,大大减
少了计算量
模拟区域
rL  1, rU  20
L  0,U  
L  0,U  2
方程形式
考虑太阳自传,Powell 源项,加速加热,磁场分裂
直角坐标下

球坐标下
a
1 a
1 a
er 
e 
e
r
r 
r sin  
1 
1

1

  f  2  r 2 fr  
f 
 sin  f  

r r
r sin  
r sin  
a 
f 
1
r sin 
 
f 
1  1 f r   rf r  
1    rf  f r 
sin

f

e


e



 

 e

r
  

 
r  sin  
r 
r  r
 

数值方法
有限体积法,将流场和磁场分开处理,磁
场部分用CT方法,采用一种新 central scheme
的方法,不需要求解黎曼问题,也不需要求解
特征值和特征向量,该方法适应于任何坐标,
半离散形式,时间上用两步 Runge-kutta 法达
到二阶精度
符号说明
流场重构
用线性重构达到二阶精度
流场离散形式
磁场重构
满足
二阶精度,其余方向上的重构类似
磁场离散形式
CT方法在面上对磁场进行离散,左边均为面上的
平均值,之后有面上的值可以得到体积平均的磁场
计算区域考虑整个球面时,在极区离散方程会存在奇
异性,需要特别处理
流场流通量计算
每个小单元被分割为27
部分,以边和脚点为中
心的矩形单元,以面为
中心的非矩形单元,剩
余的内部区域
分割依据:在 t 时间
内,由边界上产生的波
并没有影响到内部区域
这样每个小单元的边界
边界上流通量的计算直接求积方法
上都是光滑的,
每个小单元上面27个区域同时进行更新,之后把结
果投影到单元中心上,得到新时刻体平均上的流体
变量的值
电场计算
类似于流场,用周围
四点的值投影到计算
区域
边沿速度的确定
源项处理
不能简单用体心或者几何中心的值来近似体
平,那样不能达到二阶精度,由于三角函数的
存在,源项众不同部分取单元中不同位置的值,
以此可以写出不同源项的表达式,这里不再一
一列举
当源项中包含有Powell源项时,需要考虑
divergence B在极区的奇异性,另外就是用CT处
理磁场时,需要计算divergence B在面上的表示
初始输入
用太阳表面参数进行无量钢化,利用太阳风Parker解
偶极场或者螺旋磁场作为初值
B0
sin  e
2
r
2B
B
Br  3 0 cos  , B  30 sin 
r
r
B    A, A 
偶极场
螺旋磁场
边界条件
在半径方向上采用固定边界条件
Download