Linearized Euler equations: is decoupling mandatory?

Hello everyone,

In the following \underline{x} is a vector and $\underline{\underline{x}} is a matrix

I’m a newcomer in the FEniCS world. I’m interested in solving the linearized Euler equations by means of the discontinuous Galerkin method.

The equations read (momentum and continuity equations) in 2D:

\begin{cases} \begin{split} - i \omega \underline{u} + \nabla p = 0 \\ -i \omega p + \nabla \cdot \underline{u} = 0 \end{split} \end{cases}

However, it is convenient to write this system under the form (this form is very convenient to derive an upwind flux):

- i \omega \underline{\phi} + \underline{\underline{A_x}} \partial_x \underline{\phi} + \underline{\underline{A_x}} \partial_y \underline{\phi} = \underline{0}

where \underline{\phi} contains both \underline{u} and p where

\begin{cases} \begin{split} \underline{\underline{A_x}} = \begin{pmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 1 & 0 & 0 \end{pmatrix} \\ \underline{\underline{A_y}} = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix} \end{split} \end{cases}

After having looked at a few examples, it does not seem that FEniCS can handle such equation. In particular, there is not any divergence nor any gradient in this form which are at the heart of the variational forms used in FEniCS.
I still gave it a try by using ufl.Dx to select only derivatives along x or y but that was not satisfactory. I feel like only the first equation can be implemented by “decoupling”, i.e. not having a single pair of trial and test functions but two pairs: one for the velocity and one for the pressure.

Can anyone, please, give me some hints here? Is is possible to implement the above equation as it is FEniCS?

Best,

Lucas

I just found that this post answers my question.