Self-adjoint formulation of spherically symmetric hydrodynamics