Code covered by the BSD License  

Highlights from
immiscible LB

immiscible LB

by

 

23 Jul 2009 (Updated )

Implements Immiscible Lattice Boltzmann (ILB, D2Q9) method for two phase flows

Poiseuille_Profile.m
%Poiseuille_Profile on 1st row 
ir_giv=1; 
W_Cha= Mc; % Mc numbero of columns 
W_Cha_free = nnz(Channel2D(1,:)); % w open channel Channel2D
Half_Cha=Channel_2D_half_Width; % free = [half 0 half ]
Buf = 0.5*(W_Cha-W_Cha_free); 

if (mod(Width,2) ==0) % pari 
     x_profile=[ 0.5+(-Half_Cha:1:-1),(1:Channel_2D_half_Width)-0.5];
else % dispari 
    x_profile=[ 0.5+(-Half_Cha:1:-1),0,(1:Channel_2D_half_Width)-0.5];
end

uy_analy_profile=uy_fin_max.*(1- ( x_profile /Channel_2D_half_Width).^2 ); % analytical velocity profile
% padded with 0 on the buffer  
vet_profile=[zeros(1,Buf),uy_analy_profile,zeros(1,Buf)]; 

plot(vet_profile,'-.'); grid on

Contact us