Invalid attribute temperature in dump

image

I want to see the temperature distribution through the dump command, but I get the error ‘Invalid attribute temperature in dump’. Can you tell me how to see the temperature distribution with the dump command as shown above?

Thank you

There are two problems here: 1) a conceptual issue and 2) a technical issue.

  1. conceptually, the thermodynamic definition of temperature does not work for a small number of atoms, let alone a single atom, so temperature is ill defined at this scale. You can really only determine the the kinetic energy of atoms well and then assume perfect equipartitioning to convert that kinetic energy to a temperature scale.

  2. technically, the “temperature” property you see mentioned is a per-particle property of a mesoscale model and requires the use of a suitable atom style and pair style etc. In these kind of models, the “particle” actually represents a large number of atoms and their temperature is a per-particle property that is then used in their force computation and particle propagation.

So how do your get your plot?

  • use compute ke/atom to get the kinetic energy per atom
  • either output it directly and adjust the scale later or convert it - based on equipartitioning - to a temperature scale based on \mathrm{KE} = \frac{N_{dof}}{2} k_B T using an atom style variable and output that variable. Determining N_{dof} can be tricky, if you use fix shake or fix rigid. But if you just want a visual representation of “hot” versus “cold” areas, using the kinetic energy should suffice.
  • please keep in mind that the per-atom kinetic energy undergoes significant fluctuations, so you may want to apply fix ave/atom first to have some smoother, time averaged data.
2 Likes