Modifying atom velocities as they recycle from one boundary to another

I want to modify velocity magnitude for individual atoms as they cross the simulation box boundary and are recycled to the opposite boundary. Is there a way to do this automatically withing the simulation? In other words, is there a command and parameter selection that can be used to alter the velocity (or other parameters) when an atom crosses the boundary and is returned to the opposite end of the model?

Probably need to write your own fix.

Can you elaborate some more about why you need this specifically and what you want to achieve altogether?

Yes, my intention is to create a model that is experiencing a steady state heat flow, meaning, the two ends of the simulation box are at differing but constant temperatures. By my thinking, the best way to do this is to increase the velocity of particles entering (recycling) to the “hot” end and decrease the velocity of particles entering the “cold” end of the model.

I am really a beginner on LAMMPS, so really don’t have the expertise to modify the source code. Just thinking there might be a built in command that I could take advantage of to make this happen.

That is a bad idea. With periodic boundaries, you do not have “ends” of a box, just a continuum. So you will have the “hot” and the “cold” zone directly facing each other. The better setup would be to have two equally spaced thermostatted zones, e.g. one at the edge and one off the center. This way you have your heat flow going both ways from the two regions and you can combine the data obtained from that.

Check out the various methods for computing thermal conductivity, especially the first method (in.langevin) in the examples/KAPPA folder.

The bigger problem here is that you are trying to simulate an advanced problem that requires sufficient background knowledge and an overview of what people have done before.

Any direction you could give where people have done similar research using LAMMPS would be appreciated. I can learn from those. Thanks.

I will check examples/KAPPA folder and learn what I can. Thanks

hi @scheevel,

the documentation of the commands used in the KAPPA directory has references to the related papers. This is a good place to start.

1 Like