%By liu-2017.0403. 谢谢这位没写名字的大佬。
%又上网扒代码了。 感人的效果。流体流入水腔。
%还是老样子,有啥问题Feel free to tell us~毕竟群众力量大嘛~QQ群:293267908。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
% GENERAL FLOW CONSTANTS
lx = 250;
ly = 250;
obst_x = lx/5+1; % position of the cylinder; (exact
obst_y = ly/2+1; % y-symmetry is avoided)
obst_r = ly/10+1; % radius of the cylinder
uMax = 0.06; % maximum velocity of Poiseuille inflow
Re = 100; % Reynolds number
nu = uMax * 2.*obst_r / Re; % kinematic viscosity
omega = 1. / (3*nu+1./2.); % relaxation parameter
maxT = 4000; % total number of iterations
tPlot = 5; % cycles
% D2Q9 LATTICE CONSTANTS
t &