From fce45fece3052fee205f0fe183398f32f1bee0b4 Mon Sep 17 00:00:00 2001 From: Rex Zhe Li Date: Thu, 20 May 2021 20:31:40 -0400 Subject: [PATCH 1/2] add slipping velocity BC for CPU; to be built --- cpu/D3Q7BC.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/cpu/D3Q7BC.cpp b/cpu/D3Q7BC.cpp index 2917bab4..5bc7b589 100644 --- a/cpu/D3Q7BC.cpp +++ b/cpu/D3Q7BC.cpp @@ -30,6 +30,57 @@ extern "C" void ScaLBL_Solid_Neumann_D3Q7(double *dist,double *BoundaryValue,int } } +extern "C" void ScaLBL_Solid_SlippingVelocityBC_D3Q19(double *dist, double *zeta_potential, double *ElectricField, double *SolidGrad, + double epsilon_LB, double tau, double rho0,double den_scale, double h, double time_conv, + int *BounceBackDist_list, int *BounceBackSolid_list, int *FluidBoundary_list, + double *lattice_weight, float *lattice_cx, float *lattice_cy, float *lattice_cz, + int count, int Np){ + + int idx; + int iq,ib,ifluidBC; + double value_b,value_q; + double Ex,Ey,Ez; + double Etx,Ety,Etz;//tangential part of electric field + double E_mag_normal; + double nsx,nsy,nsz;//unit normal solid gradient + double ubx,uby,ubz;//slipping velocity at fluid boundary nodes + float cx,cy,cz;//lattice velocity (D3Q19) + double LB_weight;//lattice weighting coefficient (D3Q19) + double cs2_inv = 3.0;//inverse of cs^2 for D3Q19 + double nu_LB = (tau-0.5)/cs2_inv; + + for (idx=0; idx Date: Fri, 21 May 2021 00:38:06 -0400 Subject: [PATCH 2/2] fix a minor bug; CPU slipping velocity BC is now working --- cpu/D3Q7BC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/D3Q7BC.cpp b/cpu/D3Q7BC.cpp index 5bc7b589..aad999f2 100644 --- a/cpu/D3Q7BC.cpp +++ b/cpu/D3Q7BC.cpp @@ -49,7 +49,7 @@ extern "C" void ScaLBL_Solid_SlippingVelocityBC_D3Q19(double *dist, double *zeta double cs2_inv = 3.0;//inverse of cs^2 for D3Q19 double nu_LB = (tau-0.5)/cs2_inv; - for (idx=0; idx