%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% constant.m: consant setting
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Shan Chen Lattice Boltzmann sample in Matlab
% Copyright Wei Gong
% Address: Nottingham NG7 2RD, UK
% E-mail: wei.gong@nottingham.ac.uk
% D2Q9 lattice constants
lx = single(200); % x length of computational domain
ly = single(150); % y length of computational domain
lxy = lx*ly;
tau = single(1); % dimensionless relaxation time
cc = single(1); % speeds
c_squ = cc*cc/3; % square of sound speed
visc = c_squ*(tau - 0.5); % viscosity
t_k = single([4/9 1/9 1/9 1/9 1/9 1/36 1/36 1/36 1/36]); % weighting factors
ee = single([0 1 0 -1 0 1 -1 -1 1; % velocity model
0 0 1 0 -1 1 1 -1 -1]);
% General flow constants
rho = 200 + rand(lx, ly);
p = single(zeros(lx, ly)); % pressure
psx = single(zeros(lx, ly)); % mean field potential
u = single(zeros(2, lx, ly)); % velocity
ue = single(zeros(2, lx, ly)); % equilibrium velocity
up = single(zeros(2, lx, ly)); % real fluid velocity
F = single(zeros(2, lx, ly)); % for the interaction between fluid nodes
S = single(zeros(2, lx, ly)); % interaction components between the dluid nodes and solid nodes
ff = single(zeros(9, lx, ly)); % distribution function
psx_re = single(zeros(9, lx, ly)); % psx(x+ei*dt,t)
rho_h = 650;
rho_h = 577;
rho_l = 78;
% parameters in C-S EOS
G = single(-125);
psx0 = single(4);
rho0 = single(200);