#CU #Calculating GBE For Sigma(3 1 0) that is 36.9' #-------------------------------------INITIALIZE SIMULATION----------------------------------------------------- clear units metal dimension 3 boundary p p p atom_style atomic #-----------------------------------CREAT ATOMESTIC STRUCTURE--------------------------------------------------- lattice fcc 3.6150 region main block 0.00000 30 -15 15 0.00000 1 units lattice create_box 2 main region down block INF INF -15 0.00000 INF INF units lattice lattice fcc 3.6150 orient x 1 -3 0 orient y 3 1 0 orient z 0 0 1 create_atoms 1 region down region up block INF INF 0.00000 15 INF INF units lattice lattice fcc 3.6150 orient x -1 -3 0 orient y 3 -1 0 orient z 0 0 1 create_atoms 2 region up region grainboundary block INF INF -1 1 INF INF units lattice group 1 region down group 2 region up group 3 region grainboundary #-----------------------------------DEFINE INTERATOMIC POTENTIAL------------------------------------------------ pair_style eam pair_coeff * * cu_u6.eam #neighbor 2 bin #neigh_modify delay 2 every 1 check yes #----------------------------Displace atoms and delete overlapping atoms----------------------------------------- displace_atoms 2 move 0 0 0 units lattice delete_atoms overlap 0.35 1 2 #---------------------------------------EQUILIBRATION------------------------------------------------------------- velocity all create 0.1e-15 4928459 rot yes dist gaussian fix 1 all nvt temp 0.1e-15 0.1e-15 0.1 fix 2 all press/berendsen iso 0.0 0.0 1000 #--------------------------------FIRST MINIMIZATION & PIRINT RESULTS & RUN------------------------------------------ thermo 1000 timestep 0.001 thermo_style custom step press temp etotal min_style cg minimize 1.0e-15 1.0e-15 10000 100000 reset_timestep 0 run 100000 #--------------------------------SECOND MINIMIZATION & PIRINT RESULTS & RUN---------------------------------------- unfix 2 fix 2 all box/relax iso 1.0e-15 vmax 0.001 thermo 1000 timestep 0.001 thermo_style custom step press temp etotal min_style cg minimize 1.0e-15 1.0e-15 10000 100000 reset_timestep 0 run 100000 #----------------------------------------DEFINE SETTINGS-------------------------------------------------------- compute csym all centro/atom fcc compute mykinetic all ke/atom compute mypotential all pe/atom compute eachatomingb 3 pe/atom compute eatoms all reduce sum c_mypotential compute GBE 3 reduce sum c_eachatomingb variable natoms equal " count(all) " variable teng equal " c_eatoms " variable coheseng equal " v_teng/v_natoms " variable length equal " lz " variable minimumeenergy equal " v_coheseng " variable engsum equal " v_minimumeenergy * v_natoms " variable GbArea equal " lx * lz " variable GbEnergy equal "(c_GBE-(v_engsum))/(v_GbArea)" variable soorat equal " c_GBE-(v_engsum) " thermo 1000 timestep 0.001 dump 1 all xyz 1000 dump.xyz dump 2 all custom 1000 dump.mykinetic c_mykinetic dump 3 all custom 1000 dump.mypotential c_mypotential dump 4 all custom 1000 dumpequilibration.lammpstrj id type x y z mass c_csym dump 5 all custom 1000 dump.EGBperAtoms c_eachatomingb min_style cg minimize 1.0e-15 1.0e-15 10000 100000 thermo_style custom step press temp etotal v_natoms v_GbEnergy c_eatoms c_GBE v_engsum v_soorat v_GbArea v_coheseng reset_timestep 0 run 100000 print "Total energy (eV) = ${teng};" print "Number of atoms = ${natoms};" print "Lattice constant (Angstoms) = ${length};" print "Cohesive energy (eV) = ${coheseng};" print "grain boundary energy (eV/A^2) = ${GbEnergy};" print "All done!"