Hi all,
Using Lammps (15 Apr 2020) to generate a Ti-20Ta-20Nb-20Zr-20Mo alloy. Here fractions for the Ta, Nb, Nb, and Zr are in Wt. %. For this I used set type/fraction like below
variable fTa equal 20
variable fNb equal 20
variable fZr equal 20
variable fMo equal 20
create_box 5 box
create_atoms 1 box
set type 1 type/fraction 2 ((v_fTa+v_fNb+v_fZr+v_fMo)/100) 1734536
set type 2 type/fraction 3 (v_fNb/(v_fTa+v_fNb+v_fZr+v_fMo)) 1734535
set type 2 type/fraction 4 (v_fZr/(v_fTa+v_fNb+v_fZr+v_fMo)) 1734534
set type 2 type/fraction 5 (v_fMo/(v_fTa+v_fNb+v_fZr+v_fMo)) 1734533
group gTi type 1
group gTa type 2
group gNb type 3
group gZr type 4
group gMo type 5
print “type 1 percent: (100.0-v_fTa-v_fNb-v_fZr-v_fMo) vs (count(gTi)/atoms100.0)"
print "type 2 percent: {fTa} vs (count(gTa)/atoms100.0)”
print “type 3 percent: {fNb} vs (count(gNb)/atoms100.0)"
print "type 4 percent: {fZr} vs (count(gZr)/atoms100.0)”
print “type 5 percent: {fMo} vs (count(gMo)/atoms*100.0)”
After running the input file I am getting a different weight fraction in the output file.
**output file**
print "type 1 percent: $(100.0-v_fTa-v_fNb-v_fZr-v_fMo) vs $(count(gTi)/atoms*100.0)"
type 1 percent: 20 vs 20.179253754996391734
print "type 2 percent: ${fTa} vs $(count(gTa)/atoms*100.0)"
type 2 percent: 20 vs 33.544047472310758451
print "type 3 percent: ${fNb} vs $(count(gNb)/atoms*100.0)"
type 3 percent: 20 vs 20.084168266098501476
print "type 4 percent: ${fZr} vs $(count(gZr)/atoms*100.0)"
type 4 percent: 20 vs 14.953073550386505985
print "type 5 percent: ${fMo} vs $(count(gMo)/atoms*100.0)"
type 5 percent: 20 vs 11.239456956207849458
Why these fractions are not matching with the input values? How can
I get the same fractions in output file like in input file.