[lammps-users] About boltz in file "force.h"

In “force.h”,
double boltz; // Boltzmann constant (eng/degree-K)
I think the line should be changed to be:
double boltz; // Boltzmann constant (eng/temp)
because the unit of boltz is energy unit/temperature unit


degree-K is temperature, i.e. the temperature in degrees Kelvin


I mean if the unit of boltz should be in some relation with units user defined, i.e., units lj, units metal ,etc. not just eng/degree-K

Maybe degree-K should be the temperature unit as in units command?

Am I wrong?


10年4月29日,周四, Steve Plimpton [email protected] 写道:

I dont see anything wrong, myself. The value of boltz is correctly defined in all units in Energy/K.

for metal, it is in eV/K
for si it is in J/K
for cts it is in ergs/K
for reduced, it is 1
for real, it is kCal/mol/K


Technically, you are right, because the lj unit of temperature is arbitrary, and so is not necessarily Kelvin. Also, there may come a time when LAMMPS supports a temperature unit of Fahrenheit (unlikely) or maybe kilokelvin (why not!). That said, the existing description should be pretty unambiguous to most people smart enough to read the source code.