2D temperature distribution

6
In order to explore a 2D temperature distribution, let us assume an analytic function, T = a + bx + cx 2 + by + xy 2 (1) and assume that a = 900K, b = 300K/m, and c = 50K/m 2 . We shall evaluate our temperature over a 2D slab which is 1m by 1m with the bottom left corner at the origin of a Cartesian coordinate system, as shown in figure 1. The grid is shown as lines with circular symbols used to denote the intersection of grid lines, where the temperature is actually evaluated. 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Y [m] X [m] Figure 1: Computational grid used to explore 2D temperature fields. We are going to use the temperature field to calculate heat rates throughout the slab, and therefor will have to calculate temperature gradients. These gra- dients will be determined by numerically differentiating that we evaluate on our grid. As discussed previously in the 1D example, the gradients that we evaluate in this way represent an average of the gradient between the two grid locations – where we choose to locate those gradients is somewheat arbitrary. We shall assume that they are located at the cell centres, which are denoted on figure 2 by x’s. Now we can evaluate our 2 dimensional temperature field, and plot it several ways. Figure 3 depicts colour shaded temperature contours over the slab, and clearly shows that the highest temperature is at the origin while the minimum temperature is at the opposite corner (x=1,y=1). 1

Transcript of 2D temperature distribution

Page 1: 2D temperature distribution

In order to explore a 2D temperature distribution, let us assume an analyticfunction,

T = a + bx + cx2 + by + xy2 (1)

and assume that a = 900K, b = −300K/m, and c = −50K/m2.We shall evaluate our temperature over a 2D slab which is 1m by 1m with

the bottom left corner at the origin of a Cartesian coordinate system, as shownin figure 1. The grid is shown as lines with circular symbols used to denote theintersection of grid lines, where the temperature is actually evaluated.

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

Y [m

]

X [m]

Figure 1: Computational grid used to explore 2D temperature fields.

We are going to use the temperature field to calculate heat rates throughoutthe slab, and therefor will have to calculate temperature gradients. These gra-dients will be determined by numerically differentiating that we evaluate on ourgrid. As discussed previously in the 1D example, the gradients that we evaluatein this way represent an average of the gradient between the two grid locations– where we choose to locate those gradients is somewheat arbitrary. We shallassume that they are located at the cell centres, which are denoted on figure 2by x’s.

Now we can evaluate our 2 dimensional temperature field, and plot it severalways. Figure 3 depicts colour shaded temperature contours over the slab, andclearly shows that the highest temperature is at the origin while the minimumtemperature is at the opposite corner (x=1,y=1).

1

Page 2: 2D temperature distribution

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

Y [m

]

X [m]

Grid PointsCell Centres

Figure 2: Computational grid showing the cell centre locations (indicated by anx).

200

300

400

500

600

700

800

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

X [m]

Y [m

]

Contours of T=a + bx +cx2 + by + y2

Figure 3: Colour shaded temperature contours over the slab.

2

Page 3: 2D temperature distribution

200

300

400

500

600

700

800

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

X [m]

Y [m

]

Contours of T=a + bx +cx2 + by + y2

Figure 4: Colour shaded temperature contours over the slab. The temperaturegradient is visualized as vectors superimposed on the temperature distribution

Knowing the temperature field, we can now calculate the heat fluxes, or heatrates at any point in our slab using Fourier’s law.

�q = −kA∇T (2)

where ∇T is the temperature gradient defined in Cartesian coordinates by

∇T =∂T

∂xi +

∂T

∂yj (3)

Note that while Temperature is a scalar, the temperature gradient is a vectorquantity, which can be decomposed into components in each of the coordinatedirections. We can easily calculate the two components of the temperaturegradient over our slab, and represent them as a vector, with a length equal tothe magnitude of the gradient. This is shown graphically on figure 4 where eacharrow represents the gradient at tail of the arrow.

