  A unified first law of black-hole dynamics and relativistic thermodynamics is
derived in spherically symmetric general relativity. This equation expresses
the gradient of the active gravitational energy E according to the Einstein
equation, divided into energy-supply and work terms. Projecting the equation
along the flow of thermodynamic matter and along the trapping horizon of a
blackhole yield, respectively, first laws of relativistic thermodynamics and
black-hole dynamics. In the black-hole case, this first law has the same form
as the first law of black-hole statics, with static perturbations replaced by
the derivative along the horizon. There is the expected term involving the area
and surface gravity, where the dynamic surface gravity is defined as in the
static case but using the Kodama vector and trapping horizon. This surface
gravity vanishes for degenerate trapping horizons and satisfies certain
expected inequalities involving the area and energy. In the thermodynamic case,
the quasi-local first law has the same form, apart from a relativistic factor,
as the classical first law of thermodynamics, involving heat supply and
hydrodynamic work, but with E replacing the internal energy. Expanding E in the
Newtonian limit shows that it incorporates the Newtonian mass, kinetic energy,
gravitational potential energy and thermal energy. There is also a weak type of
unified zeroth law: a Gibbs-like definition of thermal equilibrium requires
constancy of an effective temperature, generalising the Tolman condition and
the particular case of Hawking radiation, while gravithermal equilibrium
further requires constancy of surface gravity. Finally, it is suggested that
the energy operator of spherically symmetric quantum gravity is determined by
the Kodama vector, which encodes a dynamic time related to E.

General Relativity and Quantum Cosmology