Temperature distribution after using fix evaporate command

Dear all,

I used fix evaporate command to delete molecules in a tube sealed by a piston under a constant pressure. Although the temperature output by thermo_style seems correct, the temperature shows a distribution along the tube with an increasing trend after the deletion of liquid molecules. The temperature increases from the dead-end of the tube all the way to the sealing piston.

Is this reasonable or how should I avoid this? The code about calculation is attached below.

fix Fadd Piston aveforce ${force} 0 0
fix frezPiston Piston setforce NULL 0 0

fix WallNVE allwall nve
fix LiqNVT2 Liq nvt temp${temperature} {temperature} (150*dt)

compute T_Liq_modi Liq temp
compute_modify T_Liq_modi dynamic/dof yes
fix_modify LiqNVT2 temp T_Liq_modi
fix avg_T_Liq_modi Liq ave/time 1 {NthermoFreq} {NthermoFreq} c_T_Liq_modi

thermo ${NthermoFreq}
thermo_style custom step f_avg_T_Liq_modi atoms
run_style verlet
timestep 1

reset_timestep 0

region bath block 100.0 INF INF INF INF INF side in
fix delete_Liq Liq evaporate 5000000 4000 bath 55555 molecule yes

comm_style tiled
fix tiled_division all balance 1000 1.1 rcb

density along x

compute dens_Liq Liq chunk/atom bin/1d x lower ${binx} units box bound x 0.0 400.0
fix dens_Liq_out Liq ave/chunk 2 25000 50000 dens_Liq density/number ave one file dens_Liq.dat

temperature aloing x

compute Temp_Liq Liq chunk/atom bin/1d x lower ${binx} units box bound x 0.0 400.0
fix Temp_Liq_out Liq ave/chunk 2 25000 50000 Temp_c10 temp norm all file Temp_Liq.dat

run ${Totstep2}

It’s very hard to assess you script, since it is broken in to fragments, and there are obviously many commands that are missing. I will make a few general comments:

  1. Any simulation in which atoms are continuously removed is by definition not in an equilibrium state, and therefore one should not expect to observe isothermal conditions, in general
  2. If you are careful, and remove atoms slowly enough, you may be able to achieve a close-to-equilibrium quasi-steady state in which atoms are removed sufficiently slowly that the resultant localized cooling or heating has time to spread through the rest of the system, in which case the temperature gradient will be negligible. The fix not thermostat will also add or remove energy to the system to compensate for the cooling or heating, but it can’t by itself eliminate the gradient. A fix langevin thermostat could eliminate the gradient, because it operates separately on each atom.
  3. No matter what, you will have to carefully examine the output and examine the sensitivity of the gradient to the various simulation parameters.
  4. In situations like this, it is always best to first start by reproducing a related previously published result that you think is trustworthy.
1 Like