# Some confusions about Navier-Stokes equations

I just started working on the Navier-Stokes equations. I consider the following paper Seibold A compact and fast Matlab code solving the incompressible Navier-Stokes equations on rectangular domains (2008). \begin{align} u_{t}+p_{x} & =-\left(u^{2}\right)_{x}-\left(uv\right)_{y}+\frac{1}{Re}\left(u_{xx}+u_{yy}\right)\label{eq:1}\\ v_{t}+p_{y} & =-\left(uv\right)_{x}-\left(v^{2}\right)_{y}+\frac{1}{Re}\left(v_{xx}+v_{yy}\right)\label{eq:2}\\ u_{x}+v_{y} & =0\label{eq:3} \end{align} It is said that in the above equations nonlinear terms on the right hand side are equal to \begin{align*} \left(u^{2}\right)_{x}+\left(uv\right)_{y} & =uu_{x}+vu_{y}\\ \left(uv\right)_{x}-\left(v^{2}\right)_{y} & =uv_{x}+vv_{y} \end{align*}

and can be written as $$\left(\mathbf{u}\cdot\nabla\right)\mathbf{u}$$

My questions are:

1. I do not understand how the nonlinear terms are equal to \begin{align*} =uu_{x}+vu_{y}\\ =uv_{x}+vv_{y} \end{align*} and how they can be written as $$\left(\mathbf{u}\cdot\nabla\right)\mathbf{u}$$

2. I saw in a paper, the authors have written the nonlinear terms \begin{align*} \left(u^{2}\right)_{x}+\left(uv\right)_{y} & =uu_{x}+vu_{y}\\ \left(uv\right)_{x}-\left(v^{2}\right)_{y} & =uv_{x}+vv_{y} \end{align*} as $$\nabla\cdot\left(\mathbf{u}\mathbf{u}\right)$$ where $$\mathbf{u}$$ is velocity vector. How they did do it?

If somebody could explain these issues, I would be very appreciative.

With regard to question 1, $$(u^2)_x+(uv)_y$$ can be written using the product rule for differentiation as:$$(u^2)_x+(uv)_y=2uu_x+u_yv+uv_y=uu_x+vu_y+u(u_x+v_y)$$But, from the continuity equation, $$u_x+v_y=0$$Therefore, $$(u^2)_x+(uv)_y=uu_x+vu_y$$ With regard to $$(\mathbf{u}\cdot \nabla)\mathbf{u}$$, the term in parenthesis can be written as $$\mathbf{u}\cdot \nabla=u\frac{\partial}{\partial x}+v\frac{\partial}{\partial y}$$And, since $$\mathbf{u}=u\mathbf{i_x}+v\mathbf{i_y}$$ we have $$(\mathbf{u}\cdot \nabla)\mathbf{u}=(uu_x+vu_y)\mathbf{i_x}+(uv_x+vv_y)\mathbf{i_y}$$ The first term goes in the x-NS equation, and the second term goes in the y-NS equation.

With regard to the expression $$\nabla \cdot (\mathbf{u}\mathbf{u})$$, the entity $$\mathbf{u}\mathbf{u}$$ is not a vector and is not a scalar; it is a 2nd order tensor called a "dyadic," formed by placing two vectors in juxtaposition with one another, with no operation implied between them. In this case, it can be written as $$\mathbf{u}\mathbf{u}=u^2\mathbf{i_x}\mathbf{i_x}+uv(\mathbf{i_x}\mathbf{i_y}+\mathbf{i_y}\mathbf{i_x})+v^2\mathbf{i_y}\mathbf{i_y}$$If one formally predots this with $$\nabla$$, one obtains $$\nabla \cdot (\mathbf{u}\mathbf{u})=[(u^2)_x+(uv)_y]\mathbf{i_x}+[(uv)_x+(v^2)_y]\mathbf{i_y}$$The term in brackets in front of the $$\mathbf{i_x}$$ goes in the x-NS equation and the term in brackets in front of the $$\mathbf{i_y}$$ goes in the y-NS equation

• Thank you, very descriptive answer for first question. – For Bonder Jan 29 '19 at 14:43
• Gah, accidentally hit enter before finishing typing. Don't use centerdot for multiplication, that is the point of \cdot. See tex.stackexchange.com/questions/19180/… for more info. – Kyle Kanos Jan 29 '19 at 14:54

The issue here is confusion about dot products and somewhat sloppy notation.

To answer point 1 -- recheck how you define the dot product: $$\mathbf{u} \cdot \mathbf{\nabla}$$. Recall that if $$\mathbf{a} = a_i \hat{\imath} + a_j \hat{\jmath}$$ and $$\mathbf{b} = b_i \hat{\imath} + b_j \hat{\jmath}$$

$$\mathbf{a} \cdot \mathbf{b} = a_i b_i + a_j b_j$$

and the result is a scalar.

For point 2, the notation is sloppy (but commonly adopted -- so it's good to get used to it). What exactly does $$\mathbf{u}\mathbf{u}$$ mean when they are vectors? If these were scalars, it would mean multiplication. But for vectors, there's more than one way to multiply things. The dot product is one of them, which results in a scalar. But, the authors have used $$\cdot$$ to indicate a dot product, so maybe there's something else.

What other types of multiplication exist for vectors? And how do we get a result that we can then take a dot product with the $$\mathbf{\nabla}$$ operator (i.e. a result that is not a scalar)?

I recommend reviewing vector notation and chain rules and hopefully the process becomes clear. There are other notation systems used that make the Navier-Stokes equations easier to manipulate, but many presentations use vector notation and getting comfortable with it is essential.

As I mention in my linked answer, you should view $$\vec{u}\cdot\nabla$$ as a scalar operator, as it's easier to see the result, especially when using index notation commonly found in fluid dynamics. In 2D, this operator is, $$\vec{u}\cdot\nabla=u\partial_x+v\partial_y$$ where we're using your $$\vec{u}=u\hat{x}+v\hat{y}$$. Applying this operator onto the vector $$\vec{u}$$, you end up with $$\left(\vec{u}\cdot\nabla\right)\vec u=\left(u\partial_x+v\partial_y\right)\left(\begin{array}{c}u \\ v\end{array}\right)=\left(\begin{array}{c}u\partial_xu+v\partial_yu \\ u\partial_xv+v\partial_yv\end{array}\right)=\left(\begin{array}{c}uu_x+vu_y \\ uv_x+vv_y\end{array}\right)$$ where in the right-most term we use the short hand $$\partial_xu=u_x$$. It looks like you are trying to apply the gradient to the velocity vector first, then dotting it with the velocity. This can also work, but takes a bit more care in the notation (cf also this Math.SE post), as the gradient of the vector is, $$\nabla\vec u=\left(\begin{array}{cc}\partial_xu & \partial_yu \\ \partial_xv & \partial_yv\end{array}\right).$$ So dotting this with the vector $$\vec u$$ should give you the same result.

You should also be aware that $$\vec u\vec u$$ is common shorthand for the dyadic product, which in your 2D case leads to, $$\vec u\vec u=\vec u\otimes\vec u=\left(\begin{array}{cc}uu & uv \\ vu & vv\end{array}\right)$$ Care with notation should lead you to the same conclusion as the authors.

• Thank you very much. My mistake was to apply gradient operator to the term before it. – For Bonder Jan 29 '19 at 14:45