# DPD 3-d flow simulation dimension 3 boundary p p p atom_style atomic units lj comm_modify vel yes neighbor 0.3 bin neigh_modify delay 5 # create geometry lattice fcc 1 region box block 0 10 0 10 0 12 create_box 3 box create_atoms 2 box mass 1 1.0 mass 2 1.0 mass 3 1.0 # potentials pair_style dpd 1.0 2.5 419084618 pair_coeff * * 25.0 4.5 # define groups region 1 block INF INF INF INF INF 1 group lower region 1 region 2 block INF INF INF INF 11 INF group upper region 2 group boundary union lower upper group flow subtract all boundary set group lower type 1 set group upper type 3 # initial velocities compute mobile flow temp velocity flow create 1.0 482748 temp mobile fix 1 all nve fix 2 flow temp/rescale 100 1.0 1.0 0.02 1.0 fix_modify 2 temp mobile # Couette flow velocity upper set 3.0 0.0 0.0 velocity lower set 0.0 0.0 0.0 fix 3 boundary setforce 0.0 0.0 0.0 fix 4 flow addforce 0.5 0.0 0.0 # Run timestep 0.005 thermo 100 thermo_modify temp mobile dump 1 all atom 5 dump3.flow run 5000 # Compute the diffusion coefficient variable dt equal 1.0 fix 5 all nvt temp 1.0 1.0 0.01 compute msd all msd com yes variable twopoint equal c_msd[4]/6/(step*${dt}+1.0e-6) fix 9 all vector 10 c_msd[4] variable fitslope equal slope(f_9)/6/(10*${dt}) thermo_style custom step temp press c_msd[4] v_twopoint v_fitslope thermo 1000 run 500000