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

Body_Forces.m
% defined in the script ILB_vessels for the different cases

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


            %% 
        if(1)    % VECTORIAL 
             if exist('Bforce','var') && any (abs(Bforce) > 0), 
                %add external Body force, e.g. due to the pressure gradient dPdL
                
                for ic=1:N_c;%
                    if  Bforce(ic) ~=0
                        indeces=ija+NxM*(ic-1); indeces=uint32(indeces); 
                        Red(indeces) = Red(indeces)  + Bforce(ic);
                        Blue(indeces) = Blue(indeces) + Bforce(ic); 
                    end
                                        
                end % for ic 
            end % in any Bforce >0
        end

Contact us