# Unsteady diffusion equation with spatial finite elements and Forward Euler in time

I have solved the unsteady diffusion equation using piece-wise linear Finite elements(triangles) for spatial discretisation and Forward Euler for temporal discretisation. I have the following mesh convergence results. I'm not sure how to interpret them. The error was calculated using an analytical solution at time = 2 seconds. Time step, dt of 0.04 was used. How do I verify the order of convergence, does the slope have to be 2 for second order accuracy in space?

Do we have anything like Courant number ($$\frac{\Delta t}{\Delta h^2}\leq1/2$$) to restrict the time step?

• This needs a lot more detail. How are you calculating the error? Are you actually 2nd order spatially? If you're only first order in time and your calculating the error, you will see temporal errors. What is this plot showing specifically? Also, you want to plot the y axis on a log scale typically for error plots.
– EMP
Feb 12 '20 at 22:22
• I have used piece-wise linear triangle elements for spatial discretisation. Th error was calculated using an analytical solution in L2 Norm. The plot is L2 Norm error vs Mesh size. Feb 12 '20 at 22:31
• How do you calculate mesh size? Size of the domain divided by number of tris? or are the tris uniform in size and you use that?
– EMP
Feb 12 '20 at 22:41
• The Mesh was generated using GMSH with a base size of 1, 0.1 and 0.01. Would it be better if i plot the Error vs No. of elements? Feb 12 '20 at 22:45
• Your plot looks OK to me. You need to plot in log-log mode to see a line I think. Also, that's fine to use whatever mesh size you got from GMSH as long as you use it consistently. Feb 13 '20 at 1:18