Heat TransferAssigning direction to the temperature gradient

This thread is regarding the Finite difference scheme for a 1-dimensional Heat transfer problem with non-uniform cross-sectional area. As seen in https://www.physicsforums.com/showthread.php?t=397891", when the element has constant cross-sectional area, things cancel nicely. But when this is not the case, some parts get tricky and I hope to have these areas (no pun intended ) addressed.

Shown below is a (super-awesome MS word) drawing of an object subjected to a fixed temperature at point 1 and convection at point 3. Now the dotted lines are simply a construct that we used in class to help deal with the area problem; I will explain how we used it shortly but for now just note that it is there and that I will commonly refer to it as the "pseudo-element" (PE2) that bounds point 2 (pseudo because this is not really an element since this os not FEA it is finite difference).

Now I would like to derive the equations necessary for a finite difference scheme for this problem. Since the conditions at point 1 (p1) are known, I will move to p2 and p3 and write the corresponding energy balance for each point (pseudo-element).

Point 2:

Point 2 is lies at the center of dotted lines that bound the PE. Point 2 also lies at [itex]\Delta x = 0.5 m[/itex] with respect to the entire structure. The cross-sectional areas along the dotted lines a and b are given by Aa and Ab.

Writing the energy balance
There is a conduction term due to the heat flux qa exiting (an assumption) at Aa and a conduction term due to the heat flux qb entering (an assumption) at Ab. There is also an energy storage term [itex]\Delta U = \rho*V_{element}\,dT[/itex].

The sign-convention dictates that heat flux into the element and out of the element are negative.

Here is where I get confused:

The conduction heat flux at Aa is due to the temperature gradient between p1 and p2. My professor wrote that the conduction term at a is given by

[tex]-KA_a\frac{(T_2 - T_1)}{\Delta x}\qquad (1)[/tex]

and the conduction at b:

[tex]KA_b\frac{(T_3 - T_2)}{\Delta x}\qquad (2)[/tex]

I am just not sure how we define the temperature gradient? That is why in the first term is it T2 - T1 instead of T1 - T2 ?

Maybe a silly question, but it seems like if I assumed that the flux at 'a' was entering and at 'b' was exiting then some sort of switch would need to be made.

I guess maybe this was a silly question. I guess the gradient is just the gradient no matter what direction you assume that the flux is in. Since the positive x-direction is defined as going to the right, then since we would define the gradient of T in finite terms to be

But there is still something bothering me before I move on; by Fourier's law of conduction, the heat flux is:

[tex]q_x = -K\frac{dT}{dx} \qquad(3)[/tex]

and as my text notes:

The minus sign in (3) implies that, by convention, heat flow is positive in the direction opposite of the temperature increase.

So in this particular problem, we do not know the direction of the flux nor the positive temperature gradient; so we made an assumption that the flux was leaving a.

Now I am trying to use this information along with (3) to determine what the correct sign on (1) should be? It has a negative sign due to the 'exiting' flux, but shouldn't there also be a negative sign from Fourier's law?

Or should I simply say instead that the magnitude of the flux is given by [itex]K\frac{dT}{dx}[/itex] and the sign is given by the assumed flux direction? I fell like the latter makes more sense, but I cannot seem to rationalize it.

Now I am trying to use this information along with (3) to determine what the correct sign on (1) should be? It has a negative sign due to the 'exiting' flux, but shouldn't there also be a negative sign from Fourier's law?

This is true, but it also has a negative sign because your arrow is pointing in the opposite direction of the x-direction. So the product of the three negatives is a negative.

Here's how I do it: don't assume positive or negative flux. Just note that a heat flux arrow [itex]q[/itex] pointing toward an element adds energy at a rate [itex]q[/itex] into the element. [itex]q[/itex] can be positive or negative, but by definition it's [itex]-kA(dT/dx)\approx -kA\Delta T/\Delta x[/itex] Then [itex]\Delta T/\Delta x[/itex] can be written as [itex](T_1-T_2)/(x_1-x_2)[/itex] or [itex](T_2-T_1)/(x_2-x_1)[/itex]. So all you have to remember is

Here's how I do it: don't assume positive or negative flux. Just note that a heat flux arrow [itex]q[/itex] pointing toward an element adds energy at a rate [itex]q[/itex] into the element. [itex]q[/itex] can be positive or negative, but by definition it's [itex]-kA(dT/dx)\approx -kA\Delta T/\Delta x[/itex] Then [itex]\Delta T/\Delta x[/itex] can be written as [itex](T_1-T_2)/(x_1-x_2)[/itex] or [itex](T_2-T_1)/(x_2-x_1)[/itex]. So all you have to remember is

Excellent! I also just ran into my professor who gave me another method:

1. Assume that x-axis to the right is positive (i.e. number nodes increasing from left to right).
2. Assume that temperature increases along the positive x-axis
3. Assume that all heat fluxes point to the left (no matter what initial conditions are given)
4. This schema will ensure that all fluxes out are negative and all heat fluxes in are positive

I will look at both of these methods and see which I like better! I think for now, my professor's is "easier" (involves little thinking) but yours actually encapsulates the physics better.