  Thermodynamic relations are derived from first principles of mechanics for
non-equilibrium processes. Since the key role herein is played by the law of
increase of entropy, the latter is analyzed at first. It is shown that its
derivation for isolated systems does not allow one to say too much about
thermodynamic properties in non-equilibrium conditions. From there on, the
notion of quasi-isolated systems is introduced, for which it is possible to
describe the state of macroscopic systems by a collection of intensive
variables. The latter are the differentials of the entropy with respect to the
given set of extensive constraints. Arguments are developed showing that the
dynamics of irreversible relaxation of non-equilibrium systems consists of two
qualitatively different steps. The theory is applied and verified by describing
transport processes and calculating the corresponding coefficients. Structure
formation and transition to turbulence are equally formalized in the
thermodynamic framework.
