  Within the frames of the analytical mechanics the method of the description
of dynamics of nonequilibrium systems of potentially interacting elements is
develops. The method is based on an opportunity of representation of
nonequilibrium system by set of interacting equilibrium subsystems. The
equation of motion of interacting subsystems is found. Based on it the
Lagrange, Hamilton and Liouville equations for subsystems are obtained. The
expression of an entropy production is found. The way of a substantiation of
thermodynamics in the frames of classical mechanic is offered.
