Hi all,
Using LAMMPS (22 Aug 2018) to generate a Fe-17Cr-12Ni alloy
Generating a ternary alloy using the ‘set type/fraction’ command does not work as expected, or the documentation may be ambiguous. Initially I tried to set the at% using two consecutive set commands:
create_atoms 1 box
set group all type/fraction 2 0.18 12345
45948 settings made for type/fraction
set type 1 type/fraction 3 0.13 12345
0 settings made for type/fraction
group gFe type 1
210052 atoms in group gFe
group gCr type 2
45948 atoms in group gCr
group gNi type 3
0 atoms in group gNi
From the man page, it seems that using the ‘type’ style, one should be able to select/set ONLY type 1 atoms to the specified fraction. In fact, it seems that only type 2 atoms are able to be modified at all with the second ‘set’ command. In the following output only type 2 atoms are modified, but the fraction of type 3 atoms generated corresponds to the fraction of the whole system still:
create_atoms 1 box
Created 256000 atoms
set group all type/fraction 2 0.18 12345
45948 settings made for type/fraction
set group all type/fraction 3 0.13 12345
33252 settings made for type/fraction
group gFe type 1
210052 atoms in group gFe
group gCr type 2
12696 atoms in group gCr
group gNi type 3
33252 atoms in group gNi
Alternate methods I’ve tried are:
-Initializing the box with type 3 and converting to type 1,2 (in this case, type 3 atoms could not be modified with the second ‘set’ command)
-Creating a separate group by type, and then using set group type/fraction on the new group
The workaround for me is that I only modify type 2 atoms with the second ‘set’ command, and set an intentionally large fraction X2, where X2-X3 is the actual at% desired. Again, the fraction is still at% of the whole system, not of the subset selected by type.
Set group all type/fraction 2 0.29 288585
131447 settings made for type/fraction
set type 2 type/fraction 3 0.11 288585
50041 settings made for type/fraction
Unsure if this is a bug, or this was the intended use.
Thanks in advance,
Kevin Chu