UCLA Mathematics : Math 270E

void getStreamFcnAndStaggeredVelocity(double hx, double hy, DoubleArray2D& Omega, DoubleArray2D& Psi, DoubleArray2D& U, DoubleArray2D& V)

Computes the stream function and staggered grid velocity from a given vorticity distribution


Documentation

Computes the stream function and staggered grid velocity from a given vorticity distribution. The computation assumes that the values of the vorticity are associated with a uniform rectangular grid that has mPanel panels in the x direction and nPanel panels in the y direction.

The stream function is computed at the nodes of grid, while the velocity field is computed at the edges of cells associated with the grid.

The input and output DoubleArray2D arguments must be constructed externally and be of the appropriate size.

Note!!! The arrays for the U and the V velocity are different sizes; a consequence of the staggered grid velocity arrangement.

Parameters:
hx - mesh width in x-direction
hx - mesh width in y-direction
Omega - (input) DoubleArray2D of size mPanel+1 by nPanel+1 containing the vorticity.
Psi - (output) DoubleArray2D of size mPanel+1 by nPanel+1 containing the stream function.
U - (output) DoubleArray2D of size mPanel+1 by nPanel containing the U velocity.
V - (output) DoubleArray2D of size mPanel by nPanel+1 containing the V velocity.

Header: StaggeredGridUtilities.h
Source: StaggeredGridUtilities.cpp

 

Author:
Chris Anderson (C) UCLA
Version:
Nov. 11, 2008