## Saturday, 23 July 2016

### Vector fields: Examples

Vector fields arise very naturally in physics and engineering applications from physical forces: gravitational, electrostatic, centrifugal, etc. For example, the vector field defined by the function
$\mathbf{F}(x,y)=-w_0\left(\frac{x}{\left(x^2+y^2+z^2\right)^{3/2}},\frac{z}{\left(x^2+y^2+z^2\right)^{3/2}},\frac{z}{\left(x^2+y^2+z^2\right)^{3/2}}\right),$
where $w_0$ is a real number, is associated with gravity and electrostatic attraction. The gravitational field around a planet and the electric field around a single point charge are similar to this field. The field points towards the origin (when $w_0>0$) and is inversely proportional to the square of the distance from the origin.

----------------------------------------------------------------------------------------------------------------------

Simulation

Gravitational/Electrostatic field: Click on the image (or link below) to run the simulation.

----------------------------------------------------------------------------------------------------------------------

Another important example is the velocity vector field $\mathbf{v}$ of a steady-state fluid flow. The vector $\mathbf{v}(x, y)$ measures the instantaneous velocity of the fluid particles (molecules or atoms) as they pass through the point $(x, y)$. Steady-state means that the velocity at a point $(x, y)$ does not vary in time -even though the individual fluid particles are in motion. If a fluid particle moves along the curve $\mathbf{x}(t) = (x(t), y(t))$, then its velocity at time $t$ is the derivative
$\mathbf{v}= \frac{d\mathbf{x}}{dt}$
of its position with respect to $t$. Thus, for a time-independent velocity vector field
$\mathbf{v}(x, y) = ( v_1(x, y), v_2(x, y) )$
the fluid particles will move in accordance with an autonomous, first order system of ordinary differential equations
$\frac{dx}{dt}= v_1(x, y),\qquad \frac{dy}{dt}= v_2(x, y)$

According to the basic theory of systems of ordinary differential equations, an individual particle's motion $\mathbf{x}(t)$ will be uniquely determined solely by its initial position $\mathbf{x}(0) = \mathbf{x}_0$. In fluid mechanics, the trajectories of particles are known as the streamlines of the flow. The velocity vector $\mathbf{v}$ is everywhere tangent to the streamlines. When the flow is steady, the streamlines do not change in time. Individual fluid particles experience the same motion as they successively pass through a given point in the domain occupied by the fluid.

Examples of velocity vector fields of steady-state fluids flow are the following:

1. Rigid body rotation: $$\mathbf{v}(x,y)=(-wy,wx),\quad w\in \mathbb R.$$
2. Stagnation point: $$\mathbf{v}(x,y)=(kx,-ky), \quad k\in \mathbb R.$$
3. Vortex: $$\mathbf{v}(x,y)=\left(-\dfrac{y}{x^2+y^2},\dfrac{x}{x^2+y^2}\right).$$
4. Source and Sink: $$\mathbf{v}(x,y)=\dfrac{q}{2\pi}\left(\dfrac{x}{x^2+y^2},\dfrac{y}{x^2+y^2}\right),\quad q\in \mathbb R.$$

----------------------------------------------------------------------------------------------------------------------

Simulation

The  following simulations show the steady-state fluid flows defined by the above velocity fields. Click on the image (or link below) to access the simulations.

-------------------------------------------------------------------------------------------------------------------------

## Wednesday, 20 July 2016

### Flux in 2D (Part 2)

3. Outward flux across a closed plane curve

 Recall that: If $C$ is a piecewise-smooth, simple closed curve, the net outward flux of a vector field $\mathbf v =v_1(x,y)\,\mathbf i +v_2(x,y)\,\mathbf j$ across $C$ is given by $$\text{Net outward flux}=\oint_C \mathbf v\cdot \mathbf n\, dS$$ where $\mathbf n$ is a unit vector normal to $C$, directed outward from the region bounded by $C$.

Example 1. Suppose that $C$ is a circle of radius $r$, centre the origin. Let $\mathbf v=x\,\mathbf i+y\,\mathbf j$. In this case, the unit normal vector to $C$ is in the same direction as $\mathbf v$. Thus
$$\mathbf v \cdot \mathbf n =|\mathbf v|=r.$$
It follows that
$$\text{Net outward flux}=\oint_C \mathbf v\cdot \mathbf n dS=\oint_C r\,dS=r\oint_C dS=2\pi r^2.$$

The following applet shows a dynamic view of Example 1. Change the radius of the circle to check the general solution.

Example 2. Consider the same circle $C$ of radius $r$, centre the origin. But now we have $\mathbf v=-y\,\mathbf i+x\,\mathbf j$. In this case, $\mathbf v$ is perpendicular to the unit normal vector $\mathbf n$. Thus
$$\mathbf v \cdot \mathbf n =0.$$
Therefore
$$\text{Net outward flux}=\oint_C \mathbf v\cdot \mathbf n\, dS=0.$$

The following applet shows a dynamic view of Example 2. Change the radius of the circle to check the general solution.

Observation: The previous examples make sense physically. In the Example 1, the fluid is spewing out the origin, and thus flowing through $C$. On the other hand, in Example 2, the fluid is spinning around the origin. None of it crosses $C$.

 Flux form of Green's theorem If $C$ is a positively oriented simple closed curve enclosing a region $D$ and $\mathbf v =v_1(x,y)\,\mathbf i +v_2(x,y)\,\mathbf j$ then $$\text{Net outward flux}=\oint_C \mathbf v\cdot \mathbf n \,dS=\iint_D\text{div}(\mathbf v )\,dA$$ where $\text{div} (\mathbf v)=\dfrac{\partial v_1}{\partial x}+\dfrac{\partial v_2}{\partial y}$.

Example 3. Consider again the example of a circle $C$ of radius $r$, centre at the origin, and the velocity vector $\mathbf v =x\, \mathbf i +y\, \mathbf j$. Since
$$\text{div}(\mathbf v)=1+1=2,$$
then
$$\text{Net outward flux}=\oint_C \mathbf v\cdot \mathbf n \,dS=\iint_D\text{div}(\mathbf v )\,dA=\iint_D 2\,dA=2\pi r^2.$$

If we move the circle away from the origin, the flux is still $2\pi r^2$. However, computing $\oint_C \mathbf v \cdot \mathbf n \,dS$ becomes quite hard.

The following applet shows a dynamic representation of Example 3. Move the circle around. Observe that the flux remains constant. You can also observe the flux for a semicircle by dragging the slider for the partial path.

Key Concept

In the context of fluids the divergence measures how much fluid is being added (or taken away); these are known as sources (or sinks). For $\mathbf v =x\, \mathbf i +y\, \mathbf j$, fluid is being added everywhere (imagine rain falling on the ground and then flowing from the origin). For $\mathbf v =-y\, \mathbf i +x\, \mathbf j$ the divergence is zero. No fluid is being added or removed, there are no sources or sinks.