next up previous
Up: Brief notes on CFD, Previous: Normal shock relations

Mapping a quadrilateral to a cube

Let the four corners of the quadrilateral have position vectors $\vec{R}_1$, $\vec{R}_2$, $\vec{R}_3$ and $\vec{R}_4$. Let it be transformed to a cube $[0,1] \times [0,1]$ in the $(\xi, \eta)$ plane. The following transformation maps the cube to the quadrilateral (Thanks to Josy for giving this transformation)


\begin{displaymath}
\vec{R} = \frac{1}{4}(1 - \xi)(1 - \eta) \vec{R}_1 +
\frac...
...+ \eta) \vec{R}_3 +
\frac{1}{4}(1 - \xi) (1 +\eta) \vec{R}_4
\end{displaymath}

This is basically a Lagrange interpolant, ie., the coefficient of each $\vec{R}_i$ is equal to one when $\vec{R} = \vec{R}_i$ and zero at all the remaining points.

In terms of the coordinates we have


\begin{displaymath}
x = (1 - \xi)(1 - \eta) x_1 + \xi (1 - \eta) x_2 + \xi \eta
x_3 + (1 - \xi) \eta x_4
\end{displaymath}


\begin{displaymath}
y = (1 - \xi)(1 - \eta) y_1 + \xi (1 - \eta) y_2 + \xi \eta
y_3 + (1 - \xi) \eta y_4
\end{displaymath}

Let $F(x,y)$ be a function defined on the quadrilateral $\Omega$ and we want to integrate it on $\Omega$. We first map it to the cube $\Omega'$


\begin{displaymath}
I = \int_\Omega F(x,y) \textrm{d}x \textrm{d}y = \int_{\Omega'} G(\xi, \eta) \vert J\vert \textrm{d}\xi \textrm{d}
\eta
\end{displaymath}

where


\begin{displaymath}
G(\xi,\eta) = F( x(\xi, \eta), y(\xi, \eta) )
\end{displaymath}

and


\begin{displaymath}
J = \frac{\partial (x,y)}{\partial (\xi,\eta)} = \left[ \beg...
...al \xi} & \frac{\partial y}{\partial \eta} \end{array} \right]
\end{displaymath}


\begin{displaymath}
\vert J\vert = \det(J) = \frac{\partial x}{\partial \xi} \fr...
...rac{\partial x}{\partial \eta} \frac{\partial y}{\partial \xi}
\end{displaymath}

Then the integral is approximated by Gauss quadrature


\begin{displaymath}
I = \int_{\Omega'} \underbrace{ G(\xi, \eta) \vert J\vert}_H \textrm{d}\xi \textrm{d}\eta =
\sum_{j=1}^{N_g} w_j H_j
\end{displaymath}

where


\begin{displaymath}
H_j = H(\xi_j, \eta_j)
\end{displaymath}

are evaluated at the $N_g$ gaussian points.


next up previous
Up: Brief notes on CFD, Previous: Normal shock relations
Praveen. C, last updated on 18-February-2005