Question on "group" : non-static grouping of atoms

Dear Lammps user,

Dear Lammps user,

---------------------------------------------------------------------

I would like some help with "grouping atoms in a non-static way". I describe
below the problem.
Perhaps one of you could suggest a simpler approach.

did you see that you can define equal style variables that access the
intersection of a group and a region?
that sounds to me like what you are looking for

axel.

Dear Axel,

Thank you for the quick response.

No, I did not know or try “equal” style. I will try it.

regards

shankar

Dear Axel,

I looked up your suggestion.

I presume you were referring to “equal” or “atom” variable styles that uses “group function” and “region function”, and their intersection:

for example : mass(group) , mass(group,region).

I have used them in another situations, and I think they will not help my current problem.

The reason is follows:

  1. To use the “region”, “group” functions or intersections,
    we should have already defined the “group” or a “region”.

The problem is precisely that: how to define a “group” in a on-static way, in the first place.

  1. On way I could do it was to define a “group” using “variable atom” style,

since lammps manual says that “equal” and “atom” styles are redefined each time

they are encountered.

Example pseudocode: I am creating a group “inlet” based on x-coord of atoms

in the range (xmin,xmax)

Dear Axel,

I looked up your suggestion.

I presume you were referring to "equal" or "atom" variable styles that uses
"group function" and "region function", and their intersection:
for example : mass(group) , mass(group,region).

I have used them in another situations, and I think they will not help my
current problem.

The reason is follows:

1. To use the "region", "group" functions or intersections,
   we should have already defined the "group" or a "region".

   The problem is precisely that: how to define a "group" in a on-static
way, in the first place.

isn't it obvious?? just define a group that contains all possible
atoms that may ever pass through the region. in the most extreme case,
use group all. then the region selection will select for you
dynamically.

axel.

isn’t it obvious?? just define a group that contains all possible

Perhaps you should mention as well which “conditions” you need to apply to your inlet atoms. For example, if you were to add a force to them note that fixes such as “addforce” can already achieve what you have in mind, i.e., it has a region keyword that allows you to add the forces only when the atoms belong to the group and are inside the region. If the group is “all” then the “region” feature performs the dynamic grouping.

Carlos

Dear Carlos,

Thank you for the response.

You sound like you are trying to impose the desired phenomenology on the system. In atomistic simulations phenomenology is the result of the laws of physics and not the other way around.

If you want to set the temperature in a certain region you could achieve it via the example pseudo-script below

region heated block EDGE EDGE EDGE EDGE {z_hot_low} {z_hot_high} units box
compute hot_temp all temp/region heated
fix langevin_hot all langevin {T_hot} {T_hot} {T_damp} {Seed}
fix_modify langevin_hot temp hot_temp

As to the constant velocity at the inlet this contradicts the fact that you have temperature in such a region. If your particles have all the same constant velocity then their temperature is zero (translation of a system as a whole does not contribute to the temperature). This is why I said I believe you don’t understand what you need to do to simulate your system so that the desired phenomenology is the output and not the input.
I could speculate about what’s exactly that you are trying to say (or do) but you are probably better off consulting with your adviser to better understand your needs.

Anyways this is as far as my free advice goes.

Carlos

You sound like you are trying to impose the desired phenomenology on the system.

The phenomenon to study is the drag on a carbon-nanotube in a uniform flow.

So I am trying to create uniform flow around the cnt.
To do that I wanted to impose constant temperature and constant velocity at the

domain inlet ( say 5% of the domain).

If the system is run long enough, then the flow in the rest of the domain will have the same uniform velocity as well. Once that is shown correct, then can do introduce the cnt into the domain.

The phenomenon to study is the drag on a carbon-nanotube in a uniform flow.
So I am trying to create uniform flow around the cnt.
To do that I wanted to impose constant temperature and constant velocity
at the
domain inlet ( say 5% of the domain).

The more you describe your systems the more clear it becomes that you don't
understand how to link microscopic to macroscopic. In the micro world one
thing is constant velocity and another one constant average velocity.

If the system is run long enough, then the flow in the rest of the domain
will have the same uniform velocity as well. Once that is shown correct,
then can do introduce the cnt into the domain.

I set a random thermal velocity sampled from gaussian dist, for a chosen

temperature T.

The to that random thermal velocity I add a uniform translation velocity U.

So if the velocity bias ( translation velocity U ) is removed, the

temperature is T.
---------
velocity flow_inlet create T {rndG} dist gaussian
velocity flow_inlet set $U 0.0 0.0 sum yes
-----------

Nonsense! The condition you are trying to impose via the velocity command
is just an initialization condition. The energy dissipation mechanisms
within the system that result from the interaction between the particles,
etc will make that initial momentum flux disappear unless:
1-) there are not interactions at all == Galilean relativity principle
2-) you impose some constant action on the system that effectively induces
such a steady state flow.
This is nothing but further proof about you only understanding the
phenomenology of the problem.
If you truly knew how to deal with the physics you would be looking for the
proper commands in the documentation. Or at least posting more objective
questions... Whether the engine is call LAMMPS, PLUG, SOCKET, LIGHT-BULB
that is irrelevant.
Carlos