Hello,
I am using the LAMMPS version 29Oct2020. I am currently trying to perform a hybrid MD/MC simulation in which I use the ‘MC’ LAMMPS package. I have a polycrystalline alloy which has Cobalt, Chromium and Nickel in it. I used AtomSK to make 3% of the total atoms in the aforementioned alloy to be Aluminium atoms. I then used LAMMPS to perform the hybrid MC/MD simulation to do random swapping of the Al atoms with CoCrNi atoms. From other papers, I learned that a majority of the Al atoms would be swapped with the CoCrNi atoms at the grain boundaries. But no swapping od atoms happens (Al atoms don’t get swapped with the grain boundary CoCrNi atoms) when I run the hybrid MC/MD simulation. I think I might be wrong with the line of code that I am using to perform it. I have attached the code. I have also attached a picture of what I am looking to get. What am I doing wrong? Thanks in advance!
Regards,
Rajesh
units metal
dimension 3
boundary s s s
atom_style atomic
neighbor 2.0 bin
neigh_modify every 10 delay 0 check yes
############################# ATOM DEFINITION ##############################
read_data Al3-CoCrNi94_poly.data
############################# FORCEFIELD ###################################
pair_style eam/alloy
pair_coeff * * FeNiCrCoAl-heaweight.setfl Ni Co Cr Al
group Ni type 1
group Co type 2
group Cr type 3
group Al type 4
##---------------SETTINGS-------------------------------------
timestep 0.0001
Store final cell length for strain calculations
variable tmp equal “lx”
variable Lx equal {tmp}
variable tmp equal "ly"
variable Ly equal {tmp}
variable tmp equal “lz”
variable Lz equal ${tmp}
#print “Initial x Length, Lx: {Lx}"
#print "Initial y Length, Ly: {Ly}”
#print “Initial z Length, Lz: ${Lz}”
##---------------COMPUTES-------------------------------------
#compute 1 all stress/atom NULL
#compute 2 all reduce sum c_1[1] c_1[2]
variable Lx equal lx
variable Ly equal ly
variable Lz equal lz
variable Vol equal vol
variable thickn equal 3.4
print “Initial x Length, Lx: {Lx}"
print "Initial y Length, Ly: {Ly}”
print "Initial z Length, Lz: {Lz}"
variable strain equal "(lx - v_Lx)/v_Lx"
variable strain1 equal "(ly - v_Ly)/v_Ly"
variable strain2 equal "(lz - v_Lz)/v_Lz"
variable lengthx equal "lx"
variable lengthy equal "ly"
variable lengthz equal "lz"
variable sigmaxx equal "-pxx/10000"
variable sigmayy equal "-pyy/10000"
variable sigmazz equal "-pzz/10000"
variable epsxx equal "v_strain"
variable epsyy equal "v_strain1"
variable epszz equal "v_strain2"
variable STEP equal step
variable eng equal pe
variable counter equal 0
variable natoms equal "count(all)"
variable numatomsAl equal round(0.03*{natoms})
Minimization
min_style cg
timestep 0.001
minimize 1.0e-4 1.0e-6 100 1000
run 30000
Assign original velocities to atoms
compute new all temp
velocity all create 298.0 487639 temp new
run 30000
fix def1 all print 1000 “{STEP} {eng}” file CrCoNi94-Al-I.def1.txt screen no
fix 1 all nvt temp 298.0 298.0 0.1
##---------------RELAXATION--------------------------------------
run 160000
##---------------MC SWAPPING-----------------------------------
fix 1 all atom/swap 20 100 78585 298.0 semi-grand yes types 1 2 3 4 mu 0.0 0.25 0.0 0.0
fix def1 all print 1000 “{STEP} {eng}” file CrCoNi94-Al-II.def1.txt screen no
dump equil all xyz 10000 dump_equil298.xyz
dump 2 all atom 10000 CoCrNi94-Al.lammpstrj
write_data CoCrNi-Al_relaxed.data
thermo 2000
thermo_style custom step etotal v_eng temp press lx ly lz pxx pyy pzz
timestep 0.0001
run 300000