• No results found

Specified temperature boundary conditions

3.5 Computational Strategies in Mathematica

4.2.1 Specified temperature boundary conditions

Consider the 2–D square region illustrated in Fig.4.1. This could represent a cross section in a long square rod, for example. The sides and bottom surfaces of the rod are maintained at temperature T1, and the top surface is held at T2. It will be shown below that these particular boundary conditions are physically impossible, but for now the problem is posed simply in a mathematical sense. The objective is to determine the temperature distribution in the rod.

We begin by casting the problem in non–dimensional form. The characteristic temperature difference is obviously T2− T1, and let T1 be the characteristic temperature. This gives

T = T − T1

T2− T1

, x = x

L, y = y

L (4.1)

93

2T = 0

T1 T1

T1 T2

6 -y

x L

L

Figure 4.1: square region, specified surface T

The problem statement becomes

2T

∂x2 +∂2T

∂y2 = 0 (4.2)

T (x = 0, y) = 0 (4.3)

T (x = 1, y) = 0 (4.4)

T (x, y = 0) = 0 (4.5)

T (x, y = 1) = 1 (4.6)

Note that the choice of T1 as the characteristic temperature resulted in homogeneous BCs on all surface except the top surface. This is desired – the more homogeneous the problem, the easier it is to solve.

As was done before, the temperature T (x, y) is split into the product of two functions, each of which depends only on one variable:

T (x, y) = u(x) · v(y) (4.7)

Replacing the above into Eq. (4.2) gives

vu′′+ uv′′= 0 (4.8)

or, after separating the variables,

u′′

u = −v′′

v = ±λ2 (4.9)

The quantity λ2is the separation constant, which will ultimately be put in the form of an eigenvalue.

Again, the rationale for introducing the constant λ2 is that the separated equation has a function of x on one side, and a function of y on the other side. Both sides must therefore be constant.

Equation (4.9) leads to the two ODEs for the u and v variables:

u′′∓ λ2u = 0 v′′± λ2v = 0

By choosing +λ2 as the separation constant, and restricting the situation to non–zero λ, the following solutions are obtained for u and v;

u = A cosh(λx) + B sinh(λx) (4.10)

v = C cos(λy) + D sin(λy) (4.11)

and for −λ2 just the opposite is obained:

u = A cos(λx) + B sin(λx) (4.12)

v = C cosh(λy) + D sinh(λy) (4.13)

Finally, for λ2 = 0 the solutions are

u = A + Bx (4.14)

v = C + Dy (4.15)

Only one set of solutions will lead to a physically correct solution, yet it is not obvious which set should be chosen. When dealing with transient problems we could use physical reasoning to decide the sign of the separation constant. This is not the case with the steady–state problem; there is no intuitive information which would appear to rule out the functional dependencies obtained from +λ2 or −λ2 – although the case of λ = 0 appears suspicious simply because it is too simple.

Mathematical, rather than physical, reasoning must therefore be utilized to decide on the proper sign. Specifically, the sign of λ2 is chosen so that a Sturm–Liouville form of an ODE is obtained in the direction with the homogeneous boundary conditions. Recall that the Sturm–Liouville ODE has solutions in terms of eigenfunctions (or orthogonal functions) such as sin, cos, and the ordinary Bessel functions. The hyperbolic functions and modified Bessel functions, on the other hand, will not be orthogonal functions. For the problem at hand the x direction has the homogeneous boundary conditions. Therefore, we want the x–direction function ODE (which is the one for u) to be in the Sturm–Liouville form – which is the one that has Eq. (4.12) as a solution.

The solutions for λ2 = 0 can always be considered a special case for a positive or negative separation constant. Again, such cases were usually inconsistent with transient behavior in time–

dependent problems. In steady–state problems, however, more attention will have to be given to the λ2= 0 case. Specifically, if it is determined that the eigenvalue λncan have a value of zero, then the unique solution for λ2= 0 will have to be included into the analysis. This situation will be discussed further when it is encountered. To briefly summarize, we want to obtain the eigenfunctions (and eigencondition) in the direction with homogeneous boundary conditions – which is the x direction for the problem at hand.

