  In this paper, an energy-consistent finite difference scheme for the
compressible hydrodynamic and magnetohydrodynamic (MHD) equations is
introduced. For the compressible magnetohydrodynamics, an energy-consistent
finite difference formulation is derived using the product rule for the spatial
difference. The conservation properties of the internal, kinetic, and magnetic
energy equations can be satisfied in the discrete level without explicitly
solving the total energy equation. The shock waves and discontinuities in the
numerical solution are stabilized by nonlinear filtering schemes. An
energy-consistent discretization of the filtering schemes is also derived by
introducing the viscous and resistive heating rates. The resulting
energy-consistent formulation can be implemented with the various kinds of
central difference, nonlinear filtering, and time integration schemes. The
second- and fifth-order schemes are implemented based on the proposed
formulation. The conservation properties and the robustness of the present
schemes are demonstrated via one- and two-dimensional numerical tests. The
proposed schemes successfully handle the most stringent problems in extremely
high Mach number and low beta conditions.
