LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Question about set up step potential in gcmc lammps

Re: [lammps-users] Question about set up step potential in gcmc lammps

 From: vo thuy phuong Vo Date: Tue, 18 Jul 2017 15:57:13 +1000

Dear Axel,
So sorry that confusing you. Yes, I want to compress the atoms in the inner region. I will describe them again. I would like to see the condensation (or higher density of particles) in the inner regions so I use fix addforce for atoms only in the inner region. I have add forces to the outer regions also with opposite sign. However, the obtained output shows me that the number of atoms in the inner region is not higher than outer1 region. Could you suggest me which wrong with my assumption and is there any possible way or command in Lammps that I could do it?
Thank you very much.

Here is my input
units                         real
atom_style            atomic
boundary               p p p
region                r1 cylinder z 0 0 5 0 100
region                outer1 cylinder z 0 0 5 0 35
region                inner  cylinder z 0 0 5 35 70
region                outer2  cylinder z 0 0 5 70 105
create_box            1 r1
mass                         1 16.0425
pair_style               lj/cut 10.0
pair_coeff              1 1 0.2943 3.81 10.0
#group  ch4  type 2
thermo                    1000
compute_modify thermo_temp dynamic yes
variable       chempot equal -2000
variable       num equal count(all,outer1)
variable       num2 equal count(all,outer2)
variable       num3 equal count(all,inner)
variable       chempotkcal equal \${chempot}/503.219
fix           1 all addforce 0 0 20 region inner
fix           3 all addforce 0 0 -10 region outer1
fix           4 all addforce 0 0 20 region outer2
fix            2 all gcmc 1 100 100 1 29494 300.0 \${chempotkcal} 0.5
thermo_style   custom step atoms temp pe ke etotal press vol v_chempot density atoms v_num v_num2 v_num3
run            100000

Have a good day.

Phuong

2017-07-17 22:20 GMT+10:00 Axel Kohlmeyer :
On Mon, Jul 17, 2017 at 3:36 AM, vo thuy phuong Vo
<thuyphuongqnu@...24...> wrote:
> Dear Lammps-users,
> I just noticed that my input has problem with the variable num (it should be
> v_num). However, the results seems do not look like what I expect. I would
> like to create an extra force only in the inner region, then if the atoms
> move out of other regions, this force will be disappeared. Therefore, if
> everything is fine, the number of atoms in the inner region has be to larger
> than others. That's why I am so confused

in z-direction to the atoms in the inner region.
that will accelerate all of them in z-direction. nothing more. the
result should be to induce a flow in z-direction.
if you want to compress the atoms in the inner region, you have to add
forces to the atoms in the two *outer* regions with opposite sign.

axel.

