next up previous contents
Next: Discretization of boundary conditions Up: Numerical Method Previous: Boundary conditions   Contents


Computational grid and spatial discretization

In [1] only uniform grids were used. Therefore we present the difference stencils used for the staggered grid. A 2D example is shown in figure [*].
Figure: 2D staggered mesh
\includegraphics[width=0.6\textwidth,keepaspectratio]{p2.eps}
For convenience we denote the coordinates of the mesh lines by $ x_0,...,x_M$ , $ y_0,...,y_N$ and $ z_0,...,z_K$. These values completely define the computational grid. How to tell navcalc these values is explained in chapter [*]. Here and in the following we denote by cells the rectangular subdomains $ [x_i,x_{i+1}]\times[y_j,y_{j+1}]\times[z_k,z_{k+1}]$. The computational domain $ \Omega$ is a union of cells.

Velocity components and pressure values are defined on the nodes:

$ u_{i,j,k}$ defined on $ (x_i,y_{j+1/2},z_{k+1/2})$
$ v_{i,j,k}$ `` $ (x_{i+1/2},y_j,z_{k+1/2})$
$ w_{i,j,k}$ `` $ (x_{i+1/2},y_{j+1/2},z_k)$
$ p_{i,j,k}$ `` $ (x_{i+1/2},y_{j+1/2},z_{k+1/2})$
$ T_{i,j,k},C_{i,j,k}$ `` $ (x_{i+1/2},y_{j+1/2},z_{k+1/2})$
    , where $ i,j,k \in \mathbb{Z}$.
The following stencils are used for the spatial discretization. We use the notation

$\displaystyle \Delta x_i=x_i-x_{i-1}$    and $\displaystyle \quad \Delta x_{i+1/2} = (\Delta x_i+\Delta x_{i+1})/2 \quad.
$

The values $ \Delta y_j$, $ \Delta y_{j+1/2}$, $ \Delta z_k$, $ \Delta z_{k+1/2}$ are defined analogously. To preserve the second order accuracy of the stencils a smooth distribution of the grid spaces $ \Delta x_i$,.. is required. To obtain such smooth grids use the GridGen utility.

Diffusive terms:
$\displaystyle \left[\frac{\partial^2 u}{\partial x^2}\right]_{i,j,k}$ $\displaystyle =$ $\displaystyle \frac{1}{\Delta x_{i+1/2}}
\left(\frac{u_{i+1,j,k} - u_{i,j,k}}{\Delta x_i} - \frac{u_{i,j,k} - u_{i-1,j,k}}{\Delta x_{i-1}} \right)$  
$\displaystyle \left[\frac{\partial^2 u}{\partial y^2}\right]_{i,j,k}$ $\displaystyle =$ $\displaystyle \frac{1}{\Delta y_j}
\left(\frac{u_{i,j+1,k} - u_{i,j,k}}{\Delta y_{j+1/2}} - \frac{u_{i,j,k} - u_{i,j-1,k}}{\Delta y_{j-1/2}} \right)$  

The other diffusive terms are discretized in a similar fashion. Stencils similar to the one for $ \frac{\partial^2 u}{\partial y^2}$ are used for $ \frac{\partial^2 \Theta}{\partial x^2}$, $ \frac{\partial^2 \Theta}{\partial y^2}$ and $ \frac{\partial^2 \Theta}{\partial z^2}$, where $ \Theta$ is either $ T$ or $ C$.

Convective terms:
Five different discretizations of the convective terms are possible:
  1. Donor-Cell (hybrid-scheme) (1st/2nd order)
  2. Quadratic upwind interpolation for convective kinematics (QUICK) (2nd-Order)
  3. Hybrid-Linear Parabolic Arppoximation (HLPA) (2nd-Order)
  4. Sharp and Monotonic Algorithm for Realistic Transport (SMART) (2nd-Order)
  5. Variable-Order Non-Oscillatory Scheme (VONOS) (2nd/3rd-Order) (default)
To select one of these schemes, you have to set the appropriate variable in the scene description file. How to do this is explained in section [*]. By default the VONOS-scheme is used. In the following the Donor-Cell scheme is briefly described. More details about the other schemes can be found in [3].

Second order convective terms:

