Friction is a desired property in quantum dynamics as it allows for localization, prevents backscattering, and is essential in the description of multistage transfer. Practical approaches for friction generally involve memory functionals or interactions with system baths. Here, we start by requiring that a friction term will always reduce the energy of the system; we show that this is automatically true once the Hamiltonian is augmented by a term of the form integral a(q;n(0)) x [partial differential j(q,t)/partial differential t] x J(q)dq, which includes the current operator times the derivative of its expectation value with respect to time, times a local coefficient; the local coefficient will be fitted to experiment, to more sophisticated theories of electron-electron interaction and interaction with nuclear vibrations and the nuclear background, or alternately, will be artificially constructed to prevent backscattering of energy. We relate this term to previous results and to optimal control studies, and generalize it to further operators, i.e., any operator of the form integral a(q;n(0))[partial differential c(q,t)/partial differential t] x C(q)dq (or a discrete sum) will yield friction. Simulations of a small jellium cluster, both in the linear and highly nonlinear excitation regime, demonstrate that the friction always reduces energy. The energy damping is essentially double exponential; the long-time decay is almost an order of magnitude slower than the rapid short-time decay. The friction term stabilizes the propagation (split-operator propagator here), therefore increasing the time-step needed for convergence, i.e., reducing the overall computational cost. The local friction also allows the simulation of a metal cluster in a uniform jellium as the energy loss in the excitation due to the underlying corrugation is accounted for by the friction. We also relate the friction to models of coupling to damped harmonic oscillators, which can be used for a more sophisticated description of the coupling, and to memory functionals. Our results open the way to very simple finite grid description of scattering and multistage conductance using time-dependent density functional theory away from the linear regime, just as absorbing potentials and self-energies are useful for noninteracting systems and leads.