# ===================================== # Capillary filling of a CNT with water # ===================================== # Typical input script used to investigate the dynamics # of water uptake by a carbon nanotube, as detailed in: # L. Joly, J. Chem. Phys. 135, 214705 (2011) # http://link.aip.org/link/doi/10.1063/1.3664622 # ======================================= # gamma coefficient of the DPD thermostat # ======================================= variable gamma equal 0.1 # eta ~ 0.3 mPa s, timestep = 2 fs units real boundary p p p communicate single vel yes atom_style full bond_style harmonic angle_style harmonic pair_style hybrid/overlay lj/cut/coul/long 14.0 10.0 dpd/tstat 300.0 300.0 10.0 38262 kspace_style pppm 1.0e-4 read_data data.cnt pair_coeff * * lj/cut/coul/long 0.086 3.4 pair_coeff 1 * lj/cut/coul/long 0.0 0.0 pair_coeff 5 8 lj/cut/coul/long 0.02330 3.275 pair_coeff 6*7 8 lj/cut/coul/long 0.1144 3.275 pair_coeff 8 8 lj/cut/coul/long 0.1521 3.151 pair_coeff 1 1 dpd/tstat ${gamma} pair_coeff 1 8 dpd/tstat ${gamma} pair_coeff 8 8 dpd/tstat ${gamma} bond_coeff 1 0.0 0.9572 angle_coeff 1 0.0 104.5 group water type 1 8 group oxygen type 8 group wall type 5 6 group plug type 7 neighbor 2.0 bin neigh_modify delay 5 neigh_modify exclude group wall wall neigh_modify exclude group wall plug neigh_modify exclude group plug plug compute Tliq water temp compute Tpar water temp/partial 1 1 0 fix shakeh2o water shake 1.0e-4 200 0 b 1 a 1 fix constnve water nve # =========================================================================== # output density profile and water mass inside the tube as a function of time # =========================================================================== fix dens oxygen ave/spatial 100 100 10000 z lower 1.0 density/number units box file rho.cnt region cnt cylinder z 0.0 0.0 20.3 0.0 98.4 units box variable ncnt equal count(oxygen,cnt) region eff cylinder z 0.0 0.0 18.7 -1.6 100.0 units box variable neff equal count(oxygen,eff) region cal cylinder z 0.0 0.0 20.3 25.0 75.0 units box variable ncal equal count(oxygen,cal)/50.0 fix nmoy all ave/time 10 100 1000 v_ncnt v_neff v_ncal file nmoy.cnt # ===================================================== # dump atom positions for visualization, e.g. using VMD # ===================================================== dump dumpwall wall xyz 10000000 dump.wall.xyz dump_modify dumpwall flush yes dump dumpwater water xyz 1000 dump.water.xyz dump_modify dumpwater flush yes thermo_style custom step cpu c_Tliq c_Tpar etotal thermo 100 thermo_modify flush yes timestep 2.0 velocity water create 300.0 34239 run 60000 write_restart restart.eq # ==================================== # remove the plug at the tube entrance # ==================================== neigh_modify exclude group plug all run 240000