Numerical Method for Solving a System of Kinetic Equations Describing the Behavior of a Nonideal Gas