"LIGGGHTS(R)-PUBLIC WWW Site"_liws - "LIGGGHTS(R)-PUBLIC Documentation"_ld - "LIGGGHTS(R)-PUBLIC Commands"_lc :c

:link(liws,http://www.cfdem.com)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)

:line

compute ke command :h3

[Syntax:]

compute ID group-ID ke general_keyword general_values halfstep :pre

ID, group-ID are documented in "compute"_compute.html command :ulb,l
ke = style name of this compute command :l
general_keywords general_values are documented in "compute"_compute.html" :l
halfstep = optional keyword to save kinetic energy at half step :l
:ule

[Examples:]

compute 1 all ke :pre

[Description:]

Define a computation that calculates the translational kinetic energy
of a group of particles.

The kinetic energy of each particle is computed as 1/2 m v^2, where m and v are
the mass and velocity of the particle. By default the velocity is taken at the
full time step ({v^i}). If the {halfstep} keyword is present in the definition
of this compute, then the velocity is taken at the next half time step
({v^(i+1/2)}).

There is a subtle difference between the quantity calculated by this
compute and the kinetic energy calculated by the {ke}
keyword used in thermodynamic output, as specified by the
"thermo_style"_thermo_style.html command.  For this compute, kinetic
energy is "translational" kinetic energy, calculated by the simple
formula above.  For thermodynamic output, the {ke} keyword infers
kinetic energy from the temperature of the system with 1/2 Kb T of
energy for each degree of freedom.  For the default temperature
computation via the "compute temp"_compute_temp.html command, these
are the same.  But different computes that calculate temperature can
subtract out different non-thermal components of velocity and/or
include different degrees of freedom (translational, rotational, etc).

[Output info:]

This compute calculates a global scalar (the summed KE).  This value
can be used by any command that uses a global scalar value from a
compute as input.  See "Section_howto 15"_Section_howto.html#howto_8
for an overview of LIGGGHTS(R)-PUBLIC output options.

The scalar value calculated by this compute is "extensive".  The
scalar value will be in energy "units"_units.html.

[Restrictions:] none

[Related commands:]

"compute erotate/sphere"_compute_erotate_sphere.html

[Default:] none
