JakobCHR.com
 
Quick Navigation:
 
Personal:
 Go to Home
 MS Research
 PhD Research
 Curriculum Vitae

General:
 Linux

Soon to come:
 Matlab
 On-line Stores
 Cycling
 Medicine & Health
 LaTeX
 OOP & C++
 Sony PCM-R500 DAT


next up previous contents index
Next: Truncation error Up: Core flow numerics Previous: Core flow numerics   Contents   Index

Introduction

In order to solve the core flow model given in section 6.8 on a computer we have to discretize the governing equations. We can take at least two courses to discretize the equations. We could either apply the standard finite difference technique or rearrange the equations in such a way that they resemble a system of 1st order ordinary differential equations. The latter is at first glance attractive since several program packages exist which solve systems of 1st order ODEs. For this reason we will dwell a little on the possibilities of rearranging the equations such that they resemble a system of 1st order ODEs. Our task is to convert the four equations

\begin{displaymath}
\frac{dp}{dz} = f_a(\mbox{$<\!{\alpha}\!>$},\mbox{$<\!{x}\!...
...ac{\mbox{$<\!{x}\!>$}^2}{\rho_g\mbox{$<\!{\alpha}\!>$}}\right]
\end{displaymath} (7.1)


\begin{displaymath}
\mbox{$<\!{\alpha}\!>$}= f_b(\mbox{$<\!{x}\!>$},\rho_\ell,\rho_g,\mbox{$<\!{G}\!>$})
\end{displaymath} (7.2)


\begin{displaymath}
\mbox{$<\!{x}\!>$}= f_c(\mbox{$<\!{h}\!>$},h_f,h_{fg},h_{\ell,d})
\end{displaymath} (7.3)


\begin{displaymath}
\frac{d}{dz}\left[ \mbox{$<\!{h}\!>$} \right] = \frac{q'(z)}{\mbox{$<\!{G}\!>$}A_c}
\end{displaymath} (7.4)

where fa, fb and fc are given functions into a form similar to

\begin{displaymath}
\hspace{0.2ex}\underline{\underline{A}}{}\hspace{0.15ex}(\h...
...}\hspace{0.15ex}(\hspace{0.2ex}\underline{x}{}\hspace{0.15ex})
\end{displaymath} (7.5)

where

\begin{displaymath}
\hspace{0.2ex}\underline{x}{}\hspace{0.15ex} \;\hbox{$=$\ke...
... \mbox{$<\!{x}\!>$}\\
\mbox{$<\!{h}\!>$} \end{array} \right]
\end{displaymath} (7.6)

and $\hspace{0.2ex}\underline{\underline{A}}{}\hspace{0.15ex}$ is a hopefully non-singular (4 x 4) matrix dependent on $\hspace{0.2ex}\underline{x}{}\hspace{0.15ex}$ and the dot indicates differentiation (with respect to z). The transformation from (7.1)-(7.4) to (7.5) would require the following operations
.
Apply the chain rule for differentiation on the square brackets in (7.1).
.
Apply the chain rule for differentiation on (7.2).
.
Apply the chain rule for differentiation on (7.3).
For example applying the chain rule on (7.2) yields

\begin{displaymath}
\frac{d}{dz}\left[\mbox{$<\!{\alpha}\!>$}\right] = \frac{\p...
...mbox{$<\!{\alpha}\!>$}}{\partial \rho_g} \frac{d \rho_g
}{dz}
\end{displaymath} (7.7)

which means that we for instance have to calculate the derivative $(d \rho_\ell /
dz)$7.1. We can conclude that the transformation requires knowledge of derivatives of the property functions. In addition we would have to calculate the derivatives of the external constitutive relations, like the one for $\mbox{$<\!{\alpha}\!>$}$.

Apart from being a very cumbersome task it is impractical in the users view to require derivatives of the external constitutive relations since it is likely that a user would like to install his or her own constitutive relations7.2.

However, with the inconvenience of the method just described in mind it is plausible to pursue the other course in order to discretize the model--that is we will apply a finite difference technique.

Considering two points in a computational grid, zi and zi+1, which are a distance ki apart we can derive the following finite difference approximations for the four equations (6.100)-(6.103) given in section 6.8. For the momentum equation7.3 we obtain


\begin{eqnarray*}
\lefteqn{- \frac{p_{i+1} - p_i}{k_i} - \frac{4}{D_e} \left[ \...
...<\!{x}\!>$}_i^2}{\rho_{g,i}\mbox{$<\!{\alpha}\!>$}_i} \right ]
\end{eqnarray*}


$\textstyle \parbox{1.50cm}{\begin{eqnarray}
\end{eqnarray}}$

and for the last three discretized equation read

\begin{displaymath}
\mbox{$<\!{x}\!>$}_{i+1} = f_4( \mbox{$<\!{h}\!>$}_{i+1}, h_{f,i+1}, h_{fg,i+1}, h_{\ell,d})
\end{displaymath} (7.8)


\begin{displaymath}
\mbox{$<\!{\alpha}\!>$}_{i+1} = f_2( \mbox{$<\!{x}\!>$}_{i+1}, \rho_{\ell,i+1}, \rho_{g,i+1},
\mbox{$<\!{G}\!>$})
\end{displaymath} (7.9)


\begin{displaymath}
\frac{\mbox{$<\!{h}\!>$}_{i+1} - \mbox{$<\!{h}\!>$}_i}{k_i}...
...box{$<\!{G}\!>$}A_c} \left[ \frac{q_{i+1}' +
q_i'}{2} \right]
\end{displaymath} (7.10)

where indices i and i+1 refer to points zi and zi+1 respectively. In this finite difference scheme we have discretized the two ordinary differential equations about the point $z_{i+\frac{1}{2}} = z_i +
\frac{1}{2}k_i$. However since we do not have access to function values of for instance $\tau_w$ between the points zi and zi+1 we have been forced to use an average value $(\tau_{w,i+1}+\tau_{w,i})/2$ in place of $\tau_{w,i+\frac{1}{2}}$. This is the well-known strategy which is used in the famous Crank-Nicolson method for the diffusion equation [56, p. 151]. As we will see shortly this discretization strategy assures 2nd order accuracy of the difference equations. The price for the 2nd order accuracy is that the scheme is implicit which implies that we have to solve a system of non-linear equation for every application of the scheme.

As stated previously the three first equations (7.8)-(7.10) can be solved independently of the fourth (7.11). If we concentrate on the three coupled equations these can be cast in the following form

\begin{displaymath}
\hspace{0.2ex}\underline{f}{}\hspace{0.15ex}(\hspace{0.2ex}...
...{0.15ex}_{i+1}) = \hspace{0.2ex}\underline{0}{}\hspace{0.15ex}
\end{displaymath} (7.11)

where $\hspace{0.2ex}\underline{f}{}\hspace{0.15ex}$ is a vector function which contains the three couples equations as elements and the vector $\hspace{0.2ex}\underline{s}{}\hspace{0.15ex}_{i+1}$ is the (unknown) state of the system at point zi+1 defined by

\begin{displaymath}
\hspace{0.2ex}\underline{s}{}\hspace{0.15ex}_{i+1} \;\hbox{...
...}\!>$}_{i+1} \\
\mbox{$<\!{x}\!>$}_{i+1} \end{array} \right]
\end{displaymath} (7.12)

We conclude that in order to obtain the state at the next z-level by applying the finite difference scheme requires that we solve a system of non-linear equations. This task is discussed in section 7.3.

The finite difference method cannot attain particularly high order when compared to standard methods for systems of 1st order ODEs. However as demonstrated by practical calculations the problem we are concerned with can be solved accurately even by the use of very coarse computational grids. In other words we have no need for high order in our case which again supports our choice of finite differences as discretization.


next up previous contents index
Next: Truncation error Up: Core flow numerics Previous: Core flow numerics   Contents   Index  
 
 
 
Revision 2.0, Copyright © 1999-2004 Jakob Christensen
http://www.JakobCHR.com
E-Mail: webmaster@JakobCHR.com
Top Quality
Developed with

Danish
Brain Power
Linux Powered!