Energy dissipation in the flow of superfluid helium and the critical velocity