# How to approximate the flux when using finite volumes?

How to approximate flux $$F(u)\cdot n$$ where $$n$$ denotes the unit normal outward when using finite volumes?

$$\int_{\sigma} F(u) \cdot \boldsymbol{n}_{K, \sigma} \mathrm{d} \gamma(x)$$

The integral may be approximated with

\begin{align} \int_{\partial \Omega} \boldsymbol{\mathcal{F}} \cdot \vec{n} ~ds \approx \sum_k L_k \mathbf{T}^{-1}\vec{F}\left(\mathbf{T}~ \vec{u}\right) \end{align},

where $$L_k$$ is the length of each side and $$\mathbf{T}$$ is a rotation matrix.

tl;dr

The answer depends on your equation system. Using the conservation laws in two dimensions, e.g. Euler equations (rotation invariant)

$$\vec{u}_t + \vec{F}\left(\vec{u}\right)_x + \vec{G}\left(\vec{u}\right)_y = \vec{0},$$

with

\begin{align} \vec{u}= \left( \begin{array}{r} u_1 \\ u_2 \\ u_3 \\ u_4 \end{array}\right) ,\quad \vec{F}\left(\vec{u}\right)= \left( \begin{array}{r} F_1\left(\vec{u}\right) \\ F_2\left(\vec{u}\right) \\ F_3\left(\vec{u}\right) \\ F_4\left(\vec{u}\right) \end{array}\right) ,\quad \vec{G}\left(\vec{u}\right)= \left( \begin{array}{r} G_1\left(\vec{u}\right) \\ G_2\left(\vec{u}\right) \\ G_3\left(\vec{u}\right) \\ G_4\left(\vec{u}\right) \end{array}\right), \end{align}

you can write

\begin{align} \boldsymbol{\mathcal{F}}\cdot \vec{n}\equiv\left[\vec{G}\left(\vec{u}\right),\vec{F}\left(\vec{u}\right)\right]\cdot \vec{n} = n_1 \vec{F}\left(\vec{u}\right)+ n_2 \vec{G}\left(\vec{u}\right) = \mathbf{T}^{-1}\vec{F}\left(\mathbf{T}~ \vec{u}\right) \end{align},

where

\begin{align} \mathbf{T}=& \left( \begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & n_1 & n_2 & 0 \\ 0 & -n_2 & n_1 & 0 \\ 0 & 0 & n & 1 \\ \end{array}\right), \quad \mathbf{T}^{-1}= \left( \begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & n_1 & -n_2 & 0 \\ 0 & n_2 & n_1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array}\right),\\[1em] \vec{n}&\equiv \left( n_1, n_2 \right) = \left(\cos\left(\phi\right), \sin\left(\phi\right)\right), \end{align}

and

\begin{align} \mathbf{T} ~ \vec{u}= \left( \begin{array}{c} u_1 \\ n_1 u_1 + n_2 u_2 \\ -n_2 u_1 + n_1 u_2 \\ u_4 \end{array}\right) ,\quad \mathbf{T}^{-1} ~ \vec{F}= \left( \begin{array}{c} F_1 \\ n_1 F_1\left(\vec{u}\right) - n_2 F_2\left(\vec{u}\right) \\ n_2 F_1\left(\vec{u}\right) + n_1 F_2\left(\vec{u}\right) \\ F_4 \end{array}\right). \end{align}

• Si on prends $F=(\frac{-u^2}{2}-u,\frac{-u^2}{2}-u)$ avec $u$ est un scalaire, comment l'approximer Commented Dec 17, 2023 at 19:02
• For a scalar value pick the first line of the equation system above. Commented Dec 18, 2023 at 7:17