# 3D (Quasi 3D) flow simulation dimension 3 boundary p p p units real atom_style full comm_modify vel yes units real neighbor 2.0 bin neigh_modify delay 1 every 1 read_data flow_water_layers_4nm.data # Define non-bonded Morse potential parameters pair_style hybrid/overlay morse 16.0 dpd/tstat 300. 300. 10 44355 # Overlays a Morse potential and DPD thermostat pair_coeff * * morse 0.837 0.35 4.7 # D0 alpha R0 pair_coeff 3 3 morse 0.813 0.5552 6.29 # water and water pair_coeff 1 3 morse 0.8 0.85 4.9 # water and bottom surface pair_coeff 2 3 morse 0.8 0.85 4.9 # water and top surface pair_coeff 1 1 morse 0.8 0.55 3.536 # surface and surface pair_coeff 2 2 morse 0.8 0.55 3.536 # surface and surface pair_coeff 1 2 morse 0.8 0.55 3.536 # surface and surface pair_coeff * * dpd/tstat 2875.0 # Prescribe damping coefficient gamma #Create groups for lower wall, upper wall, both walls together, and the water in channel group walls type 1 2 group water type 3 group bottom_wall type 1 group upper_wall type 2 group atomintop id 1000 # Compute the velocities of the top wall and the water channel compute topvel upper_wall reduce ave vx compute watvel water reduce ave vx compute peratomshear water stress/atom NULL compute shearstress water reduce sum c_peratomshear[4] # Compute the distance traveled by atoms in the top layer compute peratomtopdisplace upper_wall displace/atom compute topdisplace upper_wall reduce ave c_peratomtopdisplace[1] c_peratomtopdisplace[2] compute peratomforce upper_wall property/atom fx fy compute totalforce upper_wall reduce sum c_peratomforce[1] c_peratomforce[2] compute averageforce upper_wall reduce ave c_peratomforce[1] c_peratomforce[2] # Determine the distance between walls using the center of mass of walls compute botcenter bottom_wall com compute topcenter upper_wall com variable channelwidth equal c_topcenter[2]-c_botcenter[2] timestep 20 thermo_style custom step temp pe etotal press vol c_topvel c_watvel v_channelwidth c_shearstress thermo 250 dump 24 all dcd 1000 project.dcd dump 34 all custom 500 project2.dcd id xu yu zu thermo_modify lost ignore #### Restart ####### restart 1000 flow1.restart flow2.restart # Equilibration and assign initial velocities velocity water create 300.00 376847 velocity walls create 300.00 431423 # Cause upper wall to move as a rigid body and constrain lower wall to not move during equilibration fix 25 upper_wall rigid/nve single fix stationary_bot_wall bottom_wall spring/self 10.0 xyz fix stationary_top_wall upper_wall spring/self 10.0 xz # Run using NVE ensemble for 50000 time steps fix 4 all nve run 50000 # Equilibration run # Flow Simulation unfix stationary_top_wall velocity upper_wall set 0.0 0.0 0.0 units box unfix 25 fix 26 upper_wall rigid/nve single torque * off off off fix constrain_top_wall upper_wall spring/self 10.0 yz fix wall_flow upper_wall addforce 0.001 0.001 0 fix water_flow water addforce 0.000100 0 0 run 2000000