Implementing Coriolis term in shallow water equations


I’m new to FEniCSx and have been playing with the tutorials / demos. As part of learning process, I wanted to solve 2D shallow water equations in FEniCSx. I have done good progress, but I am stuck with how to implement Coriolis term in the SW version of Navier Stokes

\ellipsis + f \vec{k} \times \vec{u} + \ellipsis

As I understand, ufl.cross() requires three dimensional vector fields, however, the SWE are 2D equations. How do I implement the term into the variational form?



This text will be hidden

To you visiting this page 3 years from today:

I found out that ufl.perp(u) does exactly what was needed for \vec{k} \times \vec{u}