Surface temperature of a tile

1. Apr 6, 2015

mattyboson12

Hi, I have written a matlab program to calculate the surface temperature on a tile and I am trying to find the most stable/accurate differenceing technique. I have plotted the surface temperature (where its actual value is ~122.5) against the time step for the differencing techniques shown below. All of them are accurate for small time steps, and then Backwards/DuFort decrease/increase parabolically, is this due to second order accuracy? And why is crank unstable for large timesteps and fowards isn't?

2. Apr 6, 2015

Staff: Mentor

Let's see the PDEs you're solving.

Chet

3. Apr 6, 2015

mattyboson12

Hi Chet

The program calculates the temperature using fourier's equation in one dimension: dU/dt=α*(d^2 U/d^2 x) . I'm guessing crank is the best method as it seems to have the best compromise between stability/accuracy compared to the others. I am just confused as to why the differencing methods form very distinct graphs ie. why the crank oscillates around the actual value whereas dufort flies off to infinity

kind regards
Matt

4. Apr 6, 2015

Staff: Mentor

Based on my experience, you should't be encountering these difficulties solving the 1D transient heat conduction equation using most of these methods. Backward differencing, in particular, should not give rise to the zigs and zags that you are seeing. Are you sure you are implementing these methods correctly? How are you solving for the temperatures at n+1 using your Backward Euler scheme? Are you solving a tri-diagonal matrix?

Chet

5. Apr 7, 2015

mattyboson12

I've double checked my code and all the methods seem to be okay. Yep, i have used the tri-diagonal matirx and then the built in function tdm() to solve the matrix

Matt

6. Apr 7, 2015

Staff: Mentor

Here's something you can check. The Backward Euler method should return the steady state solution after one time step if the time step is made extremely large. Does it? That's an indication of how stable the Backward Euler method is.

Chet