Analytical solution for constant enthalpy mhd accelerator