Residual equilibrium schemes for time dependent partial differential equations