Dynamic group for Poiseuille flow

Deas Lammps users,

I am using dynamic groups for simulation of Poiseuille flow. As the picture shown in attach file, my model is two parallel plates with two tanks at the ends of these plates. Fluid atoms in the left-most pressure zone defined as a dynamic group in the left tank will be used to add a body force along x direction to each fluid atom in this zone. After that, thermostat will be performed for fluid atoms in the thermostat zone which is also specified as another dynamic group. I also defined another two dynamic groups for region between two parallel plates and right tanks respectively. All three dimensions are periodic boundary condition. Wall atoms are tethered to lattice through fix spring/selfcommand.

Initially, Creating fluid atoms in two tanks. Controlling temperature T_fluid_0 for fluid atoms in two tanks and channel equal to wall’s temperature T_wall by using fix nvtcommand for 1ns (timestep=1fs).

Next, reseting all fluid atoms’ temperature to a constant T_fluid less than wall temperature T_wall and thermostatting fluid atoms in temperature zone in left tank. At same time, a body force will be added to fluid atoms located in left tank’s pressure zone.

At the last stage, I would like to use fix ave/chunk to sample local values for the dynamic group defined for region between two parallel plates. And a error occurs, it is ‘Fix ps_md does not allow use of dynamic group (…/modify.cpp:239)’. I try to use compute temp/chunk coupled with fix ave/time to output each bin’s velcocity for the dynamic group. A error appear again, ‘Fix ps_com_flow_1_COMPUTE_STORE does not allow use of dynamic group (…/modify.cpp:239)’.

So my problems are:
(1) How to output each bin’s value for dynamic group, such as local temperature, velocity and local number density?
(2) Because I am a new one to model poiseuille flow using lammps, I will be grateful if you can point some mistakes I made in all simulating process.
(3) Are there other ways to achieve this poiseuille flow instead so much dynamic groups?

Many thanks.

Best regards,
Qiangqiang Sun

Poiseuille flow.jpg

Generating correct time-averaged profiles in LAMMPS is sufficiently complicated that it is a good idea to first get it working by itself first, and then add in the various other features of your simulation. A nice simple example of this is given in examples/VISCOSITY/in.nemd.2d.

I think your specific problem is due to the fact that fix ave/chunk can not be applied to a dynamic group. You can get around this by applying it to a non-dynamic group, or even the group all.