3D ZouHe
OpenLB – Open Source Lattice Boltzmann Code › Forums › on Lattice Boltzmann Methods › General Topics › 3D ZouHe
 This topic has 1 reply, 2 voices, and was last updated 8 years, 10 months ago by mathias.

AuthorPosts

July 23, 2014 at 4:35 pm #1755anna.leedsMember
Hello,rnrnrnI am trying to compute the 3D liddriven cavity test (code C++). I have used Bounce back boundary conditions for the wall. For the lid, I want to use the ZouHe boundary condition. I follow this paper ‘ Implementation of onsite velocity boundary condition for D3Q19 lattice Boltzmann’ Hecht, 2012.rnrnMy D3Q19 Model :rn
Code:(14) 18(5)15 (11)rn  /rn /rn  /rn 8(2)10________________4(0)3_________________9(1)7rn /  rn /  rn /  zrn (12) 16(6)17 (13) _ xrn rn rn (18) 11(5)14 (15)rn  /rn /rn  /rn 9(4)8________________1(0)2_________________7(3)10rn /  rn /  rn /  zrn (16) 13(6)12 (17) _ y
Code:rnrnrnThe subroutine for the boundary condition rn
Code:void Zou_He (DistFunctArray& df, DistFunctArray& df_tmp)rn rn{rnint NZ = df.sizeZ()1;rn for(int x=1; x<df.sizeX()1; x++) rn for(int y=1; y<df.sizeY()1; y++)rn {rn rn const real Vx = 1e3;rn rn rn const real rho = df(0,x,y,NZ) + df(1,x,y,NZ) + df(2,x,y,NZ) + df(3,x,y,NZ) rn + df(4,x,y,NZ) + df(7,x,y,NZ) + df(8,x,y,NZ) + df(9,x,y,NZ) + df(10,x,y,NZ) rn + 2*(df(5,x,y,NZ) + df(11,x,y,NZ) + df(14,x,y,NZ) + df(15,x,y,NZ) + df(18,x,y,NZ));rn rn const real Nxz = 0.5 * (df(1,x,y,NZ) + df(9,x,y,NZ) + df(7,x,y,NZ) – (df(8,x,y,NZ)rn + df(2,x,y,NZ) + df(10,x,y,NZ))) – (rho * Vx )/3;rn const real Nyz = 0.5 * (df(3,x,y,NZ) + df(7,x,y,NZ) + df(10,x,y,NZ) – (df(9,x,y,NZ)+ df(4,x,y,NZ) + df(8,x,y,NZ)));rn rn df_tmp(6,x,y,NZ) = df(5,x,y,NZ);rn df_tmp(13,x,y,NZ) = df(14,x,y,NZ) + (rho * Vx )/6 ; // Nxz;rn df_tmp(12,x,y,NZ) = df(11,x,y,NZ) – (rho * Vx )/6 ;// + Nxz;rn df_tmp(16,x,y,NZ) = df(15,x,y,NZ) ;//+ Nyz;rn df_tmp(17,x,y,NZ) = df(18,x,y,NZ) ;// Nyz;rn rn } rn}rn
Code:rnrnIf I do not use Nxz and Nyz it gives me results. But this is not the real ZouHe boundary condition, right? It is more a bounce back with a velocity.rnrnI don’t understand where i am wrong about the ZouHe boundary condition. When I ran with Nxz and Nyz i obtained Nan for df_tmp.rnrnThanks in advance for your help,rnrnAnnarn
July 24, 2014 at 1:20 pm #2139mathiasKeymasterHi,rnrnwhat did you do for the corner nodes? I would set a combination of BB and Zou/He. Further, have a look in Sukops book there is some pseudo code or/and the OpenLB inplementation.rnrnBest regardsrnMathias

AuthorPosts
 You must be logged in to reply to this topic.