Sources and sinks. In the physical sciences, engineering and mathematics, sources and sinks is an analogy used to describe properties of vector fields. It generalizes the idea of fluid sources and sinks (like the faucet and drain of a bathtub) across different scientific disciplines. These terms describe points, regions, or entities where a vector field originates or terminates. This analogy is usually invoked when discussing the continuity equation, the divergence of the field and the divergence theorem. The analogy sometimes includes swirls  and saddles for points that are neither of the two.

In the case of electric fields the idea of flow is replaced by field lines and the sources and sinks are electric charges.

Description and fluid dynamics analogy

In physics, a vector field   is a function that returns a vector and is defined for each point (with coordinates ) in a region of space. The idea of sources and sinks applies to  if it follows a continuity equation of the form

,

where  is time,  is some quantity density associated to , and  is the source-sink term. The points in space where   are called a sources and when  are called sinks. The integral version of the continuity equation is given by the divergence theorem.

These concepts originate from sources and sinks in fluid dynamics, where the flow is conserved per the continuity equation related to conservation of mass, given by

where  is the mass density of the fluid,  is the flow velocity vector, and  is the source-sink flow (fluid mass per unit volume per unit time). This equation implies that any emerging or disappearing amount of flow in a given volume must have a source or a sink, respectively. Sources represent locations where fluid is added to the region of space, and sinks represent points of removal of fluid. The term  is positive for a source and negative for a sink. Note that for incompressible flow or time-independent systems,  is directly related to the divergence as

.
For this kind of flow, solenoidal vector fields (no divergence) have no source or sinks. When at a given point  but the curl  , the point is sometimes called a swirl. And when both divergence and curl are zero, the point is sometimes called a saddle.

Other examples in physics

Electromagnetism

In electrodynamics, the current density behaves similar to hydrodynamics as it also follows a continuity equation due to the charge conservation:
,

where this time  is the charge density,  is the current density vector, and  is the current source-sink term. The current source and current sinks are where the current density emerges  or vanishes , respectively (for example, the source and sink can represent the two poles of an electrical battery in a closed circuit).

The concept is also used for the electromagnetic fields, where fluid flow is replaced by field lines. For an electric field , a source is a point where electric field lines emanate, such as a positive charge (), while a sink is where field lines converge (), such as a negative charge. This happens because electric fields follow Gauss's law given by
,
where   is the vacuum permittivity. In this sense, for a magnetic field  there are no sources or sinks because there are no magnetic monopoles as described by Gauss's law for magnetism which states that 
. 
Electric and magnetic fields also carry energy as described by Poynting's theorem, given by

where  is the electromagnetic energy density,  is the Poynting vector and  can be considered as an energy source-sink term.

Newtonian gravity 
Similar to electric and magnetic fields, one can discuss the case of a Newtonian gravitational field  described by Gauss's law for gravity,
,
where  is the gravitational constant. As gravity is only attractive (), there are only gravitational sinks but no sources. Sinks are represented by point masses.

Thermodynamics and transport
In thermodynamics, the source and sinks correspond to two types of thermal reservoirs, where energy is supplied or extracted, such as heat flux sources or heat sinks. In thermal conduction this is described by the heat equation. The terms are also used in non-equilibrium thermodynamics by introducing the idea of sources and sinks of entropy flux.

Chaos theory 
In chaos theory and complex system, the idea of sources and sinks is used to describes  repellors and attractors, respectively.

In mathematics

Complex functions 
This terminology is also used in complex analysis, as complex number can be desrcibed as vectors in the complex plane.Sources and sinks are associated with zeros and poles of meromorphic function, representing inflows and outflows in a harmonic function. A complex function is defined to a source or a sink if it has a pole of order 1.

Topology 
In topology, the terminology of sources and sinks is used when discussing a vector field over a compact differentiable manifold. In this context the index of a vector field is +1 if it is a source or a sink, if the value is -1 it is called a saddle point. This concept is useful to introduce the Poincaré–Hopf theorem and the hairy ball theorem.

Other uses 
Other areas where this terminology is used include source–sink dynamics in ecology and current source density analysis in neuroscience.

References 

Analogy
Vector calculus