Use two neighbor lists in my simulation

JF's picture
Submitted by JF on Mon, 12/20/2010 - 14:47

Hello everyone,

I want to know if it is possible to use two different neighbor lists in my simulation. I use one neighbor list to load once my interactions via a txt file to define two bodies and now I want to detect the new interactions between these two bodies created during my simulation. To do this, I need to use a second neighbor list linked to a second pair_style.

Please, can you help me to do that ?

For example, it's as though you create one neighbor list only for partcles of type X with interactions led by gran/hooke/history and a second neighbor list only for partcles of type Y with interactions led by gran/hertz

Regards
JF

ckloss's picture

ckloss | Mon, 12/20/2010 - 15:16

Sure, you can use as many lists as you like...

>>To do this, I need to use a second neighbor list linked to a second pair_style.
If a two pair styles are active, they automatically register the list they need.
If the lists coincide, only one list is generated, if not, two different lists are used

Christoph

JF's picture

JF | Mon, 12/20/2010 - 17:31

Hi Christoph,

That's a very good news, so I added a new pair_style, but in the neighbor.cpp file the parameter "nlist" is always equals to 2 with or without the new pair_style (pair_style gran/hertz/history 0 0).

In my simulation file I have:

neighbor 0.2 txt
neigh_modify once yes

pair_style lattice/history 0 0
pair_style gran/hertz/history 0 0
pair_coeff * *

Please, can you point out me the right command that I must use

Regards
JF

ckloss's picture

ckloss | Mon, 12/20/2010 - 17:34

In this case, the second line overrides the first, you have to use pair_style hybrid/overlay.
I am not sure how you have coded your "txt" neighbor list, this may have some implication on the granular pair style.

Cheers,
Christoph

JF's picture

JF | Tue, 12/21/2010 - 09:37

Hi Christoph,

I have just a last question before using pair_style hybrid/overlay. When you define a new pair style, can you define for this new pair style an other neighbor style associated.

For example, is it possible to do something like this:

neighbor 0.2 txt
neigh_modify once yes

neighbor 0.2 bin
neigh_modify delay 0

pair_style lattice/history 0 0
pair_style gran/hertz/history 0 0
pair_coeff * *

Thanks
JF

ckloss's picture

ckloss | Tue, 12/21/2010 - 10:44

Do you want all your particles to interact via the lattice beam model as well as granular interaction? Or do you want to pour some particles onto a beam that is modeled by the lattice beam model?
Christoph

JF's picture

JF | Tue, 12/21/2010 - 11:12

I think it is the first choice. I have two bodies made with two different sphere packing. The mechanical behaviour of two bodies is led by the lattice beam model (this part is done). However these two bodies can be in contact many times during my simulaton. Therefore at the contact interface level, I need to detect the interactions between the particles 1 and particles 2 to apply Hertz law.

To perform this dectection, I need to use a second neighbor list and a second pair style. Now, I look at the pair_style hybrid/overlay maybe it is the good command which I need.

Regards
JF

ckloss's picture

ckloss | Tue, 12/21/2010 - 14:10

Hm, I would say that in this case it should be a hybrid/overlay pair style, with the granular interaction within a body being deactivated.

As far as I see, this will require a "hybrid" neighbor list style, with txt for lattice beam and "bin" for granular. I am not sure about the best way to do this. Maybe you can post this question to the lammps-users mailing list on sourceforge so we get Steve Plimpton's opinion on that.

Cheers,
Christoph