The BCs in the x direction can now be used to eliminate one of the constants A or B and determine the eigencondition. At x = 0 the condition is

T (0, y) = u(0)· v(y) = 0

which gives

u(0) = 0 = A −→ A = 0 At x = 1 the BC gives

T (1, y) = u(1) · v(y) = 0 which leads to

u(1) = 0 = B sin(λ) This provides the eigencondition for the problem:

λ = nπ, n = 0, 1, 2, . . . (4.16)

The correspondition eigenfunctions are:

φn(x) = sin(λnx) = sin(nπx) (4.17)

The unique case of a zero eigenvalue, i.e., λ0 = 0, does occur for this eigencondition. We therefore need to consider this case separately. When λ = 0 the solution for u is, again,

u = A + Bx

The zero-temperature condition at x = 0 eliminates A, and the zero temperature condition at x = 1 eliminates B. The corresponding solution for λ0 is zero, and we need not consider the λ0 case further. Another way of arriving at this conclusion is to note that the eigenfunction for λ0 is itself zero. This procedure may have seemed trivial – but it is important to go through it.

Situations will occur in which the λ = 0 condition plays a role in the solution.

The general solution to the problem will be in the form of a series expansion of the v function times the corresponding eigenfunctions. In other words,

T = X n=1

(Ancosh(λny) + Bnsinh(λny)) φn(x) (4.18)

This equation is the most general form of the solution for 2–D steady conduction in cartesian coordinates when the homogeneous direction is x. Had the homogeneous direction been y, the roles of x and y would simply be switched.

The final step is to determine formulas for the expansion coefficients An and Bn, which is done by using the BCs in the y direction and the orthogonality properties of the eigenfunctions. At y = 0 the condition is

0 = X n=1

(An+ 0) φn(x)

x y

Figure 4.2: isotherms for Eq. (4.21)

which is satisfied by An= 0 for all n. The inhomogeneous boundary condition at y = 1 has 1 =

X n=1

Bnφn(x) sinh(λn) (4.19)

The eigenfunctions are orthogonal over the interval (0,1) with a weighting function of unity. Each side is therefore multiplied by φm(x) and integrated over x from 0 to 1. All terms in the series disappear except the one for n = m. The result is

Bn= Z 1

0

sin(nπx) dx·



sinh(nπ) Z 1

0

sin2(nπx) dx

−1

= 2[1 − (−1)n] nπ sinh(nπ)

This gives zero Bn for even n. Therefore, the index n can be replaced with 2n − 1, and

Bn= 4

(2n − 1)π sinh[(2n − 1)π], n = 1, 2, . . . (4.20) The final solution for the temperature field is

T = 4 π

X n=1

sin[(2n − 1)πx] sinh[(2n − 1)πy]

(2n − 1) sinh[(2n − 1)π] (4.21)

Shown in Fig. 4.2is a contour plot of the dimensionless temperature in the square region. The lines in the plot correspond to isotherms. The temperature field shows the expected symmetry about x = 1/2. It could have been recognized, at the onset, that the problem had a plane of

symmetry, and this information could have been exploited in the solution. The equivalent domain would have been a rectangular rod, of height equal to twice the width, with an adiabatic condition at x = 0.

Observe also the large temperature gradient at the top left and right corners. This results from the discontinuous jump in surface temperature from the side to the top – which is a physical impossibility. The consequence of this behavior becomes evident when we calculate the net heat transfer at the top surface. The heat flux at the top is given by

qy′′(x) = k(T1− T2)

and the total heat transfer (per unit length of rod) through the top surface will be q =

This series does not converge – i.e, it has a value of infinity. This is because tanh[(2n − 1)π] → 1 for n ≫ 1, which leaves for large n the simple series of P 1/(2n − 1) – which will not converge to a constant. Therefore, the net heat transfer rate through the upper face would be infinite.

The impossibility in the problem arises from the chosen boundary conditions. It would take an infinite amount of heat transfer to maintain the top and side surfaces at the precisely uniform values of T2 and T1, respectively. In reality, the heat transfer through the rod would be finite, and the temperature at the upper corners would vary continuously from T1 to T2.