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

Surface_Tension.m
            if( abs(Sigma)>0)
                % perturbating df to account for surface tension
                % ic_rad(ic) is the angle with the direction ic
                
               
                sigmXMgra=zeros(size(M_Grad)); df=zeros(size(M_Grad));
                delta_phi=zeros(size(M_Grad));
                
                sigmXMgra(ija)=Sigma.*M_Grad(ija);
                ijab_fg=ija(Flag_Grad);
                
                for ic=1:N_c-1; %!!!!
                    
                    delta_phi(ija)=2*(-ic_rad(ic)+phi_Grad(ija)); % difference
                    % df is the source term i.e. perturbation
                    % Gunstensten surface tension interface
                    df(ija)=  sigmXMgra(ija).*cos(-delta_phi(ija)); % df(:,:)
                    % modified Gunstenten s.t. (see Dufin et al)
                    %df= st_lambda(ic)*Sigma.*Conc_fct.*cos(-delta_phi);
                    
                        ijab_ic=ija+NxM*(ic-1);
                       % Flag_Grad = M_Grad(ijab) > min_M_Grad; % flag 
                       
                        %ijab_fg=ija(Flag_Grad);
                        ijab_ic_fg=ijab_ic(Flag_Grad); 
                        f(ijab_ic_fg) = f(ijab_ic_fg) + df(ijab_fg);% !!!!! add surface tension perturbation
                    
                    
                end % ic

            end % if sigma

Contact us