$\displaystyle \left[\frac{\partial u^2}{\partial x}\right]_{i,j,k}$ $\displaystyle =$ $\displaystyle \frac{(u_{i+1,j,k}+u_{i ,j,k})^2 -
(u_{i ,j,k}+u_{i-1,j,k})^2 }{4 \Delta x_{i+1/2}}$  
$\displaystyle \left[\frac{\partial vu}{\partial y}\right]_{i,j,k}$ $\displaystyle =$ $\displaystyle \frac{v_{i+1/2,j ,k} u_{i,j+1/2,k} -
v_{i+1/2,j-1,k} u_{i,j-1/2,k} }{\Delta y_{i }}$  

Stencils similar to the one for $ \frac{\partial vu}{\partial y}$ are used for the discretization of the convective terms in ([*]) and ([*]), e.g. we have

$\displaystyle \left[\frac{\partial vT}{\partial y}\right]_{i,j,k} = \frac{v_{i+1/2,j ,k} T_{i,j+1/2,k} -
v_{i+1/2,j-1,k} T_{i,j-1/2,k} }{\Delta y_{i }}\quad.
$

The unknown values, e.g. $ v_{i+1/2,j,k}$ are computed by linear interpolation.
$\displaystyle u_{i,j+1/2,k}$ $\displaystyle =$ $\displaystyle \frac{\Delta y_j u_{i,j+1,k}+\Delta y_{j+1} u_{i,j,k}}{\Delta y_j+\Delta y_{j+1}}$  
$\displaystyle v_{i+1/2,j,k}$ $\displaystyle =$ $\displaystyle \frac{\Delta x_i v_{i+1,j,k}+\Delta x_{i+1} v_{i,j,k}}{\Delta x_i+\Delta x_{i+1}}$  

First order upwind:
$\displaystyle \left[\frac{\partial u^2}{\partial x}\right]_{i,j,k}$ $\displaystyle =$ $\displaystyle \frac{k_Ru_R - k_Lu_L}{\Delta x_{i+1/2}} \quad,$    where $\displaystyle k_R=(u_{i+1,j,k}+u_{i,j,k})/2 ~~,~~k_L=(u_{i+1,j,k}+u_{i,j,k})/2$  
    and $\displaystyle u_R=\left\{\begin{array}{ccc} u_{i,j,k} &:& k_R >0\\ u_{i+1,j,k} ...
...{array}{ccc} u_{i-1,j,k} &:& k_L >0\\ u_{i ,j,k} &:& k_L\le 0\end{array}\right.$  
       
$\displaystyle \left[\frac{\partial vu}{\partial y}\right]_{i,j,k}$ $\displaystyle =$ $\displaystyle \frac{k_Ru_R - k_Lu_L}{\Delta y_j} \quad,$    where $\displaystyle k_R=v_{i+1/2,j,k}~~,~~k_L=v_{i-1/2,j,k}$  
    and $\displaystyle u_R=\left\{\begin{array}{ccc} u_{i,j,k} &:& k_R >0\\ u_{i,j+1,k} ...
...{array}{ccc} u_{i,j-1,k} &:& k_L >0\\ u_{i ,j,k} &:& k_L\le 0\end{array}\right.$  
       

Stencils similar to the one for $ \frac{\partial vu}{\partial y}$ are used for the upwind discretization of the convective terms in ([*]) and ([*]). First and second order terms can be blended using a parameter $ \alpha$ by, e.g.

$\displaystyle \frac{\partial u^2}{\partial x}=\alpha($first order$\displaystyle )+(1-\alpha)($second order$\displaystyle )\quad.
$

The blending parameter $ \alpha$ is user definable (see chapter [*]) and may be chosen different for the equations of momentum and energy or transport of a scalar.

Laplacian for pressure:
We employ a conservative discretization which is simply the nested application of the centered difference for the pressure gradient and the centered difference for the natural discretization of the divergence, e.g.

$\displaystyle \left[\frac{\partial^2 p}{\partial x^2}\right]_{i,j,k} =
\frac{1}...
...Delta x_{i+1/2}}-
\frac{p_{i,j,k}-p_{i-1,j,k}}{\Delta x_{i-1/2}}\right) \quad.
$


Poisson solvers:

For the solution of the linear equation arising from discretization of the pressure poisson equation, the following numerical methods are implemented:

  1. Successive Overrelaxation (SOR)
  2. Symmetric SOR (forward/backward)
  3. Red-Black scheme
  4. 8-Color SOR
  5. 8-Color Symmetric SOR (fw/bw)
  6. BiCGStab

To select a method, select the corresponding option in the scene description file(see section [*] on how to do this). By default, the Poisson-equation is solved using the BiCGStab-method.


next up previous contents
Next: Discretization of boundary conditions Up: Numerical Method Previous: Boundary conditions   Contents
Martin Engel 2004-03-15