李江飛,石兆東,段興華,李巖芳,張 康,逯國(guó)強(qiáng),陳穎超,任亞?wèn)|(承德石油高等專科學(xué)校熱能工程系,河北承德067000)
MAC算法計(jì)算二維方腔頂蓋流動(dòng)
李江飛,石兆東,段興華,李巖芳,張康,逯國(guó)強(qiáng),陳穎超,任亞?wèn)|
(承德石油高等專科學(xué)校熱能工程系,河北承德067000)
二維方腔流動(dòng)是不可壓縮黏性的典型流動(dòng),可以用來(lái)檢驗(yàn)各種數(shù)值算法計(jì)算精度和可靠性,目前尚不能求得它的解析解.基于Matlab編程,采用交錯(cuò)網(wǎng)格MAC算法求解二維方腔流動(dòng),計(jì)算采用控制容積積分法離散控制方程,對(duì)流項(xiàng)和擴(kuò)散項(xiàng)采用中心差分格式,得到流動(dòng)達(dá)到穩(wěn)定狀態(tài)時(shí)各物理量的分布.
數(shù)值模擬;方腔流動(dòng);控制容積積分法;MAC算法;離散
Li JF,ShiZD,Duan XH,etal.Calculation of Two-dimensionalCavity Flow Based on MAC[J].Journal of Yibin Univer?sity,2015,15(6):28-31.
二維不可壓縮黏性流體方腔流動(dòng)頂蓋拖動(dòng)速度為utop,方腔的長(zhǎng)度和高度均為H,流體密度為ρ、動(dòng)力粘度為 μ.邊界條件:流動(dòng)速度u、v采用無(wú)滑移邊界條件,利用動(dòng)量方程推導(dǎo)壓力p的邊界條件[1].
流動(dòng)與傳熱的控制方程如下:
其中,p為壓力,u、v分別為x、y方向速度分量.用高度H、流體密度ρ和拖動(dòng)速度utop作為無(wú)量綱標(biāo)尺,將控制方程無(wú)量綱化,流場(chǎng)初始狀態(tài)為靜止,R e=1000求流動(dòng)達(dá)到穩(wěn)定狀態(tài)時(shí),x方向中垂線(x=H/2)上的無(wú)量綱速度U,y方向中垂線(y=H/2)上的無(wú)量綱速度V,繪制出速度分布曲線,并求出中垂線上||U、||V的平均值.
1.1渦量控制方程無(wú)量綱化
以高度H、流體密度ρ和速度utop作為無(wú)量綱標(biāo)尺,將控制方程無(wú)量綱化[2]:
將上述無(wú)量綱量代入題中流動(dòng)與傳熱的控制方程,得出如下的無(wú)量綱方程:
1.2邊界條件
邊界條件為:流動(dòng)速度采用無(wú)滑移邊界條件,壁面處法向速度恒為0,切向速度也為零.頂蓋u=1,v=0;其余u=v=0.
采用均分網(wǎng)格,網(wǎng)格數(shù)80×80的交錯(cuò)網(wǎng)格來(lái)離散方程,將壓力和速度放在不同位置,壓力放在網(wǎng)格中心,以Pi,j為主節(jié)點(diǎn),背離P點(diǎn)的U、V與P點(diǎn)有相同的編號(hào),速度分量U與P在X方向位置相錯(cuò)半個(gè)網(wǎng)格,速度分量V與P在Y方向位置相錯(cuò)半個(gè)網(wǎng)格,具體如下[3]:
P:
X方向:0—81,左邊點(diǎn)0,右邊點(diǎn)81,邊點(diǎn)與內(nèi)點(diǎn)距離為,其余ΔX;Y方向:0—81,下邊點(diǎn)0,上邊點(diǎn)81,邊點(diǎn)與內(nèi)點(diǎn)距離,其余ΔY;
U:
X方向:0—80,左邊點(diǎn)0,右邊點(diǎn)80,相鄰兩點(diǎn)距離ΔX;Y方向:0—81,下邊點(diǎn)0,上邊點(diǎn)81,邊點(diǎn)與內(nèi)點(diǎn)距離,其余ΔY;
V:
對(duì)于MAC算法而言,采用交錯(cuò)網(wǎng)格,用控制容積積分法離散控制方程,對(duì)流項(xiàng)和擴(kuò)散項(xiàng)采用中心差分格式.時(shí)間步長(zhǎng)為Δτ,空間步長(zhǎng)為ΔX、ΔY.
對(duì)速度分量U進(jìn)行離散[4-5]:
內(nèi)點(diǎn)處理:
非穩(wěn)態(tài)項(xiàng):
對(duì)流項(xiàng):
擴(kuò)散項(xiàng):
壓力項(xiàng):
邊界點(diǎn)處理:
對(duì)于上邊界點(diǎn),擴(kuò)散項(xiàng):
對(duì)于下邊界點(diǎn),擴(kuò)散項(xiàng):
內(nèi)點(diǎn)離散后的動(dòng)量方程為:
對(duì)速度分量V進(jìn)行離散:
內(nèi)點(diǎn)處理:
非穩(wěn)態(tài)項(xiàng):
對(duì)流項(xiàng):
擴(kuò)散項(xiàng):
壓力項(xiàng):
對(duì)于左邊界點(diǎn),其擴(kuò)散項(xiàng):
對(duì)于右邊界點(diǎn),其擴(kuò)散項(xiàng):
離散后的動(dòng)量方程為:
整理化簡(jiǎn)可得壓力離散方程:
其中:aP=aE+aW+aN+aS,aE=aW=aN=
求解步驟如下[6-8]:
①確定網(wǎng)格信息,如空間步長(zhǎng)、時(shí)間步長(zhǎng):ΔX,ΔY,Δτ;②定義變量,給速度場(chǎng)和壓力場(chǎng)賦初始值和邊界值;③經(jīng)過(guò)(1)、(2),可得完整的速度場(chǎng)離散結(jié)果,據(jù)公式求;④根據(jù)(3)求解壓力泊松方程,采用Gauss-Seidel迭代求解,循環(huán)直至滿足收斂條件;⑤用該時(shí)層滿足收斂條件最新的壓力場(chǎng)去更新速度場(chǎng),得到下一時(shí)層的,;⑥用下一時(shí)層的,返回(4),直到穩(wěn)態(tài)的解,求出速度場(chǎng)和壓力場(chǎng).程序流程如圖1所示.
圖1 求解程序框圖
圖2 方腔壓力場(chǎng)分布圖(N=80;R e=400;t=0.0005,0.001,0.002,0.005,0.01)
圖3 方腔中心速度分布比較圖(N=20,40,80;R e=1000)
[1]Peng Y F,Shiau Y H,Hwang R R.Transtion in a 2-D lid-driven cavity flow[J].Computer&Fluids,2003,32(3):337-352.
[2]陶文銓.數(shù)值傳熱學(xué)[M].第二版.西安:西安交通大學(xué)出版社,2010.
[3]Abdallah S.Numerical solutions for the pressure poisson equation with neumann boundary conditions using a non-staggered grid[J].Journalofcomputationalphysics,1987,70(1):182-192.
[4]Hortmann M,Peri?M,ScheuererG.Finite volumemultigrid predic?tion of laminar natural convection:Bench-mark solutions[J].Inter?national Journal for Numerical Methods in Fluids,1990,11(2):189-207.
[5]Demird?i?I,Peri?M.Finite volumemethod for prediction of fluid flow in arbitrarily shaped domainswithmoving boundaries[J].Inter?national Journal for Numerical Methods in Fluids,1990,10(7):771-790.
[6]Brandt A.Multi-level adaptive technique(MLAT)for fast numeri?cal solution to boundary value problems[C].Proceedings of the Third International Conference on NumericalMethods in Fluid Me?chanics,Springer Berlin/Heidelberg,1973:82-89.
[7]Wang J,Li JF,ChengW X,et al.Comparison of finite difference and finite volume method for numerical simulation of the incom?pressible viscous driven cavity flow[J].Advanced Materials Re?search,2013(732-733):413-416.
[8]Li JF,Long J,Yuan L A,etal.Comparison of finite difference and finite volumemethod for numerical simulation of driven cavity flow based on MAC[C].Computational and Information Sciences(IC?CIS),2013 Fifth International Conference on,Shiyang,2013:891-894.
(編校:許潔)
Calculation of Tw o-dimensionalCavity Flow Based on MAC
LIJiangfei,SHIZhaodong,DUAN Xinghua,LIYanfang,ZHANG Kang,LUGuoqiang,CHEN Yingchao,REN Yadong
(DepartmentofThermalEngineering,ChengdePetroleum College,Chengde,Hebei067000,China)
Two-dimensional square cavity flow is a typical incompressible viscous flow,which can be used to testa vari?ety ofnumericalalgorithms for computationalaccuracy and reliability,yet itsanalytical solution still cannotbe achieved.Based on Matlab programming,the staggered grid MAC algorithm was used to solve two-dimensional square cavity flow.Control volume integralmethod was used to discrete the control equations for calculation.Central difference scheme was applied for convection and diffusion terms.In the end,the flow simulation resultsofeach physicalquantity distribution in steady statewere obtained.
numericalsimulation;cavity flow;controlvolumemethod;MAC;discrete
TB126
A
1671-5365(2015)06-0028-04
2015-04-12修回:2015-04-17
李江飛(1988-),男,講師,碩士,研究方向?yàn)橛蜌鈨?chǔ)運(yùn)
網(wǎng)絡(luò)出版時(shí)間:2015-04-21 20:46網(wǎng)絡(luò)出版地址:http://www.cnki.net/kcms/detail/51.1630.Z.20150421.2046.001.html
引用格式:李江飛,石兆東,段興華,等.MAC算法計(jì)算二維方腔頂蓋流動(dòng)[J].宜賓學(xué)院學(xué)報(bào),2015,15(6):28-31.