next up previous contents
Next: Results for rectangular sections Up: Narrow cavities with bounded Previous: Completely enclosed flows   Contents


Numerical evaluation of the solution

Though the solutions (7.22), (7.25) and (7.28) are exact, the ratios of hyperbolic functions appearing in the terms of the infinite series impose a limit on the accuracy of a numerical evaluation. The absolute value of the ratio is bounded by unity but the magnitude of the numerator and a fortiori the denominator increase rapidly, so that their values will cause an overflow error if evaluated by a machine with finite floating point arithmetic.

The problem is compounded by the relatively slow convergence of the series. By applying basic inequalities to the terms and using the well-known relation between series and improper integrals (Ramanujan & Thomas 1970, p. 110), the truncation error for $v_n$ using the series (7.25),

\begin{displaymath}
E_K \equiv v_n-v_n^{\Vert}-\frac{1}{4\upi ^3}\sum_{k=1}^{K}
...
...\upi \mbox{$\mathcal S$}Z)}{\cosh(k\upi \mbox{$\mathcal S$})},
\end{displaymath} (7.32)

can be bounded by:
\begin{displaymath}
\frac{\vert E_K\vert}{\max \vert v_n^{\parallel}\vert} \leq \frac{27}{\sqrt{3}\upi ^3K^2}.
\end{displaymath} (7.33)

The analyses for equations (7.22) and (7.28) are entirely analogous, and so are omitted.

For example, the ANSI C library function double cosh(double x) is only guaranteed not to overflow for x$<85.8$ (Kernighan & Ritchie 1988, p. 258). For a duct with $\mbox{$\mathcal S$}=4$, this would limit the number of calculable terms of (7.25) to six, so that, by equation (7.33), the relative error may be as high as 1.4%.

This less than satisfactory situation can be remedied by replacing the ratio of hyperbolic cosines by its asymptotic expansion for large values of the argument in the denominator:

\begin{displaymath}
\frac{\cosh(2k\upi \mbox{$\mathcal S$}Z)}{\cosh(k\upi \mbox{...
...-1)]
\qquad\quad (k\upi \mbox{$\mathcal S$}\rightarrow\infty)
\end{displaymath} (7.34)

but this is not uniform in $Z$, failing for $Z=O([k\mbox{$\mathcal S$}]^{-1})$, a thin strip about the plane of spanwise symmetry. Thus, this expansion is not useful for automatic computation, but is of physical significance as will become apparent in §7.4.2.

To overcome the nonuniformity, the exact correction can be added. This gives the identity:

\begin{displaymath}
\frac{\cosh(2k\upi \mbox{$\mathcal S$}Z)}{\cosh(k\upi \mbox{...
...l{S}(\vert Z\vert-1)}]}
{1+\mathrm{e}^{-2k\upi \mathcal{S}}}.
\end{displaymath} (7.35)

Since the absolute value of $Z$ has been used (noting that the hyperbolic cosine ratio is even in $Z$), the only possible finite floating point arithmetic problem is underflow, which is unlikely to cause problems as the default behaviour of the ANSI C library function double exp(double x) is to return zero on underflow (Kernighan & Ritchie 1988, p. 250).


next up previous contents
Next: Results for rectangular sections Up: Narrow cavities with bounded Previous: Completely enclosed flows   Contents
Geordie McBain 2001-01-27