# temp/profile temperature definition

Dear all,

I am computing the temperature of a Poiseuille flow by means of compute temp/profile (in order to substract the spatially-averaged center-of-mass streaming velocity). In the doc page it is explained how the temperature is related to the kinetic energy in this case:

“After the spatially-averaged velocity field has been subtracted from each atom, the temperature is calculated by the formula KE = (dim/2 N - dimNxNy*Nz) k T, where KE = total kinetic energy of the group of atoms (sum of 1/2 m v^2), dim = 2 or 3 = dimensionality of the simulation, N = number of atoms in the group, k = Boltzmann constant, and T = temperature.”

Is it possible that there is a little mistake related to the number of degrees of freedom in the temperature expression? I would say that the right form would be KE = (dimN-dimNxNyNz)*k T/2. That is, the factor (1/2) multiply also the degrees of freedom per bin.

Thanks! And I’m sorry if this point has already been explained.

Carlos Espejo

Yes, that is correct. We will change it.

Aidan

Actually, I think that doc page formula is consistent with

the code which has this comment:

// subtract additional d*Nbins DOF, as in Evans and Morriss paper

Within the last ~year someone called our attention to that

issue discussed in the paper, and we subtracted dim DOF per

bin as a result. You can probably search the maillist

archives for the post. If I recall the post had plots showing

the difference it makes.

Steve

oops I was wrong, Aidan and Carlos are right. The

code is doing the right thing, but the doc

page needs to be changed.

Steve