> 1. How can I set up the extra force only for the inner region?
> 2. Why the total number of all region (r1) is not equal when I sum them all
> from different regions (outer and inner)?
> units                         real
> atom_style            atomic
> boundary               p p p
> lattice                       sc 0.5
> region                r1 cylinder z 0 0 5 0 100
> region                outer1 cylinder z 0 0 5 0 35
> region                inner  cylinder z 0 0 5 35 70
> region                outer2  cylinder z 0 0 5 70 100
> create_box            1 r1
> mass                         1 16.0425
> pair_style               lj/cut 10.0
> pair_coeff              1 1 0.2943 3.81 10.0
> #group  ch4  type 2
> thermo                    1000
> compute_modify thermo_temp dynamic yes
> variable       chempot equal -2000
> #variable       density equal atoms/vol
> variable       num equal count(all,outer1)
> variable       num2 equal count(all,outer2)
> variable       num3 equal count(all,inner)
> variable       chempotkcal equal \${chempot}/503.219
> fix            1 all addforce 0 0 -100.0 region inner
> fix            2 all gcmc 1 100 100 1 29494 300.0 \${chempotkcal} 0.5
> thermo_style   custom step atoms temp pe ke etotal press vol v_chempot
> density atoms v_num v_num2 v_num3
> run            100000
>
> Thank you very much and so sorry for my question. It may be obvious but I
> just start with Lammps and still feel confused. I have tried but cannot
> solve them by myself.
>
> Best,
>
> Phuong.
>
> 2017-07-17 16:14 GMT+10:00 vo thuy phuong Vo <thuyphuongqnu@...24...>:
>>
>> Dear Axel,
>> Thank you very much for your help. I have made an input and set up an
>> extra force. I would like to see the different number of particles in
>> different regions so I use the command count(ID, region). However, the error
>> was shown that no atoms in group ch4. Could you please help me to figure out
>> this? I try to take a look in the manual as well as other questions but
>> everything seems normal.
>> Here is my input (I just set up all the values randomly because I just
>> want to check how it works)
>> units                         real
>> atom_style            atomic
>> boundary               p p p
>> lattice                       sc 0.5
>> region                r1 cylinder z 0 0 5 0 100
>> region                outer1 cylinder z 0 0 5 0 35
>> region                inner  cylinder z 0 0 5 35 70
>> region                outer2  cylinder z 0 0 5 70 100
>> create_box            1 r1
>> mass                         1 16.0425
>> pair_style               lj/cut 10.0
>> pair_coeff              1 1 0.2943 3.81 10.0
>> group  ch4  type 1
>> thermo                    1000
>> compute_modify thermo_temp dynamic yes
>> variable       chempot equal -2000
>> variable       density equal atoms/vol
>> variable       num1 equal count(ch4,outer1)
>> variable       num2 equal count(ch4,outer2)
>> variable       num3 equal count(ch4,inner)
>> variable       chempotkcal equal \${chempot}/503.219
>> fix            1 all addforce 0 0 -2.0 region inner
>> fix            2 all gcmc 1 100 100 1 29494 300.0 \${chempotkcal} 0.5
>> thermo_style   custom step atoms temp pe ke etotal press vol v_chempot
>> density atoms num1 num2 num3
>> run            10000
>> Thank you very much.
>>
>> Phuong.
>>
>> 2017-07-13 13:45 GMT+10:00 Axel Kohlmeyer <akohlmey@...24...>:
>>>
>>> On Wed, Jul 12, 2017 at 11:39 PM, vo thuy phuong Vo
>>> <thuyphuongqnu@...33....24...> wrote:
>>> > Hello Axel,
>>> > Thank you for your help. As I read in the manual, I can set up region
>>> > with
>>> > different parameters (pressure, chemical potential). However, in this
>>> > case,
>>> > I want to keep these parameters same in two regions. In stead of set up
>>> > different pressure or chemical potential, could I set up an external
>>> > potential within a certain region that can help my lennard-jones
>>> > particles
>>> > confined in that region? Could I use the fix addforce command to do
>>> > this? I
>>> > plan to add an external force for particles if they move into
>>> > particular
>>> > region and without external force for other region. Is it possible?
>>>
>>> this is different from what you asked before.
>>> sure you can define an additional confinement potential.
>>> fix addforce is one option, fix wall/region is another.
>>>
>>> axel.
>>>
>>> > Thank you very much!
>>> >
>>> > Best,
>>> >
>>> > Phuong
>>> >
>>> > 2017-07-10 21:08 GMT+10:00 Axel Kohlmeyer <akohlmey@...24...>:
>>> >>
>>> >> On Sun, Jul 9, 2017 at 11:47 PM, vo thuy phuong Vo
>>> >> <thuyphuongqnu@...24...> wrote:
>>> >> > Dear Lammps-users
>>> >> > I am a new user Lammps and would like to perform gcmc using fix gcmc
>>> >> > command
>>> >> > in lammps. My system is a cylinder in which the middle region is put
>>> >> > a
>>> >> > deeper potential then outer region. As the definition of chemical
>>> >> > potential
>>> >> > in gcmc:
>>> >> > mu=ln(particle density) + beta*potential.
>>> >> > I would like to control mu constant by gcmc but the middle region
>>> >> > has
>>> >> > deeper
>>> >> > potential so that the particles will be more in this region. I
>>> >> > wonder
>>> >> > can
>>> >> > lammps support this feature which we can set up the different
>>> >> > potential
>>> >> > for
>>> >> > different region (so that the obtained density particles will be
>>> >> > different
>>> >> > too) in gcmc (chemical potential is controlled to be constant)?
>>> >> > As I look in the manual, we can set up different pressure but in
>>> >> > this
>>> >> > case,
>>> >> > I would like to use the step potential for my system. Is it
>>> >> > possible?
>>> >> > Thank
>>> >>
>>> >> you can define two target regions (the inside and the outside of your
>>> >> cylinder) and then set up two fix gcmc commands with different
>>> >> parameters, each restricted to one of the two regions.
>>> >>
>>> >> axel.
>>> >>
>>> >> > you very much.
>>> >> >
>>> >> > Best,
>>> >> >
>>> >> > Phuong
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > ------------------------------------------------------------------------------
>>> >> > 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@...396...sourceforge.net
>>> >> > https://lists.sourceforge.net/lists/listinfo/lammps-users
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
>>> >> College of Science & Technology, Temple University, Philadelphia PA,
>>> >> USA
>>> >> International Centre for Theoretical Physics, Trieste. Italy.
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
>>> College of Science & Technology, Temple University, Philadelphia PA, USA
>>> International Centre for Theoretical Physics, Trieste. Italy.
>>
>>
>

--
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.