LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] about the fix reax/c/species command in lammps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] about the fix reax/c/species command in lammps


From: Tony Liu <tonyliu0224@...24...>
Date: Fri, 16 Jun 2017 13:42:48 +0900

Dear Prof. Kohlmeyer,

Thanks so much and it really works!

Thank you very very much for you continuous help me, a LAPPMS beginner!

Best regards,

Xiaolong

Xiaolong Liu

Ph.D student
Department of Aerospace and Mechanical Engineering
Korea Aerospace University
76, Hanggongdaehang Road, Deokyang District, Goyang, Gyeonggi Province, 412-791, R.O. Korea.
Tel.: 82-2-300-0057
Fax: 82-2-3158-2191

2017-06-16 6:55 GMT+09:00 Axel Kohlmeyer <akohlmey@...24...>:


On Wed, Jun 14, 2017 at 1:43 AM, Tony Liu <tonyliu0224@...24...> wrote:

Dear Lammps Community,

 

Please forgive me to again report a strange phenomenon resulted from fix reax/c/species command.

I built an bicrystal alloy model consisting of total 3010 atoms.

By the atom type setting command: set group alloy type/fraction 1 0.82 12963 type/fraction 2 0.13 23486 type/fraction 3 0.05 23486,

I intend to set 82% Fe atom, 13% Cr atom and 5% Al atom.

And the log.lammps shows the following reasonable results:

  2454 settings made for type/fraction

  397 settings made for type/fraction

  143 settings made for type/fraction

However, the fix reax/c/species command output a different result: Fe2118Cr251Al624.

Although I enabled the reax/c with kokkos package by the following changes, the same problem occurred again.

​yes, because the problem is *not* with fix reax/c/species but falls into the PEBCAC category, i.e. it resides between the chair and the computer.

the "fraction" is always applied to the group of the set command (which is all atoms). so with the second type/fraction set will *also* consider atoms, that have already been changed to type 1. you can confirm, that fix reax/c/species is working correctly, by issuing the following 3 commands and checking the log file:

group Fe type 1
2131 atoms in group Fe
group Cr type 2
254 atoms in group Cr
group Al type 3
625 atoms in group Al

to explain. the first type/fraction command does change 2454 atoms from type 3 to type 1, the second command changes 397 atoms to type 2, however quite a few of them were of type 1 and not type 3. the last command makes things even worse, as you now change 5% of all 3010 atoms to type 3, and - again - it is most likely that you change atoms of type 1 or 2.

the correct way to go about this, is the following:

set group all type/fraction 1 0.82 12963

​# now there are about 18% atoms left as type 3
# you want a ratio of 13:5 Cr to Al, i.e. a fraction of 13/18 = 0.72222 needs to be converted from Cr to Al
​# make a group that only contains type 3 atoms.

group CrAl type 3
set group CrAl type/fraction 2 0.722222222 23486

group Fe type 1
2454 atoms in group Fe
group Cr type 2
39
​4​
atoms in group Cr
group Al type 3
16
​2​
atoms in group Al

​# that is: 81.5% Fe, 13.1% Cr and 5.4% Al​

or even better, do it the other way around, i.e. create all atoms as type 1, then convert 18% of those to type 2 and 27.7777% of the type 2 to type 3.
with that i get:

set group all type/fraction 2 0.18 12963
Setting atom values ...
  508 settings made for type/fraction
group CrAl type 2
508 atoms in group CrAl
set group CrAl type/fraction 3 0.2777777777 23486
Setting atom values ...
  149 settings made for type/fraction

group Fe type 1
2502 atoms in group Fe
group Cr type 2
359 atoms in group Cr
group Al type 3
149 atoms in group Al

​-> 83.1% Fe, 11.9%​ Cr, 5% Al


mystery solved. LAMMPS is working fine, but your input script needs an upgrade. ;-)

axel.


 

e.g. pair_style reax/c into pair_style reax/c/kk & fix reax/c/species into fix reax/c/species/kk

My lammps information is as follows:

Lammps version: 31Mar17;

Packages: Kokkos, User-reaxc, User-misc, molecule, qeq, reax, replica, rigid, kspace, manybody

Makefile.ubuntu: KOKKOS_DEVICES=OpenMP;

Running command: mpirun -np 4 -k on -sf kk -in in.mini

How do you like such problem?

Any advices will be highly appreciated! I look forward to your positive response,

Thanks in advance,

Best regards,

Xiaolong Liu from Korea Aerospace University.


Xiaolong Liu

Ph.D student
Department of Aerospace and Mechanical Engineering
Korea Aerospace University
76, Hanggongdaehang Road, Deokyang District, Goyang, Gyeonggi Province, 412-791, R.O. Korea.
Tel.: 82-2-300-0057
Fax: 82-2-3158-2191

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...43...4...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.