Hi,
I working on simulation of Low-Reynolds Turbulent flows (Chein's Model).
I am stuck in a middle and probably something with a simple solution, In order to calculate the term
$
\begin{align}
y^+ &= \frac{yu_{\tau}}{\nu} \\
\nu &= \text{ Kinematic viscocity} \\
u_{\tau} &= \text{ Friction Velocity } \\ \\
where, \\
u_{\tau} &= \sqrt{ \nu \frac{\partial u_t}{\partial n} } \\
\\
u_t &= \text{ Tangential velocity w.r.t. wall and } \\
n &= \text{ Wall Normal } \tiny{(Inner Normal)} \\
\end{align}
$
So far, I have tried to implement, a function on
import dolfin as df; import numpy as np
mesh = df.UnitSquareMesh(5, 5) # (All Boundaries are walls)
V = df.VectorFunctionSpace(mesh, "CG", 2)
# The velocity in the computation is a function at time 't'.
# u_tau will be used in calculation of velocity at time 't + dt'.
# For Simplicity, using a general expression for the solution.
u = df.interpolate(df.Expression(('x[0] + x[1]'), ('x[0] - x[1]')), V)
gradu = project(grad(u), TensorFunctionSpace(mesh, "CG", 1))
n = df.FacetNormals(mesh)
# du = (du_x/dn, du_y/dn)
du_dn = project(df.dot(gradu, n), df.VectorFunctionSpace(mesh, "CG", 1))
I get the error:
UFLException: Integral of type cell cannot contain a Facetnormal.
I understand the error but, in order to compute velocity gradient, normal to the wall, for the domain, I am not sure what to do.
Can, someone please guide me as how to calculate the normal velocity gradient w.r.t walls ??
PS :: The boundary conditions for the velocity is $u_{wall} = 0$