Separable random phase approximation for self-consistent nuclear models