LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

fix heat command

Syntax:

fix ID group-ID heat N eflux 

Examples:

fix 3 qin heat 1 1.0
fix 4 qout heat 1 -1.0 

Description:

Add non-translational kinetic energy (heat) to a group of atoms such that their aggregate momentum is conserved. Two of these fixes can be used to establish a temperature gradient across a simulation domain by adding heat to one group of atoms (hot reservoir) and subtracting heat from another (cold reservoir). E.g. a simulation sampling from the McDLT ensemble. Note that the fix is applied to a group of atoms, not a geometric region, so that the same set of atoms is affected wherever they may move to.

Heat addition/subtraction is performed every N timesteps. The eflux parameter determines the change in aggregate energy of the entire group of atoms. Thus it is an "extensive" quantity, meaning its magnitude should be scaled with the number of atoms in the group. Since eflux is in units of energy/time, this means a larger value of N will add/subtract a larger amount of energy each timestep the fix is invoked. If heat is subtracted from the system too aggressively so that the group's kinetic energy goes to zero, LAMMPS halts with an error message.

Fix heat is different from a thermostat such as fix nvt or fix temp/rescale in that energy is added/subtracted continually. Thus if there isn't another mechanism in place to counterbalance this effect, the entire system will heat or cool continuously. You can use multiple heat fixes so that the net energy change is 0.0 or use fix viscous to drain energy from the system.

This fix does not change the coordinates of its atoms; it only scales their velocities. Thus you must still use an integration fix (e.g. fix nve) on the affected atoms. This fix should not normally be used on atoms that have their temperature controlled by another fix - e.g. fix nvt or fix langevin fix.

Restart, fix_modify, output, run start/stop, minimize info:

No information about this fix is written to binary restart files. None of the fix_modify options are relevant to this fix.

This fix computes a scalar which can be accessed by various output commands. This scalar is the most recent value by which velocites were scaled. The scalar value calculated by this fix is "intensive", meaning it is independent of the number of atoms in the simulation.

No parameter of this fix can be used with the start/stop keywords of the run command. This fix is not invoked during energy minimization.

Restrictions: none

Related commands:

compute temp, compute temp/region

Default: none