Problem Statement: The following equation, which governs heat conduction through a pipe wall, describes how temperature (T) changes with radius (r).
dT d2T
-- + r (---) = 0 Boundary Condition: T(rin)=Tin, T(rout)=Tout
dr dr2
where rin = inner radius
rout = outer radius
Tin = temperature at the inner radius
Tout = temperature at the outer radius
Approximate the solution with a linear
combination of the following five vectors in x=[0, 1]
T(x)=a1*g1+a2*g2+a3*g3+a4*g4+a5*g5
=Si=15 ai*gi
Solution:
The following Mathcad worksheets has Tout=0.1.
Of course, we can simply change Tout to 0.2 (or
whatever value we desire) in the Mathcad worksheet, and Mathcad will
automatically update the solution. Notice how the approximation
with (1, x, cos, sin, exp) gets worse as we change
Tout from 0.1 to 0.2. (Why?) What do we need to do to
keep the approximate solution "good" over a wide range of
parameters and boundary conditions?
Answer: After we find a solution, it is a good practice to make
sure the solution remains valid for other parameters. Otherwise,
there is a danger of blindly trusting the answer. (Remember the
numerical integration problem from the first homework assignment,
where most mathematical packages or calculators gave good answer
for one case but fails miserably for another.) We build
confidence in our solution by trying other parameters. In this
problem, when Tout is large, the temperature with in
the pipe wall drops more quickly within x=[-1 1]. The set of
functions (1, x, sin, cos, exp) alone cannot describe this sudden
drop. Specifically, sine and cosine hardly contribute to the
solution because the solution has no oscillatory components; so
these two basis functios are wasted. exp(-x), which has just one
decay constant, is very rigid. If the inherent decay constant in
the solution is not unity, exp(-x) cannot capture it. On the
other hand, every Legendre polynomial contributes to the
solution; thus, there is no waste and soluton stays close to the
true solution (up to a point). We can always add more terms to
obtain an even better approximation. Of course, in the limit of
infinite number of Legendre polynomials, we get a perfect fit.
However, that is purely math-speak; in practice, we cannot afford
infinity. Engineers seek a good solution -- acceptable but not
perfect -- with a small number of terms.
If we do not transform the original range T=[Tin
Tout] into x=[-1 1], Legendre polynomials are not
orthogonal in T=[Tin Tout]. There is no
difference in the final solution whether we approximate with
orthogonal basis functions or non-orthogonal basis functions.
When we let the computer find the coefficients in a brute-force
manner, we easily miss the advantage of orthogonal basis
functions which make many scalar products (i.e., integrals in
this problem) vanish, and we minimize the amount (and in some
cases the accuracy) of computation.
|