A two-temperature magnetohydrodynamic model of a dense Z-pinch and an
algorithm for solving the time-dependent axisymmetric problem for both
ideal and nonideal plasmas are described. The algorithm is based on t
he Euler-Lagrange scheme with the use of the free-point method develop
ed by D'yachenko. Applications of this algorithm to simulations of a d
ense Z-pinch are presented.