# Lost atom in * f * style boundary

Dear Lammps Users,

I need to simulate nano-flow in x direction which is confined by two parallel walls normal to z direction. There are three layers of wall atoms in each wall. I divided 6 groups for every wall along with x direction and temperature for each group (T1(constant) < T2(constant) < T3 (constant) < T4(constant) < T5(constant) < T6(constant)) is varied. There are around 50,000 atoms for every wall and 20,000 fluid atoms.

In simulation, * f * style boundary is used in z direction and periodic boundary conditions are used in x and y direction. Initialising velocity for each group wall atoms while do not perform updating wall atomsâ€™ velocity and position. LJ potential is used to calculate interactions for wall-wall, wall-fluid and fluid-fluid atoms.

My question is that some fluid atoms go through the walls in z direction and the simulation is terminated. So what can I do to solve this problem, creating more wall atoms or using WCA potential rather than LJ for wall-fluid interaction?

Also, I am not sure that, for a wall, thermostatting for every group wall atoms under different constant temperature can be done by using idealized wall instead of rough wall (made of particles) in z direction. If yes, I may use * fix wall/reflect * command so that fluid atoms may not go through wall.

Thank you.

Best wishes,
Qiangqiang Sun

First off, what you are trying to achieve (confined fluid, fluid flow, a temperature gradient in the wall) is quite complicated, and you are starting from a low level of knowledge. You should start with a simpler problem with well-established solutions, to allow you to build up knowledge and avoid obvious problems. So try confined fluid plus fluid flow; their is lots of detailed information on this in the literature. You will need to figure out how to allow the wall atoms to move dynamically, without flying apart, and without allowing holes to form so the fluid particles do not leak out. This is all stuff that people have figured out many times before. After that, you will can deal with the temperature gradient. For a lot of these things, the best solution is a separate Langevin thermostat for each group of atoms.

Regarding your final question, you could use fix wall/reflect and create a temperatue gradient directly in the fluid using an atom style variable for Tstart in fix langevin:

" Atom-style variables can specify the same formulas as equal-style variables but can also include per-atom values, such as atom coordinates. Thus it is easy to specify a spatially-dependent temperature with optional time-dependence as well."

Aidan