# 2-d LJ flow simulation dimension 3 boundary p s p atom_style atomic neighbor 0.3 bin neigh_modify delay 5 # create geometry lattice fcc 0.81 region box block 0 20 0 10 0 20 atom_modify map array # !!!!!!!!!!!!!!!! create_box 2 box region 1 block INF INF INF 1.00 INF INF # Define region for lower boundary region 2 block INF INF 8.7 INF INF INF # Define region for upper boundary region 3 block INF INF 1.1 8.6 INF INF # The region between the boundaries mass 1 1.0 # Fluid mass 2 2.0 # walls # Create atoms create_atoms 1 region 3 lattice fcc 4.2 # Use denser lattice for boundaries and nanoparticle create_atoms 2 region 1 # Create attoms of lower boundary create_atoms 2 region 2 # Create atoms of upper boundary # Define groups group lower region 1 # Define group "lower" for lower boundary group upper region 2 # Define group "upper" for upper boundary group flow type 1 # LJ potentials pair_style hybrid lj/cut 2.2 pair_coeff 1 1 lj/cut 1.0 1.0 2.2 #pair_coeff 1 1 lj/cut 0.317 0.65 2.2 pair_coeff 1 2 lj/cut 1.0 1.0 2.2 pair_coeff 2 2 none # Initial velocities compute mobile flow temp # Compute the temperature of the flow compute compute_lower_temp lower temp # Compute the temperature of the lower wall compute compute_upper_temp upper temp # Compute the temperature of the upper wall velocity flow create l.0 482748 temp mobile velocity lower create 1.0 482748 temp compute_lower_temp # Set the initial velocity of the lower wall velocity upper create 2.0 482748 temp compute_upper_temp # Set the initial velocity of the upper wall fix 10 lower spring/self 200.0 fix 11 upper spring/self 200.0 fix 4 lower temp/rescale 1 1.0 1.1 0.02 1.0 # Re-adjust the temperature of the lower wall every time-step fix 3 upper temp/rescale 1 1.9 2.0 0.02 1.0 # Re-adjust the temperature of the upper wall every time-step #fix 6 flow temp/rescale 1 1.0 2.0 0.02 1.0 # Re-adjust the temperature of the fluid every time-step compute ke flow ke/atom # Compute the kinetic energy of the atoms of the fluid variable temp_profile atom c_ke/1.5 # Create a variable fix c9n flow ave/spatial 1 200000 200000 y lower 0.025 density/number vx v_temp_profile units reduced file temp_profile.dat fix 5 all nve # Adjust positions and velocities of all atoms every time-step # Run timestep 0.001 thermo 500 thermo_modify temp mobile dump 1 all atom 500 dump2.lammpstrj run 1200000