[lammps-users] Can't get "fix heat" option to work correctly

Good Morning,

I was wondering if anyone has used the fix heat command to induce a temperature profile in a model?

I have an 80 layer layered crystal in which each layer is a unique type and molecule. I specified the fix heat as follows:

fix 1 qin heat 500 0.0005
fix 2 qout heat 500 -0.0005
compute ke all ke/atom
variable temp atom c_ke[]/1.5/8.617e-5
fix 21 all ave/spatial 1 500 500 z 0 .0125 v_temp file temp_80_layer.profile units reduced
fix 3 all nve
thermo_style custom step temp pe ke etotal press vol lx ly lz
thermo 500

qin is defined as a group of layer 40 and qout as a group of layer 1.

I seem to have two problems. First, the termperature of the system continually increases so it apperas that heat is not being removed form the system, only added. When I look at the temperature profile, this is confirmed. One can clearly see the energy being added to layer 27, but there is no energy sink. Second, no matter which layer I specifiy the heat source, it seems to be applied to layer 27 of 80.

Can any one give me some suggestions and shed some light on my potential problem?


Bill Evans

Dear Evans,

Just a thought, Is it possible that you have mistakenly defined group 1 and 2 in different direction (like in X and Y). For me it has worked fine in past. I haven’t tried the latest version of lammps though.


2009/4/21 WJ Evans <evansw3@…707…>

Hi Bill. Sounds to me like a problem with the group definitions. Does the LAMMPS output report the correct number of atoms in each of the groups that you have defined? If so, and you still don’t see what the problem is, you can send me your I/O so that I can take a closer look.