Question on setting up "uniform flow boundary condition"

Dear Lammps members,

I want to set up a MD simulation to study drag on a cnt in an uniform argon flow inside a channel.

At present, I wrote a lammps script to setup a small system with 800 argon atoms inside a channel, and studied

its equilibrium pressure at a range of temperatures and densities.

I need to set uniform flow boundary condition at the channel inlet:
say, the atoms in 10% of the channel length at the entrance to be at a chosen temperature T and
a chosen average flow velocity U.

Could anyone give suggestions or outline procedures to setup this inlet condition ?

regards,
shankar

Dear Lammps members,

I want to set up a MD simulation to study drag on a cnt in an uniform argon
flow inside a channel.

At present, I wrote a lammps script to setup a small system with 800 argon
atoms inside a channel, and studied
its equilibrium pressure at a range of temperatures and densities.

I need to set uniform flow boundary condition at the channel inlet:
say, the atoms in 10% of the channel length at the entrance to be at a
chosen temperature T and
a chosen average flow velocity U.

Could anyone give suggestions or outline procedures to setup this inlet
condition ?

didn't we have already lengthy discussions on the subject where you
insisted to do things in a specific way? so what went wrong? what
about all the suggestions that you already got?

axel.

I am not able use “group” inside a loop the way I wanted to.

Perhaps the users may suggest other approaches.

I am not able use "group" inside a loop the way I wanted to.
Perhaps the users may suggest other approaches.
-----------------------------------------------------
Perhaps it is still a simple issue that I am not understanding about group:
To recall,

1. I wanted to identify a group of atoms within a region at each time step
and compute
its thermal properties.

2. At each iteration of the loop, atoms get added to the group -- so I tried
to delete
the group and recreate it each time. If I do that now the "compute" does
not work
and I cannot get the thermal properties.
(It works for the first iteration, but gives error on the second iteration )

this whole looping thing doesn't make sense for the purpose you
describe. it is far too inefficient and there is not need to it. just
define a suitable region and then use compute temp/region and you are
done.

axel.

p.s.: i have a very strong dejvu right now, so i am certain that this
is not the first time this is mentioned.

just define a suitable region and then use compute temp/region and you are done.

I think what I want is simple:

At each time step inside a loop, I simply want to identify a group of atoms within (x_min, x_max)
and do some “compute” on the group. Each time I enter the loop, I dont want previous iteration
atoms to be appended to current atoms within (x_min, x_max).

If you don’t want to listen to advice, why do you ask?

If it is so simple, why are you not doing it then?

Nobody can help people, if they stick to preconceived notions and are not willing to adjust. People have already told you that it is a very bad idea to mess with velocities in every step.

You have to make a choice: either you change your attitude or you will have to get your hands dirty and program whatever you want into lammps yourself.

Asking for the same thing over and over again is only going to make people angry at you.

Axel.

I received a suggestion from one user how to set a temperature of a region

using “fix langevin”.

No other previous suggestions how to set a velocity boundary condition at the channel inlet: an average uniform velocity = U along the channel direction at a temperature T.

( == If the velocity bias U is removed, then the temperature is T with associated random thermal velocity )

What “compute” do you want to do?
There is already compute temp/region.

There are also atom-style variables
which can have a 0/1 mask depending
on whether the atom is the region (or group).

Steve

Thank you. I have to eloborate on question to provide a background.

regards,

shankar

You shouldn’t put a compute command inside the loop.
Computes only need to be defined once. They
aren’t even invoked when you define them. They
are only invoked by other commands, e.g.
thermo output or a dump. So it is those commands
that should be operating inside your loop.

Steve

Everything would be a lot easier if you specified a constant force on
each fluid atom. This is a slightly different boundary condition than
uniform flow, but I doubt that the difference is of any great
significance. In both cases, the velocity profile will settle down to
a stable steady state, as long as you provide:

1. A constraint that opposes the driving force e.g. a tethered CNT
2. A thermostat for removing dissipative heating

Aidan

This helps.

Moving the “compute” outside the variable loop and using computes on regions
(example: “temp/region” and “reduce/region” ) instead of “group” works – can now

create “dynamic” group for uniform flow inlet bc.
This does produce an average uniform flow velocity in the rest of the domain.

Thank you.