I am trying to simulate the diffusion characteristics of hydrogen atoms in an Inconel alloy comprising Ni, Cr and Fe at a specified percentage. Initially, I defined the composition of the alloy and generated the structure, minimized the energy, performed a round of heating and cooling at 3000 K from 300 K and then back to 300 K again and at the end of the last stage of cooling I performed the NPT and NVT equilibrations to get the final structure of the alloy. My LAMMPS script has the codes containing the definition of hydrogen, defining the Lennard-Jones pair-wise potential of hydrogen with all 3 alloy elements and then a further hydrogen diffusion calculation right after the equilibration code. But every time I am running the simulation, it stops after the equilibration stating an error of "invalid value in set command" for this command- "set type 1 type/fraction 4 0.0008 1322". What I am doing in this command is setting up a new element type 4 from type 1 (which is Ni defined earlier in the script) with a fraction value of 0.0008. Can anyone please tell me why is this error popping up? What am I doing wrong and what should I do so that I can define a new type 4 from type 1 with the same fractional value? I have also added the section of codes where I am defining these types after the equilibration of the alloy with 1, 2 and 3 elements. Any help, in this case, will be highly appreciated. Thanks.

Here is the code for the diffusion part of my calculation-

variable tracerCharge equal 1 # Hydrogen

variable trFrac equal 0.1

############### Set type fraction for atom percent ###################

# definining the type of metals

# Introduction of new type of tracer element Hydrogen

set type 1 type/fraction 4 0.0008 1322

set type 2 type/fraction 5 0.0008 1422

set type 3 type/fraction 6 0.0008 1522

set type 1 type/fraction 7 ${trFrac} 1013

set type 7 charge ${tracerCharge} # charge of Hydrogen

###################### Group Atoms #############################

#Atom type 1, 2 and 3 are already defined in the earlier part of this same script for the equilibration simulation

group Ni1 type 4

group Fe1 type 5

group Cr1 type 6

group tracer type 7

More Tanumoy Banerjee's questions See All
Similar questions and discussions