Dear Lammps users:
In a box of liquids, I wish to maintain the temperature of fluids in region x1 < x <x2 to a fixed value. How can we accomplish this?
My idea is to use “fix temp/rescale”, which requires a group-ID. Since atoms in region x1 < x <x2 moves in/out of this region during simulation, we have to define a dynamic group. Maybe we can use “compute temp/region” to solve this? Specifically, since “compute temp/region” does have a group-ID as argument, maybe this command will generate a dynamic group, which can be put as input to the “fix temp/rescale” command? Specifically, will the following script work?
region middle_region block x1 x2 INF INF INF INF units box
compute 1 midFluids temp/region middle_region
fix 2 midFluids temp/rescale 20 300 300 0.01 1.0
Thank you very much for your time.
With best regards,