# Calculating flux through a moving surface in vector fields that evolve with time

Suppose we are given a vector field $\mathbf{F}(x, y, z, t)$, $\mathbf{F} \colon \mathbb{R}^4 \to \mathbb{R}^3$, that evolves in time and describes the way particles move in a fluid tank. Also we are given a parametric surface $\mathscr{S}$ parametrized by $\mathbf{r}(u, v, t) = x(u, v, t)\mathbf{i} + y(u, v, t)\mathbf{j} + z(u, v, t)\mathbf{k}$, $\mathbf{r} \colon A \times \mathbb{R} \to \mathbb{R}^3$, where $A \subseteq \mathbb{R}^2$. Note that $\mathscr{S}$ evolves with time as well. The question we want to answer is what is the volume passing through the surface during a particular time range.

First of all, we need to calculate the normal unit vector to the surface $\mathscr{S}$:

$\displaystyle \mathbf{\hat{N}}(u, v, t) = \frac{\partial \mathbf{r}}{\partial u}(u, v, t) \times \frac{\partial \mathbf{r}}{\partial v}(u, v, t) \cdot \Bigg| \frac{\partial \mathbf{r}}{\partial u}(u, v, t) \times \frac{\partial \mathbf{r}}{\partial v}(u, v, t) \Bigg|^{-1}.$

Taking motion into account, we have that the surface element at time $t$ passes the space at rate

$\displaystyle \Big\langle \mathbf{\hat{N}}(u, v, t), \frac{\partial \mathbf{r}}{\partial t}(u, v, t) \Big\rangle.$

Next we need to consider the actual vector field $\mathbf{F}$ and the flux it generates across area elements. As there is no any dependence between the vector field and the surface, we have that the flux across the surface $\mathscr{S}$ at moment $t$ is

\displaystyle \begin{aligned} \Phi(t) &= \iint_{\mathscr{S}} \Bigg\langle \mathbf{F}, \mathbf{\hat{N}} \Bigg\rangle - \Bigg\langle \frac{\partial \mathbf{r}}{\partial t}, \mathbf{\hat{N}} \Bigg\rangle \, \mathrm{d}S \\ &= \iint_{\mathscr{S}} \Bigg\langle \mathbf{F} - \frac{\partial \mathbf{r}}{\partial t}, \mathbf{\hat{N}} \Bigg\rangle \, \mathrm{d}S \\ &= \iint_A \Bigg\langle \mathbf{F} - \frac{\partial \mathbf{r}}{\partial t}, \mathbf{\hat{N}} \Bigg\rangle \Bigg| \frac{\partial \mathbf{r}}{\partial u} \times \frac{\partial \mathbf{r}}{\partial v} \Bigg| \, \mathrm{d}u \, \mathrm{d}v \\ &= \iint_A \Bigg\langle \mathbf{F} - \frac{\partial \mathbf{r}}{\partial t}, \frac{\partial \mathbf{r}}{\partial u} \times \frac{\partial \mathbf{r}}{\partial v} \Bigg| \frac{\partial \mathbf{r}}{\partial u} \times \frac{\partial \mathbf{r}}{\partial v} \Bigg|^{-1} \Bigg\rangle \Bigg| \frac{\partial \mathbf{r}}{\partial u} \times \frac{\partial \mathbf{r}}{\partial v} \Bigg| \, \mathrm{d}u \, \mathrm{d}v \\ &= \iint_A \Bigg\langle \mathbf{F} - \frac{\partial \mathbf{r}}{\partial t}, \frac{\partial \mathbf{r}}{\partial u} \times \frac{\partial \mathbf{r}}{\partial v} \Bigg\rangle \, \mathrm{d}u \, \mathrm{d}v \\ &= \iint_A \Bigg\langle \mathbf{F}(\mathbf{r}(u, v, t), t) - \frac{\partial \mathbf{r}}{\partial t}(u, v, t), \frac{\partial \mathbf{r}}{\partial u}(u, v, t) \times \frac{\partial \mathbf{r}}{\partial v}(u, v, t) \Bigg\rangle \, \mathrm{d}u \, \mathrm{d}v, \\ \end{aligned}

since

$\displaystyle \mathrm{d}S = \Bigg| \frac{\partial \mathrm{r}}{\partial u} \times \frac{\partial \mathrm{r}}{\partial v} \Bigg| \, \mathrm{d}u \, \mathrm{d}v.$

In order to find out the actual amount of fluid passing through a moving surface $\mathscr{S}$, we integrate $\Phi(t)$ over a desired time range $[t_a, t_b]$:

$\displaystyle V = \int_{t_a}^{t_b} \Phi(t) \, \mathrm{d}t.$

### Example

