关于动量方程和连续性方程的离散参考这里
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+vNn−vSn)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+UN−5UP] -
压力项
∑ 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(pE−pP, pN−pS) -
压力泊松方程-左端
∑ ( 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)f⋅S=h(HbyA∣∣e,x+HbyA∣∣n,y−HbyA∣∣s,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+vN−vS)+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[(−uWn−uPn+vNn−vSn)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+UN−5UP] -
压力项
∑ 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