# Finite Element integration with tensor notation

While I was studying discontinuous finite element methods I found an integration of a Navier Stokes equation using tensorial notation. The equation is the following:

$\mathbf{\bar {u}}_{t} + (\mathbf{\bar {u}}.\triangledown )\mathbf{\bar {u}} = -\triangledown p + \triangledown.\mathbf{\bar{\bar{\tau}}} + \mathbf{\bar {f}}$

after integration the weak form is:

$\int_{\Omega_{j}} \mathbf{\bar {u}}_{t}.\mathbf{\bar {v}}dV - \int_{\Omega_{j}} \mathbf{\bar {u}}_{}.\triangledown.(\mathbf{\bar {v}}\otimes \mathbf{\bar {u}})dV + \int_{\partial \Omega_{j}} \mathbf{\bar {u}}.(\mathbf{\bar {n}}\otimes\mathbf{\bar {u}}). \mathbf{\bar {v}}ds - \int_{\Omega_{j}}p.\triangledown \mathbf{\bar {v}}dV + \int_{\partial \Omega_{j}}p\mathbf{\bar {v}}.\mathbf{\bar {n}}ds + \int_{ \Omega_{j}}\mathbf{\bar{\bar{\tau}}}:\triangledown \mathbf{\bar {v}}dV- \int_{\partial \Omega_{j}} \mathbf{\bar{\bar{\tau}}}:(\mathbf{\bar {v}}\otimes \mathbf{\bar {n}})ds = \int_{ \Omega_{j}} \mathbf{\bar {f}}.\mathbf{\bar {v}}dV$

where a single and a double overbar means first and second order tensors respectively and the $\mathbf{\bar {v}}$ vector is the basis used in the integration. I didn't understand the integration of the second LHS and RHS terms. I tried to use the divergence theorem but I wasn't able to obtain the dyadic products of the surface integrals. I would appreciate your help.

• I think there's a mistake in the second term on the LHS, where you have a normal vector $\mathbf{n}$ that should probably be $\mathbf{v}$. You can try writing out everything in index notation instead; I usually find that easier. Nov 27, 2014 at 4:26
• That's right. It is $\mathbf{v}$. Nov 27, 2014 at 8:29

Consider the product rule:

$[\mathbf{\bar {u}}.\triangledown \mathbf{\bar {v}}]_{k}= u_{m}\dfrac{\partial v_{k}}{\partial x_{m}}= \dfrac{\partial u_{m} v_{k}}{\partial x_{m}} - v_{k} \dfrac{\partial u_{m}}{\partial x_{m}} = [\triangledown.(\mathbf{\bar {u}} \mathbf{\bar {v}}) - \mathbf{\bar {v}}(\triangledown.\mathbf{\bar {u}}]_{k}$

writing the inner product of the basis vector $\mathbf{\bar {v}}$ with the second term in LHS of the Navier Stokes equation in indicial notation and using the product rule we obtain:

$\mathbf{\bar {v}}.(\mathbf{\bar {u}}. \triangledown\mathbf{\bar {u}}) = v_{k} u_{m} \dfrac{\partial u_{k}}{\partial x_{m}} = \dfrac{\partial v_{k} u_{m} u_{k}}{\partial x_{m}} - u_{k} \dfrac{\partial v_{k} u_{m}}{\partial x_{m}} = \triangledown.(\mathbf{\bar {v}}.\mathbf{\bar {u}} \mathbf{\bar {u}}) - \mathbf{\bar {u}}.\triangledown.(\mathbf{\bar {v}} \mathbf{\bar {u}})$

So,

$\int_{ \Omega_{j}} \mathbf{\bar {v}}.(\mathbf{\bar {u}}. \triangledown\mathbf{\bar {u}})dV = \int_{ \Omega_{j}} \triangledown.(\mathbf{\bar {v}}.\mathbf{\bar {u}} \mathbf{\bar {u}})dV - \int_{ \Omega_{j}} \mathbf{\bar {u}}.\triangledown.(\mathbf{\bar {v}} \mathbf{\bar {u}})dV$

using Gauss's theorem,

$\int_{ \Omega_{j}} \mathbf{\bar {v}}.(\mathbf{\bar {u}}. \triangledown\mathbf{\bar {u}})dV = \int_{ \partial \Omega_{j}} \mathbf{\bar {n}}. \mathbf{\bar {v}}. \mathbf{\bar {u}} \mathbf{\bar {u}} dS - \int_{ \Omega_{j}} \mathbf{\bar {u}}.\triangledown.(\mathbf{\bar {v}} \mathbf{\bar {u}})dV$

with,

$\mathbf{\bar {n}}. \mathbf{\bar {v}}. \mathbf{\bar {u}} \mathbf{\bar {u}} = \mathbf{\bar {u}}.\mathbf{\bar {n}} \mathbf{\bar {u}}. \mathbf{\bar {v}}$

which can be proved using basis notation (not shown here because is tedious)

proceeding in the same way to the second term in RHS of the NS equation we obtain:

$\mathbf{\bar {v}}.\triangledown. \mathbf{\bar{\bar{\tau}}} = v_{k}\dfrac{\tau_{mk}}{\partial x_{m}} = \dfrac{\partial v_{k} \tau_{mk}}{\partial x_{m}} - \tau_{mk}\dfrac{\partial v_{k}}{\partial xm} = \triangledown. (\mathbf{\bar {v}}.\mathbf{\bar{\bar{\tau}}}) - \mathbf{\bar{\bar{\tau}}}:\triangledown \mathbf{\bar {v}}$

$\int_{ \Omega_{j}} \mathbf{\bar {v}}. \mathbf{\bar{\bar{\tau}}}dV = - \int_{ \Omega_{j}} \mathbf{\bar{\bar{\tau}}}: \triangledown \mathbf{\bar {v}}dV + \int_{ \partial \Omega_{j}} \mathbf{\bar {n}}. \mathbf{\bar {v}}. \mathbf{\bar{\bar{\tau}}}dS$

with $\mathbf{\bar {n}}. \mathbf{\bar {v}}.\mathbf{\bar{\bar{\tau}}} = \mathbf{\bar {v}} \mathbf{\bar {n}}: \mathbf{\bar{\bar{\tau}}}$,

$\mathbf{\bar {n}}. \mathbf{\bar {v}}.\mathbf{\bar{\bar{\tau}}} = n_{i} \mathbf{\bar {e}_{i}}. v_{j} \mathbf{\bar {e}_{j}}. \tau_{mk} \mathbf{\bar {e}_{m}} \mathbf{\bar {e}_{k}} = n_{i} \mathbf{\bar {e}_{i}}.v_{j}\tau_{mk}\mathbf{\bar {e}_{j}}.\mathbf{\bar {e}_{m}} \mathbf{\bar {e}_{k}}= n_{i} \mathbf{\bar {e}_{i}}.v_{j}\tau_{mk}\delta_{jm}\mathbf{\bar {e}_{k}}= n_{i} \mathbf{\bar {e}_{i}}.v_{m}\tau_{mk}\mathbf{\bar {e}_{k}} = n_{i}v_{m}\tau_{mk}\mathbf{\bar {e}_{i}}.\mathbf{\bar {e}_{k}}= n_{i}v_{m}\tau_{mk}\delta_{ik}= n_{k}v_{m}\tau_{mk}$

$\mathbf{\bar {v}} \mathbf{\bar {n}}:\mathbf{\bar{\bar{\tau}}} = v_{m}n_{k}\tau_{mk}$