Suppose $\mathbf{F}(x, y, z, t) = (0, 0, t)$ (each vector in $\mathbf{F}$ points upwards and its length grows linearly in time, i.e., all fluid particles accelerate upwards) and $\mathbf{r}(u, v, t) = (u, v, 2t)$ (The surface is flat, parallel to $xy$-plane, and moves upwars with constant speed of two length units per time unit), $A = [0, 2]^2$. Now we have

\displaystyle \begin{aligned} \frac{\partial \mathbf{r}}{\partial u}(u, v, t) \times \frac{\partial \mathbf{r}}{\partial v}(u, v, t) &= \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial x(u, v, t)}{\partial u} &\frac{\partial y(u, v, t)}{\partial u} &\frac{\partial z(u, v, t)}{\partial u} \\ \frac{\partial x(u, v, t)}{\partial v} &\frac{\partial y(u, v, t)}{\partial v} &\frac{\partial z(u, v, t)}{\partial v} \\ \end{vmatrix}\\ &= \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ \end{vmatrix} \\ &= \mathbf{i} \begin{vmatrix} 0 & 0 \\ 1 & 0 \\ \end{vmatrix} - \mathbf{j} \begin{vmatrix} 1 & 0 \\ 0 & 0 \\ \end{vmatrix} + \mathbf{k} \begin{vmatrix} 1 & 0 \\ 0 & 1 \\ \end{vmatrix} \\ &= \mathbf{k} \\ &= (0, 0, 1). \end{aligned}

Now $\mathbf{F}(\mathbf{r}(u, v, t), t) = \mathbf{F}(u, v, 2t, t) = (0, 0, t),$

$\displaystyle \frac{\partial \mathbf{r}}{\partial t}(u, v, t) = (0, 0, 2) \text{ and } \frac{\partial \mathbf{r}}{\partial u}(u, v, t) \times \frac{\partial \mathbf{r}}{\partial v}(u, v, t) = (0, 0, 1),$

so

\displaystyle \begin{aligned} \Phi(t) &= \iint_{\mathscr{S}} \Bigg\langle \mathbf{F} - \frac{\partial \mathbf{r}}{\partial t}, \mathbf{\hat{N}}\Bigg\rangle \, \mathrm{d}S \\ &= \iint_A \Bigg\langle \mathbf{F}(\mathbf{r}(u, v, t), t) - \frac{\partial \mathbf{r}}{\partial t}, \frac{\partial \mathbf{r}}{\partial u} \times \frac{\partial \mathbf{r}}{\partial v}\Bigg\rangle \, \mathrm{d}u \, \mathrm{d}v \\ &= \iint_A \langle (0, 0, t) - (0, 0, 2), (0, 0, 1) \rangle \, \mathrm{d}u \, \mathrm{d}v \\ &= \iint_A \langle (0, 0, t - 2), (0, 0, 1) \rangle \, \mathrm{d}u \, \mathrm{d}v \\ &= \iint_A t - 2 \, \mathrm{d}u \, \mathrm{d}v. \end{aligned}

Since $A = [0, 2]^2,$

\displaystyle \begin{aligned} \Phi(t) &= \int_0^2 \int_0^2 t - 2 \, \mathrm{d}u \, \mathrm{d}v \\ &= \int_0^2 \Bigg[ (t - 2)u \Bigg]_{u = 0}^{u = 2} \, \mathrm{d}v \\ &= \int_0^2 2t - 4 \, \mathrm{d}v \\ &= \Bigg[ (2t - 4)v \Bigg]_{v = 0}^{v = 2} \\ &= 4t - 8. \end{aligned}

Observe that at $t = 0$, the flux is negative (-8), since at that moment $\mathbf{F}$ is stationary and $\mathscr{S}$ is moving upwards with constant speed of two units. Also, at $t = 2$ the flux is zero, since the surface at that very moment is moving exactly as fast the fluid particles in the vector field.

Now the amount of fluid flowing across the surface $\mathscr{S}$ during time interval $[0, 10]$ is

\displaystyle \begin{aligned} V &= \int_0^{10} 4t - 8 \, \mathrm{d}t \\ &= \Bigg[ 2t^2 - 8t \Bigg]_{t = 0}^{t = 10} \\ &= 200 - 80 \\ &= 120. \end{aligned}

If we aim to calculate the amount of particles going through $\mathscr{S}$ in any direction, we should have substituted $4t - 8$ with $|4t - 8|$ in the equation above, which would produce

\displaystyle \begin{aligned} V &= \int_0^{10} |4t - 8| \, \mathrm{d}t \\ &= \int_0^2 8 - 4t \, \mathrm{d}t + \int_2^{10} 4t - 8 \, \mathrm{d}t \\ &= \Bigg[ 8t - 2t^2 \Bigg]_{t = 0}^{t = 2} + \Bigg[ 2t^2 - 8t \Bigg]_{t = 2}^{t = 10} \\ &= 16 - 8 + 200 - 80 - 8 + 16 \\ &= 136. \end{aligned}