Note that the temperature gradient is everywhere perpendicular to the tem-perature contour lines. This should be fairly obvious, since a contour line is aline of constant temperature while the temperature gradient represents spatialdifferences in temperature. By definition, there is no change in temperaturealong a contour line. The gradient is directed in the direction of maximum tem-perature increase, which has to be in the direction that minimizes the distance

3

Page 4: 2D temperature distribution

650

700

750

−0.5 0 0.5 1 1.50

0.2

0.4

0.6

0.8

1

X [m]

Y [m

]

−kA ∂T/∂x [W]

650

700

750

−0.5 0 0.5 1 1.50

0.2

0.4

0.6

0.8

1

X [m]

Y [m

]

−kA ∂T/∂y [W]

Figure 5: Colour shaded contours of heat rate through the slab. The upperfigure depicts the i compenent of the heat rate vector, while the lower figuredepicts the j component.

to the contour line representing the next highest temperature. Any directionthat is not perpendicular to the contour lines will result in a greater distancethan one that is, and hence the gradient is always perpendicular to the contourlines.

We can also create a contour plot of each component of the temperaturegradient, or using Fourier’s law, equation 2, each component of the heat ratevector which acts the opposite direction to the temperature gradient as shownin figure 5.

Figure 5 represents the heat rate in [W ] at each location through the plate.The total heat rate can be determined by adding up the individual contributionsat each point. Note that it is common to plot the heat flux [W/m2] instead ofthe heat rate, and then the total heat rate through a given surface would bethe integral over that area. In either case, we can see from the figure that thereis clearly more energy leaving the plate at the x=1 surface and y=1 surfacethan there is entering the plate at the x=0 and y=0 surfaces. This is showneven more clearly in figure 6, where theheat rate is plotted at each of the fourexternal boundaries of our slab. Since we know that energy must be conserved,we know that there must be energy generation occuring within the plate. Usingconservation of energy we can easily calculate the amount of generation.

Let’s consider each of the four faces separately, and evaluate the heat rate.

4

Page 5: 2D temperature distribution

0 0.5 1793

794

795

796

0 0.5 1604

604.5

605

605.5

606

604 605 6060

0.5

1

793 794 795 7960

0.5

1

Figure 6: Heat rate evaluated over each of the four boundary surfaces.

First, the x=0 face. To evaluate the energy passing through a surface, we mustconsider both the surface normal and the temperature gradient vector.

q(y)|x=0 = −kA∇T · �n (4)

which will give us the heat rate normal to the surface, or the amount of energythat actually passes into our slab through the x=0 face. Since our slab is square,and the boundaries are normal to the coordinate directions, this is quite simply

q(y)|x=0 = −kdy(1)dt

dx

∣∣∣∣x=0

(5)

where we have assumed unit depth into the page.When we add up all the individual contributions along the entire x=0 face,

we find that 12,100 W enter the domain through this surface.Similarly, at the x=1 face,

q(y)|x=1 = −kdy(1)dt

dx

∣∣∣∣x=1

(6)

and there is 14,000 W leaving the domain. Considering now the y=0 face,

q(x)|y=0 = −k(1)dxdt

dy

∣∣∣∣y=0

(7)

5

Page 6: 2D temperature distribution

we find again 12,100 W entering the domain. This is to be expected since we haveused exactly the same temperature distribution in the x and y directions. Notsuprisingly then, the total heat rate through the y=1 face, found by summingthe individual contributions

q(x)|y=1 = −k(1)dxdt

dy

∣∣∣∣y=1

(8)

is 14,000 W.We are now in a position to determine energy generation in the slab using

conservation of energy, assuming a steady state, or no energy storage.

˙Ein − ˙Eout + Eg = 0 (9)

Eg = ˙Eout − ˙Ein (10)

Eg = (Qx=1 + Qy=1) − (Qx=0 + Qy=0) (11)

Eg = (14, 000 + 14, 000)− (12, 100 + 12, 100) (12)

Eg = 3, 800[W ] (13)

6