Skip to main content
. 2025 Feb 1;27(2):149. doi: 10.3390/e27020149
Algorithm 1 DSMC algorithm for Boltzmann equation
  • 1:

    Given N particles (xn0,cn0), with n=1,,N computed from the initial distribution f0(x,c);

  • 2:

    for t=1 to Nt do

  • 3:

          set np=Sround(N/2);

  • 4:

         sample np pairs (i,j) uniformly without repetition among all possible pairs of particles at time step t;

  • 5:

          for each pair (i,j), sample η,η*

  • 6:
          for each pair (i,j), compute the data change
    Δxit=ϵPΔ1,Δ2(xit,xjt,ci0,cj0)(xjtxit)+2σ2D(ci0)ηΔxjt=ϵPΔ1,Δ2(xjt,xit,cj0,ci0)(xitxjt)+2σ2D(cj0)η* (21)
    compute
    xi,jt+1=xi,jt+Δxi,jt (22)
  • 7:

    end for