Milestone 2 - Conservation and balance

Conservation laws

Many processes in nature and engineering can be modeled (described) with a simple principle: the principle of conservation. Consider a closed domain ΩRn\Omega\in\mathbb{R}^n and a quantity u=u(x,t)Ru=u(x,t)\in\mathbb{R} that is defined for all xΩx\in\Omega and t0t\geq 0. The function u(x,t)u(x,t) typically describes a physical quantity such as mass, momentum, or energy.

We are interested in modeling the temporal evolution of uu (change in time tt). Observations of nature of the behaviour of such quantities lead to the following simple principle:

Observation: The temporal change of u(x,t)u(x,t) in a sub-domain ωΩ\omega\subset\Omega is equal to the amount that gets generated or destroyed inside of ω\omega in addition to the flux balance inwards or outwards through the surface/boundary ω\partial\omega.

The quantity of uu changes, if:

(i) There is a positive/negative source inside of the sub-domain ω\omega

(ii) There is a positive/negative flux balance through the boundary of the sub-domain ω\partial\omega

Famous example: Bathtub

The amount of water in the bathtub (blue) changes due to the sources (green) and sinks (red).

Formulation of the mathematical problem

Consider a sub-domain ω\omega with outward pointing normal vector n\vec{n}:

tωudxtemporalchangeofuinω=ωfndschange throughsurface fluxf+ωS(u,x,t)dxchange throughsource S(u,x,t) \underbrace{\frac{\partial { }}{\partial { t} } \int_{\omega} u \mathrm{d} x}_{\substack{\text{temporal\,change} \\ \text{of}\,u\,\text{in}\,\omega}} = - \underbrace{\oint_{\partial \omega} \vec{f} \cdot \vec{n} \mathrm{d} s}_{\substack{\text{change~through} \\ \text{surface~flux}\,\vec{f}}} + \underbrace{\int_{\omega} S(u,x,t) \mathrm{d} x}_{\substack{\text{change~through} \\ \text{source}~S(u,x,t)}}
Remark 1: We call this the integral formulation of the problem.
Remark 2: The flux function f\vec{f} typically depends on the solution uu and the variables x,tx,t, i.e., f=f(u,x,t)\vec{f} = \vec{f}(u,x,t).

If we make the mathematical assumption that the function u(x,t)u(x,t) is sufficiently smooth (such that we can take the derivatives in space and time), we can apply the Gauss integral theorem to the surface integral

ωutdx+ωfdx=ωf1x1+f2x2++fnxndx=ωS(u,x,t)dx\begin{aligned} {\int_{\omega} \frac{\partial { u}}{\partial { t} } \mathrm{d} x} + \underbrace{\int_{\omega} \vec{\nabla} \cdot \vec{f} \mathrm{d} x}_{=\int_{\omega} \frac{\partial { f_1}}{\partial { x_1} } + \frac{\partial { f_2}}{\partial { x_2} } + \cdots + \frac{\partial { f_n}}{\partial { x_n} } \mathrm{d} x} = \int_{\omega} S(u,x,t) \mathrm{d} x \end{aligned}

As we have chosen an arbitrary sub-domain ω\omega with no special properties, the equation needs to hold for all choices of ωΩ\omega\subset\Omega. This can only be true if the integrands balance out to zero, hence

ut+f=S,xΩ, tR+. \frac{\partial u}{\partial t} + \vec{\nabla}\cdot\vec{f} = S,\quad x\in\Omega,\,\,t\in\mathbb{R}^+.
Remark 3: This is a partial differential equation (PDE) in space and time and is typically called a balance law.

Remark 4: For many processes, the source term can be neglected, i.e., we can choose S(u,x,t)=0S(u,x,t) = 0. The resulting PDE describes processes, where the quantity uu is neither destroyed nor generated, but is only changed by fluxes. Such PDEs are called conservation laws

ut+f=0,xΩ, tR+. \frac{\partial u}{\partial t} + \vec{\nabla}\cdot\vec{f} = 0,\quad x\in\Omega,\,\,t\in\mathbb{R}^+.

Depending on the process we want to model, we need to chose the quantity of interest u(x,t)u(x,t), a model for the flux f(u,x,t)\vec{f}(u,x,t) and a model for the source term S(u,x,t)S(u,x,t). There are many examples of such models, e.g., mass and momentum conservation in fluid mechanics. We consider here as an example the so-called heat equation, or heat transfer equation.

For the heat equation we are interested in the change of temperature T(x,t)T(x,t) (which is strongly related to the internal energy of a body) in space and time, hence our choice for the unknown quantity is u=Tu = T. Next, we need a model for the flux. Jean Babtiste Joseph Fourier (1822) gave a model for the heat flux, where the flux of heat is negative proportional to the temperature difference (heat goes from high temperatures to lower temperatures), i.e.

f(T,x,t)T=[x1Tx2TxnT]f(T)=dT\begin{aligned} \vec{f}(T,x,t) &\sim -\vec{\nabla} T = \begin{bmatrix} \partial_{x_1} T \\ \partial_{x_2} T \\ \vdots \\ \partial_{x_n} T \end{bmatrix} \\ \vec{f}(T) &= -d \vec{\nabla} T \end{aligned}

where dd is the heat conduction coefficient with d=d(T,x,t)0d=d(T,x,t) \ge 0 in general.

Remark 5: A very simple version of the heat equation results in 1D space (x1=xx_1 = x) with a constant diffusion coefficient d=constd=const

Ttx(d Tx)=Ttd Txx=0. T_t - \frac{\partial}{\partial x}(d\,T_x) = T_t - d\,T_{xx} = 0.

For scalar PDEs with two independent variables xx and tt of second order (the maximum derivatives are second-order derivatives) it is common to distinguish between different types of PDEs. Assuming a scalar second order PDE of the general form

auxx+buxt+cutt+dux+eut+fu+g=0, a u_{xx} + b u_{xt} + c u_{tt} + d u_x + e u_t + f u + g = 0,

we can define the quantity

Δ(x,t)=a(x,t) c(x,t)b(x,t)24 \Delta(x,t) = a(x,t)\,c(x,t) - \frac{b(x,t)^2}{4}

to get a classification of the different types

(i) Δ(x,t)>0\Delta(x,t) > 0, the PDE is elliptic in (x,t)(x,t)

(ii) Δ(x,t)=0\Delta(x,t) = 0, the PDE is parabolic in (x,t)(x,t)

(iii) Δ(x,t)<0\Delta(x,t) < 0, the PDE is hyperbolic in (x,t)(x,t)

These definitions are motivated by the definition of conic sections. It is interesting to note, that the type of the PDE has strong implications about the solution behaviour. Hence, there are typical processes that are in nature either elliptic (e.g. gravity), hyperbolic (wave equations, advection), or parabolic (heat equation):

If we consider again our simple 1D constant coefficient heat equation and compute its type, we get Δ(x,t)=0, (x,t)\Delta(x,t) = 0,\;\forall (x,t). Hence, the heat equation is a parabolic PDE.

In general, parabolic PDEs model processes that evolve in time and are not reversible in time, such as friction, diffusion, dissipation, etc. The effect over time is a "smearing" of the quantity, smoothing out of large gradients and extrema.


Created by Gregor Gassner and Andrés Rueda-Ramírez with contributions by Simone Chiocchetti, Daniel Bach, Sophia Horak, Philipp Baasch, Benjamin Bolm, Erik Faulhaber, and Luca Sommer. Last modified: April 02, 2026. Website built with Franklin.jl and the Julia programming language.