Continuity equation

Coming from four-current.
If we reduce one more dimension to simplify we we can get a deeper understanding. Imagine particles moving in a 1-dimensional world, for which we draw a spacetime diagram like this one:
Pasted image 20220415190844.png
In a little piece of this space (from x=2 to x=3, for example), we pass from having 2 particles to having 1 particle at times t=1 and t=2 respectively. This corresponds to the fact that 2 particles have left the room (to the left) and one has arrived (from the right).
I imagine ρ(x,t) and jx(x,t) like infinitesimal "flow meter devices" that I install on spacetime event (x,t) to measure how many particles go throw it. Observe that we have a tacit sign convention for jx depending on the sense you go through the vertical line. At a first glance, this convention is not needed for ρ since time always flows forward. But we can assume a negative density like something travelling backward in time (like Feynman said for positrons).
If we consider that this flow is a vector field with components J=(jx,jy,jz,ρ) in Minkowski space M4, then continuity equation is nothing but the statement

divJ=0,

where div stands for divergence. Or in a coordinate-free manner, J is the 1-form J=(jx,jy,jz,ρ) and

dJ=0.

We have used the musical isomorphism and the Hodge star operator.

More elaborated:

Example 4.22 in @olver86.
Perhaps the most graphic physical illustration of the relationship between conserved densities and fluxes comes from the equations of compressible, in-viscid fluid motion. Let xRn represent the spatial coordinates, and u=u(x,t)Rn the velocity of a fluid particle at position x and time t. Further let ρ(x,t) be the density, and p(x,t) the pressure; in the particular case of isentropic (constant entropy) flow, pressure p=P(ρ) will depend on density alone. The equation of continuity takes the form

ρt+Div(ρu)=0,

where Div(ρu)=j=1n(ρuj)xj is the spatial divergence. This equation is already in the form of a conservation law, with density T=ρ and flux X=ρu. This leads to the integral equation for the conservation of mass

ddtVρdx=VρundS.

Here Vρdx is clearly the mass of fluid within the domain V, while ρun, with n the unit normal to V, is the instantaneous mass flux of fluid out of a point on the boundary V. Thus we see that the net change in mass inside V equals the flux of fluid into V. In particular, if the normal component of velocity un on V vanishes, there is no net change in mass within the domain V, and we have a law of conservation of mass:

Vρdx=constant.