Flux
Flux describes any effect that appears to pass or travel (whether it actually moves or not) through a surface or substance. Flux is a concept in applied mathematics and vector calculus which has many applications to physics.  For transport phenomena, flux is a vector quantity, describing the magnitude and direction of the flow of a substance or property. In vector calculus flux is a scalar quantity, defined as the surface integral of the perpendicular component of a vector field over a surface.

Terminology
The word flux comes from Latin: fluxus means "flow", and fluere is "to flow". As fluxion, this term was introduced into differential calculus by Isaac Newton.
The concept of heat flux was a key contribution of Joseph Fourier, in the analysis of heat transfer phenomena. His seminal treatise Théorie analytique de la chaleur (The Analytical Theory of Heat), defines fluxion as a central quantity and proceeds to derive the now well-known expressions of flux in terms of temperature differences across a slab, and then more generally in terms of temperature gradients or differentials of temperature, across other geometries. One could argue, based on the work of James Clerk Maxwell, that the transport definition precedes the definition of flux used in electromagnetism. The specific quote from Maxwell is:

In the case of fluxes, we have to take the integral, over a surface, of the flux through every element of the surface. The result of this operation is called the surface integral of the flux. It represents the quantity which passes through the surface. 
According to the transport definition, flux may be a single vector, or it may be a vector field / function of position. In the latter case flux can readily be integrated over a surface. By contrast, according to the electromagnetism definition, flux is the integral over a surface; it makes no sense to integrate a second-definition flux for one would be integrating over a surface twice. Thus, Maxwell's quote only makes sense if "flux" is being used according to the transport definition (and furthermore is a vector field rather than single vector). This is ironic because Maxwell was one of the major developers of what we now call "electric flux" and "magnetic flux" according to the electromagnetism definition. Their names in accordance with the quote (and transport definition) would be "surface integral of electric flux" and "surface integral of magnetic flux", in which case "electric flux" would instead be defined as "electric field" and "magnetic flux" defined as "magnetic field". This implies that Maxwell conceived of these fields as  flows/fluxes of some sort.
Given a flux according to the electromagnetism definition, the corresponding flux density, if that term is used, refers to its derivative along the surface that was integrated. By the Fundamental theorem of calculus, the corresponding flux density is a flux according to the transport definition. Given a current such as electric current—charge per time, current density would also be a flux according to the transport definition—charge per time per area. Due to the conflicting definitions of flux, and the interchangeability of flux, flow, and current in nontechnical English, all of the terms used in this paragraph are sometimes used interchangeably and ambiguously. Concrete fluxes in the rest of this article will be used in accordance to their broad acceptance in the literature, regardless of which definition of flux the term corresponds to.

Flux as flow rate per unit area
In transport phenomena (heat transfer, mass transfer and fluid dynamics), flux is defined as the rate of flow of a property per unit area, which has the dimensions [quantity]·[time]−1·[area]−1. The area is of the surface the property is flowing "through" or "across". For example, the amount of water that flows through a cross section of a river each second divided by the area of that cross section, or the amount of sunlight energy that lands on a patch of ground each second divided by the area of the patch, are kinds of flux.

General mathematical definition (transport)
Here are 3 definitions in increasing order of complexity. Each is a special case of the following. In all cases the frequent symbol j, (or J) is used for flux, q for the physical quantity that flows, t for time, and A for area. These identifiers will be written in bold when and only when they are vectors.
First, flux as a (single) scalar:

where

In this case the surface in which flux is being measured is fixed and has area A. The surface is assumed to be flat, and the flow is assumed to be everywhere constant with respect to position and perpendicular to the surface.
Second, flux as a scalar field defined along a surface, i.e. a function of points on the surface:

As before, the surface is assumed to be flat, and the flow is assumed to be everywhere perpendicular to it. However the flow need not be constant. q is now a function of p, a point on the surface, and A, an area. Rather than measure the total flow through the surface, q measures the flow through the disk with area A centered at p along the surface.
Finally, flux as a vector field:

In this case, there is no fixed surface we are measuring over. q is a function of a point, an area, and a direction (given by a unit vector 
  
    
      
        
          
            
              n
              ^
            
          
        
      
    
    {\displaystyle \mathbf {\hat {n}} }
  ), and measures the flow through the disk of area A perpendicular to that unit vector. I is defined picking the unit vector that maximizes the flow around the point, because the true flow is maximized across the disk that is perpendicular to it. The unit vector thus uniquely maximizes the function when it points in the "true direction" of the flow. (Strictly speaking, this is an abuse of notation because the "arg max" cannot directly compare vectors; we take the vector with the biggest norm instead.)

