CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   2nd order TVD scheme (

Wenjun March 13, 2013 09:03

2nd order TVD scheme
3 Attachment(s)
Hi, I am learning the second order TVD scheme which is listed in the attachment, and I want to verify the order of the scheme by the linear advection equation u_t+u_x=0, periodic BC, initial condition u0=sin(pi*x), x in [0, 2]. But the order I got is about 1.3, and the wave shape becomes flat at valley and peak. Why is the order less than 2 ? My code is in the attachment too. Thank you very much for your kind reply.Attachment 19828

Attachment 19829

Attachment 19830

cfdnewbie March 13, 2013 17:01

looks like your TVD limiter works as expected and cuts off your peaks when a grid point coincides with the maxima/minina.
Your initial projection looks ok, you should approach second order when refining the mesh. Order of convergence is a concept of h to zero, from your plot it looks like h is 2/6....

Wenjun March 13, 2013 21:45

Thank you for your consideration. But even if I choose the step h=2/6,2/12..., the order is almost the same as before. I don't know why. I have already checked my code for several times.

Wenjun March 13, 2013 21:55

I use the L1 error for order calculation, it confirms the second order accuracy. However, L_\infty does not work. Normally the two different measure both can confirm the order. Do you have some idea about this problem?

cfdnewbie March 14, 2013 03:06

The L infty will always be dominated by the limiter at the maxima, so since you are doing a first order approximation at the maxima (see your plot, the maxima are approximated by constants, not linears), the L infty will not give you second order. The L1 and L2 will converge to second order, since the influence of the "bad region" will decrease with increasing h!

k_tafazoli March 14, 2013 03:24

Hi, I've got a fortran code for solving flow over an airfoil with the method of first order van leer flux vector splitting . I have to change it to second order . Do you know how I can do that ? can you help me with it ?

Wenjun March 14, 2013 03:25

Yes, I understand now. I tried L1, it works. Thank you very much. It is my pleasure to meet you in the forum.

Wenjun March 14, 2013 03:51

Sorry, I only code by Matlab. I am a fresh guy in CFD and my problem is rather simple.

k_tafazoli March 14, 2013 13:31

Thanks anyway

All times are GMT -4. The time now is 01:23.