################################################################################################################## # setup MD calculation to calibrate dislocation velocity as a function of applied stress at finite temperature # # SG - August 14th, 2013 # # SG - tested on August 15th, 2013 # # reference: Groh et al, IJP 2009 # # TD - Revised for Nickel. March 12, 2015 # # BH - Revised for a general material. January 13, 2017 # # BH - Revised for different post-processing method. February 15, 2017 # # # # ################################################################################################################## ################################################################################################################## # Edge dislocation # 1. static to obtain the core structure # 2. equilibrate temperature at 300K (nve + rescaling) # 3. apply a constant force to calculate the dislocation velocity. Force is applied on a rigid body ################################################################################################################## ################################################################################################################## # User set variables # initTemp : desired temperature # sigma : shear stress in bar units # material : material name # atom_file : name of the file containing the atom positions # # Miscellaneous control variables # equilTime : Number of increment to equilibrate the temperature # runTime : Number of increment to calibrate the temperature # energyConv : Energy conversion term from eV to J to convert atomic force to stress # # output: # dump.minimize: atoms before and after minimization # dump.equilibration: atoms during temperature equilibration # dump.shear: wrapped atoms in the simulation box (perfect to look at the velocity) # dump.shear.unwrap: unwrapped atoms (to check that everything is going well) # output file (log.lammps): monitor the temperature during the MD run # ################################################################################################################## # Variable definitions variable initTemp equal 300. # desired temperature variable sigma equal 15000. # applied stress in bar variable material string Ta # material symbol variable atom_file string atoms.bcc.edge.pad # the configuration was generated by SG with the preprocessor dislocation.f90 variable equilTime equal 10000 # number of increment to equilibrate the temperature variable runTime equal 150000 # number of increment to calibrate the velocity variable energyConv equal 1602191.7 # conversion factor dimension 3 boundary p s p units metal atom_style atomic read_data ${atom_file} # store initial position of bottom and top planes along y variable tmp0 equal "ylo+14." variable ylo0 equal ${tmp0} variable tmp1 equal "yhi-14.5" variable yhi0 equal ${tmp1} # variable for dumping variable ymid1 equal "0.5*ylo + 0.5*yhi - 30.0" variable ymiddlenegative equal ${ymid1} variable ymid2 equal "0.5*(ylo + yhi) + 30.0" variable ymiddlepositive equal ${ymid2} # define potential pair_style meam pair_coeff * * ${material}.library.meam ${material} ${material}.parameter.meam ${material} neighbor 2.0 bin neigh_modify delay 5 # definition of the upper and lower blocks region upper block INF INF ${yhi0} INF INF INF units box region lower block INF INF INF ${ylo0} INF INF units box # definition of the group group upper region upper group lower region lower group mobile subtract all upper lower # fix top and botton group fix 1 lower setforce 0.0 0.0 NULL fix 2 upper setforce 0.0 0.0 NULL # compute specific quantities compute pot_energy all pe/atom compute stress all stress/atom NULL dump 1 all custom 1000 dump.minimize id x y z c_pot_energy # create the dislocation timestep 0.010 minimize 0.0 1.0e-8 10000 100000 ################################################### # step 2: equilibrate the temperature # ################################################### timestep 0.001 undump 1 reset_timestep 0 unfix 1 unfix 2 # define temperature compute temp1 mobile temp # initialize the velocities velocity mobile create ${initTemp} 16723 units box velocity mobile zero linear velocity mobile zero angular # equilibrate the temperature fix 1 mobile nve fix 2 mobile temp/rescale 1 ${initTemp} ${initTemp} 1.0 0.5 fix_modify 2 temp temp1 # boundary condition fix 3 lower setforce 0.0 0.0 NULL fix 4 upper setforce 0.0 0.0 NULL thermo 100 thermo_modify temp temp1 thermo_style custom step pe ke temp pxx pyy pzz pxy pyz pxz dump 1 all custom 10000 dump.equilibration id x y z c_pot_energy c_stress[1] c_stress[2] c_stress[3] c_stress[4] c_stress[5] c_stress[6] run ${equilTime} ######################################################################################################## # step 3: MD at finite temperatute and with constant force # # force (eV/angstrom) = stress (bar) * S (angstrom*angstrom) / (number of atoms in upper) / 1602191.7) # ######################################################################################################## unfix 1 unfix 2 unfix 3 unfix 4 undump 1 uncompute temp1 reset_timestep 0 timestep 0.002 # define the force to apply variable nupper equal count(upper) variable nuper1 equal ${nupper} print "number of atoms in upper == ${nupper}" variable tmp2 equal "lx" variable tmp3 equal "lz" variable tmp4 equal v_tmp2*v_tmp3/v_nupper*v_sigma/v_energyConv variable appforce equal ${tmp4} # define temperature compute temp1 mobile temp # define velocity on boundary velocity upper set 0. 0. 0. units box velocity lower set 0. 0. 0. units box # define boundary conditions fix 1 upper setforce NULL 0. NULL fix 2 lower setforce 0. 0. NULL fix 3 upper aveforce ${appforce} 0. 0. fix 4 upper rigid group 1 upper # no temperature control fix 5 mobile nve thermo 100 thermo_modify temp temp1 dump 1 all custom 5000 dump.shear id x y z dump 2 all custom 500 dump.shear.unwrap id xu yu zu run ${runTime}