How do I calculate the wall normal vector in CFX-5.7?
This can be done by solving for Wall Scale or Wall Distance and then using the normalized gradient of wall scale as explained below. Wall distance and wall scale will change most rapidly in the direction of the nearest wall. The direction of most rapid change of a scalar is also given by the gradient. Therefore the direction vector to the nearest wall can be calculated by obtaining and normalizing the wall scale gradient, i.e. for a simulation performed with Water as the fluid: Wallnormalvector = (Water.Wall Scale.Gradient X + Water.Wall Scale.Gradient Y + Water.Wall Scale.Gradient Z)/mag(Water.Wall Scale.Gradient). The gradient of wall scale can be obtained in user fortran as described in the second user CEL fortran function example in the on-line help. Wall distance and wall scale will be calculated automatically if the SST turbulence model is used. If the SST turbulence model is not used, a user can force the code to solve for wall distance and wall scale by setting up some dependence on them in the problem. One way to do this would be to define an algebraic additional variable and set it equal to Wall Distance or Wall Scale. The definition of the wall normal vector only becomes ambiguous when the closest wall becomes ill-defined (at points nearly equidistant between two or more walls. |
||
|