  The 2D Euler equations is the basic example of fluid models for which a
microcanical measure can be constructed from first principles. This measure is
defined through finite-dimensional approximations and a limiting procedure.
Creutz's algorithm is a microcanonical generalization of the Metropolis-Hasting
algorithm (to sample Gibbs measures, in the canonical ensemble). We prove that
Creutz's algorithm can sample finite-dimensional approximations of the 2D Euler
microcanonical measures (incorporating fixed energy and other invariants). This
is essential as microcanonical and canonical measures are known to be
inequivalent at some values of energy and vorticity distribution. Creutz's
algorithm is used to check predictions from the mean-field statistical
mechanics theory of the 2D Euler equations (the Robert-Sommeria-Miller theory).
We found full agreement with theory. Three different ways to compute the
temperature give consistent results. Using Creutz's algorithm, a first-order
phase transition never observed previously, and a situation of statistical
ensemble inequivalence are found and studied. Strikingly, and contrasting usual
statistical mechanics interpretations, this phase transition appears from a
disordered phase to an ordered phase (with less symmetries) when energy is
increased. We explain this paradox.
