Numerical method on heat diffusion problem

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
loukoumas
Messages
14
Reaction score
0
Hello there!

I am solving a heat diffusion problem which is described by the differential equation: θΤ/θt=a*(θ^2Τ/ΘΤ^2). I will apply two diffrent temperatures on the ends of a metal rod. Solving the equation i conclude, according to the boundary conditions of course, at the function:
Τ(x,t)=sum i=1-infinity [e^-i^2 * Pi^2 *a*t*(160*(-1)^i /(i*Pi) + 40/(i*Pi))*sin(i*Pi*x)] +100 x.( I gues its not very readable!sorry)

i also use a numerical method, crank-nicolson. It uses the previous(T') accordinng to time temperatures and previous(Ti-1) and next(Ti+1) temperatures according to length
Ti=A*T'(i) + B[T(i-1) +T(i+1)+T'(i-1)+T'(i+1)] A,B are known and also temperatures on the ends are known( 0,100 degrees respectively) so if i cut the rod on n+1 i get nXn system to solve! So far so good. Where is my question?
Comparing the temperatures that i get from both methods are satisfactorily close,but only after 60-70 seconds. On the first tens of seconds, on the points next to the ends of the rod(10cm and 90 cm if the hole rod is 1m), i have 3-5 degrees difference between these two methods.Wich results are the most relyable? why do i find these differences?
thank you very much!
 
Physics news on Phys.org
loukoumas said:
On the first tens of seconds, on the points next to the ends of the rod(10cm and 90 cm if the hole rod is 1m), i have 3-5 degrees difference between these two methods.

So you are only using 10 (or 9 or 11) points along length of the rod?

Try using more points (for example twice as many) and see what happens to the results. If temperature against time at each mesh point is oscillating up and down at each time step, you need to reduce the time step as well.

In the first part of the solution, you probably have a rapid change of temperature along the length of the rod near to the ends, and you don't have enough points in the finite difference mesh to represent that accurately.

Assuming you did the math right, your series solution should be exact, so long as you include enough terms to ensure it has converged to the accuracy you want.