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_opt.m
if(1)
            if( abs(Sigma)>0)
                % perturbating df to account for surface tension
                % ic_rad(ic) is the angle with the direction ic
                
                delta_phi=repmat(0,lenag,1);
                sigmXMgra=repmat(0,lenag,1); 
                df=repmat(0,lenag,1);
                
                sigmXMgra=Sigma.*M_Grad(ijagr); %original 
                
      %         CGx(~ijagr)=0; CGy(~ijagr)=0;
                      
                for ic=1:N_c-1; %!!!!
                    
                    delta_phi=2.*(-ic_rad(ic)+phi_Grad(ijagr)); % difference
                    % df is the source term i.e. perturbation
                    % Gunstensten surface tension interface
                    df=  sigmXMgra.*cos(-delta_phi); % df(:,:)
                    % modified Gunstenten s.t. (see Dufin et al)
                    %df= st_lambda(ic)*Sigma.*Conc_fct.*cos(-delta_phi);
                    
                    ijagr_ic=ijagr+NxM*(ic-1);
                    f(ijagr_ic) = f(ijagr_ic) + df;% !!!!! add surface tension perturbation
                    
                end % ic

            end % if sigma

end


%if(0) % surface tension as body force LISHCHUK - CARE - HALLIDAY 
    
%ux_uy_Lishchuk_correct;
    
%end

Contact us