This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Computation of local Peclet number for anisotropic mesh

0 votes

Hi all,

I would like to compute the local Peclet number for a highly anysotropic mesh using the following formula.

Let $\mathbf{u} \in \mathbb{R}^2$ be the velocity field. Assume that $\mathbf{u}$ is constant on each element $\tau$ of the mesh.
Let the edges of $\tau$ be $\mathbf{e}_1 = \mathbf{x}_2 - \mathbf{x}_3$, $\mathbf{e}_2 = \mathbf{x}_3 - \mathbf{x}_1$ and $\mathbf{e}_3 = \mathbf{x}_1 - \mathbf{x}_2$, where $\mathbf{x}_i$ are the coordinates of the three vertices of the triangle $\tau$.

Then the local Pe number is defined as

$$ Pe_\tau = \frac{ \max_i\left( \mathbf{u} \cdot \mathbf{e}_i \right) }{2 \nu}, $$

where $\nu$ is the viscosity.

Is there an UFL expression to easily evaluate the edges $\mathbf{e}_i$ of $\tau$?

Thanks a lot,

Umberto

asked Feb 1, 2016 by umberto FEniCS User (6,440 points)

Exists a ufl class named CellEdgeVectors. I don't know how it works, but maybe might be useful for you (some references: here and here)

...