- #1
rconnor
- 2
- 0
Homework Statement
I am working on a Matlab code that will solve a temperature grid for a 2D transient heat transfer problem. The code seemed to be working well but when I changed the timestep (to find timestep independance) I noticed that the larger the timestep, over the same duration, the cooler the temperature field was. Now, a larger timestep should mean that each iteration has a greater change in heat transfer but with less iterations, which should provide, more a less, a similar temperature field (although relatively less accurate than the shorter time step). But I get a much much cooler temperature distribution.
Homework Equations
I am using the implicit finite difference method where I assume the heat flow is into the control volume from the surrounding nodes. The temperature from the node above the node being calculated is called Tn (or Tnorth) the temperature from the node to the right is Te (or Tsouth) etc...The equation (for interior nodes) is:
Tp(new)= Fo*Tn(new) + Fo*Ts(new) + Fo*Te(new) + Fo*Tw(new) + Tp(old) / (1+4Fo)
Where Fo is the Fourier number.
In the formula above, it maybe hard to tell that the time step does not seem to affect the temperature difference but the equation is a rearrangment of an eariler form of the energy equation:
Tp(new)-Tp(old)*rho*Cp*V/dt = k*dy*dz*(Tw-Tp)/dx + k*dy*dz*(Te-Tp)/dx + k*dx*dz*(Tn-Tp)/dy + k*dx*dz*(Ts-Tp)/dy
Here the only place that the timestep (dt) comes up is in the denominator of the Tp(new)-Tp(old) term. I understand way it is there but when I think about it from the perspective of the code, it doesn't seem to effect the value of Tp(new)-Tp(old). Since the k*dy*dz*dT terms are not effected by the timestep, I think this is were the code is falling apart. But thermodynamically I can't see anything wrong with the formula and I know its right because I have used it in school before a lot.
The Attempt at a Solution
What I believe is happening is that nothing in the formula (showen below) dictates that a greater timestep should have a greater temperature difference (due to the increased time which energy has to flow into the node) and thus the temperature distribution is based on the number of iterations in the duration. Since a greater timestep will have less iterations for the same duration, the temperature field is colder.
Is there some reason why this formula cannot be used for the computational analysis or something else I'm missing? I've been going it over and over and over but I can't find anything wrong. I know there is nothing wrong with the logic of the code, it has to do with the timesteps in some way. I believe that the issue is somewhere in the energy balance equation because I can't see where in the formula the length of the timestep effects the temperature difference from the old time to the new time.
If anyone has any insight into this, it would be greatly appreciated! Thank you very much in advance!