Properties
These direct definitions, especially the last, are rather unwieldy. For example, the arg max construction is artificial from the perspective of empirical measurements, when with a weathervane or similar one can easily deduce the direction of flux at a point. Rather than defining the vector flux directly, it is often more intuitive to state some properties about it. Furthermore, from these properties the flux can uniquely be determined anyway.
If the flux j passes through the area at an angle θ to the area normal 
  
    
      
        
          
            
              n
              ^
            
          
        
      
    
    {\displaystyle \mathbf {\hat {n}} }
  , then the dot product

That is, the component of flux passing through the surface (i.e. normal to it) is j cos θ, while the component of flux passing tangential to the area is j sin θ, but there is no flux actually passing through the area in the tangential direction. The only component of flux passing normal to the area is the cosine component.
For vector flux, the surface integral of j over a surface S, gives the proper flowing per unit of time through the surface:

where A (and its infinitesimal) is the vector area –  combination 
  
    
      
        
          A
        
        =
        A
        
          
            
              n
              ^
            
          
        
      
    
    {\displaystyle \mathbf {A} =A\mathbf {\hat {n}} }
   of the magnitude of the area A through which the property passes and a unit vector 
  
    
      
        
          
            
              n
              ^
            
          
        
      
    
    {\displaystyle \mathbf {\hat {n}} }
   normal to the area..
Unlike in the second set of equations, the surface here need not be flat.
Finally, we can integrate again over the time duration t1 to t2, getting the total amount of the property flowing through the surface in that time (t2 − t1):

Transport fluxes
Eight of the most common forms of flux from the transport phenomena literature are defined as follows:

