有限体积法求解二维方腔流(二)——边界条件处理及SIMPLE和PISO算法

本文详细介绍了有限体积法在处理二维方腔流问题中的边界条件,涵盖左、右、上、下边界及边角处理,并探讨了SIMPLE和PISO算法在速度-压力耦合求解策略中的应用。通过OpenFOAM代码解析,解释了solve函数的作用以及phi变量的用途。
摘要由CSDN通过智能技术生成

关于动量方程和连续性方程的离散参考这里

1.5. 边界处理

1.5.1. 左边界, u w = v w = 0 u_w=v_w=0 uw=vw=0,不包括边角

  • 对流项
    ∑ F f n U f n + 1 = ( − u w n h ) U w n + 1 + ( u e n h ) U e n + 1 + ( − v s n h ) U s n + 1 + ( v n n h ) U n n + 1 = h 4 [ ( u P n + u E n + v N n − v S n ) U P n + 1 + ( u P n + u E n ) U E n + 1 − ( v P n + v S n ) U S n + 1 + ( v P n + v N n ) U N n + 1 ] \sum F^n_fU^{n+1}_f = (-u_w^n h)U_w^{n+1} + (u_e^n h)U_e^{n+1} + (-v_s^n h)U_s^{n+1} + (v_n^n h)U_n^{n+1} \\ = \frac{h}{4} \left[ (u_P^n+u_E^n+v_N^n-v_S^n)U_P^{n+1} +(u_P^n+u_E^n)U^{n+1}_E-(v_P^n+v_S^n)U^{n+1}_S+(v_P^n+v_N^n)U^{n+1}_N \right] FfnUfn+1=(uwnh)Uwn+1+(uenh)Uen+1+(vsnh)Usn+1+(vnnh)Unn+1=4h[(uPn+uEn+vNnvSn)UPn+1+(uPn+uEn)UEn+1(vPn+vSn)USn+1+(vPn+vNn)UNn+1]

  • 扩散项
    ∑ ν ( ∇ U n + 1 ) f S = ν [ ( ∇ U n + 1 ) w S w + ( ∇ U n + 1 ) e S e + ( ∇ U n + 1 ) s S s + ( ∇ U n + 1 ) n S n ] = ν S f d [ U E + U S + U N − 5 U P ] \sum \nu(\nabla U^{n+1})_f S=\nu \left[ (\nabla U^{n+1})_w S_w + (\nabla U^{n+1})_e S_e + (\nabla U^{n+1})_s S_s + (\nabla U^{n+1})_n S_n \right] \\ =\frac{\nu S_f}{d}\left[ U_E + U_S + U_N-5U_P \right] ν(Un+1)fS=ν[(Un+1)wSw+(Un+1)eSe+(Un+1)sSs+(Un+1)nSn]=dνSf[UE+US+UN5UP]

  • 压力项
    ∑ p f S = p P ( − h , 0 ) + p E + p P 2 ( h , 0 ) + p S + p P 2 ( 0 , − h ) + p N + p P 2 ( 0 , h ) = h 2 ( p E − p P ,   p N − p S ) \sum p_fS=p_P\left( -h,0 \right)+\frac{p_E+p_P}{2}\left( h,0 \right)+\frac{p_S+p_P}{2}\left( 0,-h \right)+\frac{p_N+p_P}{2}\left( 0,h \right) =\frac{h}{2}\left( p_E-p_P,\ p_N-p_S \right) pfS=pP(h,0)+2pE+pP(h,0)+2pS+pP(0,h)+2pN+pP(0,h)=2h(pEpP, pNpS)

  • 压力泊松方程-左端
    ∑ ( H b y A ) f ⋅ S = h ( H b y A ∣ e , x + H b y A ∣ n , y − H b y A ∣ s , y ) \sum (HbyA)_f \cdot S = h(HbyA\big|_{e,x} + HbyA\big|_{n,y} - HbyA\big|_{s,y}) (HbyA)fS=h(HbyAe,x+HbyAn,yHbyAs,y)

  • 压力泊松方程-右端
    C w = 0 C_w=0 Cw=0

  • 系数
    A P = V P Δ t + h 4 ( u P + u E + v N − v S ) + 5 ν S f d , A W = 0 A_P=\frac{V_P}{\Delta t}+\frac{h}{4}(u_P+u_E+v_N-v_S)+\frac{5\nu S_f}{d}, \quad A_W=0 AP=ΔtVP+4h(uP+uE+vNvS)+d5νSf,AW=0

1.5.2. 右边界, u e = v e = 0 u_e=v_e=0 ue=ve=0,不包括边角

  • 对流项
    ∑ F f n U f n + 1 = ( − u w n h ) U w n + 1 + ( u e n h ) U e n + 1 + ( − v s n h ) U s n + 1 + ( v n n h ) U n n + 1 = h 4 [ ( − u W n − u P n + v N n − v S n ) U P n + 1 − ( u P n + u W n ) U W n + 1 − ( v P n + v S n ) U S n + 1 + ( v P n + v N n ) U N n + 1 ] \sum F^n_fU^{n+1}_f = (-u_w^n h)U_w^{n+1} + (u_e^n h)U_e^{n+1} + (-v_s^n h)U_s^{n+1} + (v_n^n h)U_n^{n+1} \\ = \frac{h}{4} \left[ (-u_W^n-u_P^n+v_N^n-v_S^n)U_P^{n+1} -(u_P^n+u_W^n)U^{n+1}_W-(v_P^n+v_S^n)U^{n+1}_S+(v_P^n+v_N^n)U^{n+1}_N \right] FfnUfn+1=(uwnh)Uwn+1+(uenh)Uen+1+(vsnh)Usn+1+(vnnh)Unn+1=4h[(uWnuPn+vNnvSn)UPn+1(uPn+uWn)UWn+1(vPn+vSn)USn+1+(vPn+vNn)UNn+1]

  • 扩散项
    ∑ ν ( ∇ U n + 1 ) f S = ν [ ( ∇ U n + 1 ) w S w + ( ∇ U n + 1 ) e S e + ( ∇ U n + 1 ) s S s + ( ∇ U n + 1 ) n S n ] = ν S f d [ U W + U S + U N − 5 U P ] \sum \nu(\nabla U^{n+1})_f S=\nu \left[ (\nabla U^{n+1})_w S_w + (\nabla U^{n+1})_e S_e + (\nabla U^{n+1})_s S_s + (\nabla U^{n+1})_n S_n \right] \\ =\frac{\nu S_f}{d}\left[ U_W + U_S + U_N-5U_P \right] ν(Un+1)fS=ν[(Un+1)wSw+(Un+1)eSe+(Un+1)sSs+(Un+1)nSn]=dνSf[UW+US+UN5UP]

  • 压力项
    ∑ p f S = p W + p P 2 ( − h , 0 ) + p P ( h , 0 ) + p S + p P 2 ( 0 , − h ) + p N + p P 2 ( 0 , h ) = h 2 ( p P − p W ,   p N − p S ) \sum p_fS=\frac{p_W+p_P}{2}\left( -h,0 \right)+p_P\left( h,0 \right)+\frac{p_S+p_P}{2}\left( 0,-h \right)+\frac{p_N+p_P}{2}\left( 0,h \right) =\frac{h}{2}\left( p_P-p_W,\ p_N-p_S \right) pfS=2pW+pP(h,0)+pP(h,0)+2pS+pP(0,h)+2p

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值