Normal Velocity at a boundary

Sometimes it is important to inquire, where on a surface the flow goes into and where out of the surface. This demands an existing solution of the normal vector, which is to be found under ComputeNormal, and of course the velocity field. The inner product of these vectors is then the normal velocity. As the surface normal by convention should point outwards, positive signs of the normal velocity correspond to outflow, negative to inflow.

The corresponding MATC function is:

$ function getNormalVelocity(A) {\
    _getNormalVelocity = A(0)*A(3) + A(1)*A(4) + A(2)*A(5);\

Its call from a specific Boundary section is:

Boundary Condition 1
  ComputeNormal = True
  NormalVelocity = Variable Velocity 1, Velocity 2, Velocity 3, Normal Vector 1, Normal Vector 2, Normal Vector 3
      Real MATC "getNormalVelocity(tx)"

In order to have a variable named 'NormalVelocity' we have to declare it somewhere in a solver as exported variable

Solver 1
  Exported Variable 1 = -dofs 1 "NormalVelocity"
tips/normalvelo.txt · Last modified: 2013/01/30 08:23 by tzwinger
CC Attribution-Share Alike 4.0 International Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0