Momentum flux, the rate of transfer of momentum across a unit area (N·s·m−2·s−1). (Newton's law of viscosity)
Heat flux, the rate of heat flow across a unit area (J·m−2·s−1). (Fourier's law of conduction) (This definition of heat flux fits Maxwell's original definition.)
Diffusion flux, the rate of movement of molecules across a unit area (mol·m−2·s−1). (Fick's law of diffusion)
Volumetric flux, the rate of volume flow across a unit area (m3·m−2·s−1). (Darcy's law of groundwater flow)
Mass flux, the rate of mass flow across a unit area (kg·m−2·s−1). (Either an alternate form of Fick's law that includes the molecular mass, or an alternate form of Darcy's law that includes the density.)
Radiative flux, the amount of energy transferred in the form of photons at a certain distance from the source per unit area per second (J·m−2·s−1). Used in astronomy to determine the magnitude and spectral class of a star.  Also acts as a generalization of heat flux, which is equal to the radiative flux when restricted to the electromagnetic spectrum.
Energy flux, the rate of transfer of energy through a unit area (J·m−2·s−1). The radiative flux and heat flux are specific cases of energy flux.
Particle flux, the rate of transfer of particles through a unit area ([number of particles] m−2·s−1)These fluxes are vectors at each point in space, and have a definite magnitude and direction. Also, one can take the divergence of any of these fluxes to determine the accumulation rate of the quantity in a control volume around a given point in space.  For incompressible flow, the divergence of the volume flux is zero.

Chemical diffusion
As mentioned above, chemical molar flux of a component A in an isothermal, isobaric system is defined in Fick's law of diffusion as:

where the nabla symbol ∇ denotes the gradient operator, DAB is the diffusion coefficient (m2·s−1) of component A diffusing through component B, cA is the concentration (mol/m3) of component A.This flux has units of mol·m−2·s−1, and fits Maxwell's original definition of flux.For dilute gases, kinetic molecular theory relates the diffusion coefficient D to the particle density n = N/V, the molecular mass m, the collision cross section 
  
    
      
        σ
      
    
    {\displaystyle \sigma }
  , and the absolute temperature T by

where the second factor is the mean free path and the square root (with the Boltzmann constant k) is the mean velocity of the particles.
In turbulent flows, the transport by eddy motion can be expressed as a grossly increased diffusion coefficient.

Quantum mechanics
In quantum mechanics, particles of mass m in the quantum state ψ(r, t) have a probability density defined as

So the probability of finding a particle in a differential volume element d3r is

Then the number of particles passing perpendicularly through unit area of a cross-section per unit time is the probability flux;

This is sometimes referred to as the probability current or current density, or probability flux density.

Flux as a surface integral
General mathematical definition (surface integral)
As a mathematical concept, flux is represented by the surface integral of a vector field,

  
    
      
        
          Φ
          
            F
          
        
        =
        
          ∬
          
            A
          
        
        
          F
        
        ⋅
        
          d
        
        
          A
        
      
    
    {\displaystyle \Phi _{F}=\iint _{A}\mathbf {F} \cdot \mathrm {d} \mathbf {A} }
  

  
    
      
        
          Φ
          
            F
          
        
        =
        
          ∬
          
            A
          
        
        
          F
        
        ⋅
        
          n
        
        
        
          d
        
        A
      
    
    {\displaystyle \Phi _{F}=\iint _{A}\mathbf {F} \cdot \mathbf {n} \,\mathrm {d} A}
  where F is a vector field, and dA is the vector area of the surface A, directed as the surface normal. For the second, n is the outward pointed unit normal vector to the surface.
The surface has to be orientable, i.e. two sides can be distinguished: the surface does not fold back onto itself. Also, the surface has to be actually oriented, i.e. we use a convention as to flowing which way is counted positive; flowing backward is then counted negative.
The surface normal is usually directed by the right-hand rule.
Conversely, one can consider the flux the more fundamental quantity and call the vector field the flux density.
Often a vector field is drawn by curves (field lines) following the "flow"; the magnitude of the vector field is then the line density, and the flux through a surface is the number of lines. Lines originate from areas of positive divergence (sources) and end at areas of negative divergence (sinks).
See also the image at right: the number of red arrows passing through a unit area is the flux density, the curve encircling the red arrows denotes the boundary of the surface, and the orientation of the arrows with respect to the surface denotes the sign of the inner product of the vector field with the surface normals.
If the surface encloses a 3D region, usually the surface is oriented such that the influx is counted positive; the opposite is the outflux.
The divergence theorem states that the net outflux through a closed surface, in other words the net outflux from a 3D region, is found by adding the local net outflow from each point in the region (which is expressed by the divergence).
If the surface is not closed, it has an oriented curve as boundary. Stokes' theorem states that the flux of the curl of a vector field is the line integral of the vector field over this boundary. This path integral is also called circulation, especially in fluid dynamics. Thus the curl is the circulation density.
We can apply the flux and these theorems to many disciplines in which we see currents, forces, etc., applied through areas.

Electromagnetism
Electric flux
An electric "charge," such as a single proton in space, has a magnitude defined in coulombs. Such a charge has an electric field surrounding it. In pictorial form, the electric field from a positive point charge can be visualized as a dot radiating electric field lines (sometimes also called "lines of force"). Conceptually, electric flux can be thought of as "the number of field lines" passing through a given area.   Mathematically, electric flux is the integral of the normal component of the electric field over a given area. Hence, units of electric flux are, in the MKS system, newtons per coulomb times meters squared, or N m2/C.  (Electric flux density is the electric flux per unit area, and is a measure of strength of the normal component of the electric field averaged over the area of integration.  Its units are N/C, the same as the electric field in MKS units.)
Two forms of electric flux are used, one for the E-field:

  
    
      
        
          Φ
          
            E
          
        
        =
      
    
    {\displaystyle \Phi _{E}=}
   
  
    
      
        
          
            A
          
        
      
    
    {\displaystyle {\scriptstyle A}}
   
  
    
      
        
          E
        
        ⋅
        
          
            d
          
        
        
          A
        
      
    
    {\displaystyle \mathbf {E} \cdot {\rm {d}}\mathbf {A} }
  and one for the D-field (called the electric displacement):

  
    
      
        
          Φ
          
            D
          
        
        =
      
    
    {\displaystyle \Phi _{D}=}
   
  
    
      
        
          
            A
          
        
      
    
    {\displaystyle {\scriptstyle A}}
   
  
    
      
        
          D
        
        ⋅
        
          
            d
          
        
        
          A
        
      
    
    {\displaystyle \mathbf {D} \cdot {\rm {d}}\mathbf {A} }
  This quantity arises in Gauss's law – which states that the flux of the electric field E out of a closed surface is proportional to the electric charge QA enclosed in the surface (independent of how that charge is distributed), the integral form is:

 
  
    
      
        
          
            A
          
        
      
    
    {\displaystyle {\scriptstyle A}}
   
  
    
      
        
          E
        
        ⋅
        
          
            d
          
        
        
          A
        
        =
        
          
            
              Q
              
                A
              
            
            
              ε
              
                0
              
            
          
        
      
    
    {\displaystyle \mathbf {E} \cdot {\rm {d}}\mathbf {A} ={\frac {Q_{A}}{\varepsilon _{0}}}}
  where ε0 is the permittivity of free space.
If one considers the flux of the electric field vector, E, for a tube near a point charge in the field of the charge but not containing it with sides formed by lines tangent to the field, the flux for the sides is zero and there is an equal and opposite flux at both ends of the tube. This is a consequence of Gauss's Law applied to an inverse square field. The flux for any cross-sectional surface of the tube will be the same. The total flux for any surface surrounding a charge q is q/ε0.In free space the electric displacement is given by the constitutive relation D = ε0 E, so for any bounding surface the D-field flux equals the charge QA within it. Here the expression "flux of" indicates a mathematical operation and, as can be seen, the result is not necessarily a "flow", since nothing actually flows along electric field lines.

Magnetic flux
The magnetic flux density (magnetic field) having the unit Wb/m2 (Tesla) is denoted by B, and magnetic flux is defined analogously:

  
    
      
        
          Φ
          
            B
          
        
        =
        
          ∬
          
            A
          
        
        
          B
        
        ⋅
        
          d
        
        
          A
        
      
    
    {\displaystyle \Phi _{B}=\iint _{A}\mathbf {B} \cdot \mathrm {d} \mathbf {A} }
  with the same notation above.  The quantity arises in Faraday's law of induction, where the magnetic flux is time-dependent either because the boundary is time-dependent or magnetic field is time-dependent. In integral form:

  
    
      
        −
        
          
            
              
                
                  d
                
              
              
                Φ
                
                  B
                
              
            
            
              
                
                  d
                
              
              t
            
          
        
        =
        
          ∮
          
            ∂
            A
          
        
        
          E
        
        ⋅
        d
        
          ℓ
        
      
    
    {\displaystyle -{\frac {{\rm {d}}\Phi _{B}}{{\rm {d}}t}}=\oint _{\partial A}\mathbf {E} \cdot d{\boldsymbol {\ell }}}
  where dℓ is an infinitesimal vector line element of the closed curve 
  
    
      
        ∂
        A
      
    
    {\displaystyle \partial A}
  , with magnitude equal to the length of the infinitesimal line element, and direction given by the tangent to the curve 
  
    
      
        ∂
        A
      
    
    {\displaystyle \partial A}
  , with the sign determined by the integration direction.
The time-rate of change of the magnetic flux through a loop of wire is minus the electromotive force created in that wire. The direction is such that if current is allowed to pass through the wire, the electromotive force will cause a current which "opposes" the change in magnetic field by itself producing a magnetic field opposite to the change.  This is the basis for inductors and many electric generators.

Poynting flux
Using this definition, the flux of the Poynting vector S over a specified surface is the rate at which electromagnetic energy flows through that surface, defined like before:

  
    
      
        
          Φ
          
            S
          
        
        =
      
    
    {\displaystyle \Phi _{S}=}
   
  
    
      
        
          
            A
          
        
      
    
    {\displaystyle {\scriptstyle A}}
   
  
    
      
        
          S
        
        ⋅
        
          
            d
          
        
        
          A
        
      
    
    {\displaystyle \mathbf {S} \cdot {\rm {d}}\mathbf {A} }
  The flux of the Poynting vector through a surface is the electromagnetic power, or energy per unit time, passing through that surface. This is commonly used in analysis of electromagnetic radiation, but has application to other electromagnetic systems as well.
Confusingly, the Poynting vector is sometimes called the power flux,  which is an example of the first usage of flux, above. It has units of watts per square metre (W/m2).

SI radiometry units
See also
Notes
Browne, Michael, PhD (2010). Physics for Engineering and Science, 2nd Edition. Schaum Outlines. New York, Toronto: McGraw-Hill Publishing. ISBN 978-0-0716-1399-6.{{cite book}}:  CS1 maint: multiple names: authors list (link)
Purcell, Edward, PhD (2013). Electricity and Magnetism, 3rd Edition. Cambridge, UK: Cambridge University Press. ISBN 978110-7014022.{{cite book}}:  CS1 maint: multiple names: authors list (link)

Further reading
Stauffer, P.H. (2006). "Flux Flummoxed: A Proposal for Consistent Usage". Ground Water. 44 (2): 125–128. doi:10.1111/j.1745-6584.2006.00197.x. PMID 16556188. S2CID 21812226.

External links
 The dictionary definition of flux at Wiktionary