# upwind finite volume order of accuracy less than one ??

 Register Blogs Members List Search Today's Posts Mark Forums Read May 28, 2015, 14:49 upwind finite volume order of accuracy less than one ?? #1 New Member   youheng Join Date: May 2015 Location: sc Posts: 3 Rep Power: 10 Hi, I am working to check the order of accuracy of upwind finite volume method for 1D Burgers' equation: partial (u) / partial (t) + partial (0.5 u^2) / partial (x) = 0. I look at the post at : http://www.cfd-online.com/Forums/mai...-accuracy.html , and follow the steps but finding the order of accuracy is less than one. For time stepping, I used Euler forward, with 1000 element for domain [-1, 1], initial condition u = 1 for x < 0, u = 0.5 for x >0. If I used Courant # =1.0, dt = 1.0e(-3), it gave L2 Norm of error 5.4046e(-3); with Courant #=0.5, dt = 5e(-4), it gave L2 Norm of error 7.53269e(-3). So small time step will give less accuracy? and the order is log( 5.4046/7.53269) / log(2) =(-0.479), should it be 1? I also found that it is most accurate with Courant = 1.0, and become less accurate when Courant # become less than 1. For space accuracy, the post above suggest using different mesh size while keep constant dt/h, that is constant Courant. I wonder why, should it keep constant dt? If keep consant dt/dx, 100 elements give L2 norm of error = 2.37773e(-2), 200 elements give L2 norm of error 1.68432e(-2), order = log(2.37773/1.6843)/log(2) = 0.4974, less than one? If keep constant dt = 0.0025, 100 elements give L2 norm of error = 2.8048e(-2), 200 elements give L2 norm of error 1.68432e(-2), order = log(2.8048/1.6843)/log(2) = 0.7357, still less than one? So my question is that should upwind finite volume method be first order accurate in space, Euler forward first order accurate in time? Is there any difference is order of accuracy and rate of convergence ? Thanks.   May 28, 2015, 16:02 #2 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,595 Rep Power: 70   your question is not very clear to me.... 1) what about the exact solution you are using to compute the errors? 2) what about the discretization you are using? 3) have you first performed the analysis on a linear equation?   May 29, 2015, 14:19 #3 Senior Member   Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 2,120 Blog Entries: 29 Rep Power: 38  I might be wrong (so please double check me) but i think that you cannot evaluate an order of accuracy correctly if your reference exact solution is discontinuous   May 29, 2015, 16:43 #4
New Member

youheng
Join Date: May 2015
Location: sc
Posts: 3
Rep Power: 10 Quote:
 Originally Posted by sbaffini I might be wrong (so please double check me) but i think that you cannot evaluate an order of accuracy correctly if your reference exact solution is discontinuous
Quote:
 Originally Posted by FMDenaro your question is not very clear to me.... 1) what about the exact solution you are using to compute the errors? 2) what about the discretization you are using? 3) have you first performed the analysis on a linear equation?
Thanks for reply from FMDenaro and sbaffini.

1) As I used initial condition u = 1 for x < 0, u = 0.5 for x >0, the exact solution is u = 1 for x < time * (1 + 0.5)/2, u = 0.5 for x >time * (1 + 0.5)/2.

2) I used cell-centered finite volume method.

3) I tried solving the linear convection problem:
partial (C) / partial (t) + partial (u C) / partial (x) = 0, where u = const.
As suggested by sbaffini, I didn't use discontinuous initial condition this time, instead I used sine wave.

My finding are follows:
For linear convection with smooth initial condition, the rate of spatial convergence is close to theoretical value 1.0 when Courant number equals unity. The numerical solution is most accurate when Courant # = 1.0, the smaller Courant #, the less accuracy is the solution.

For nonlinear Burgers' equation, I still can not get rate of spatial convergence of 1.0. Looks like sbaffini is right.   May 29, 2015, 17:03 #5 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,595 Rep Power: 70   1) linear equation with first-order upwind is solved exactly at c=1, did you checked that? could you post the convergence curve at c=0.5? 2) Burgers equations with piecewice initial data defines the so-called Riemann problem, you cannot check the accuracy order this way. Have a look to the LeVeque book on FV for hyperbolic equations, you will find this issue explained quite well. Furthermore, you cannot you the differential form for non regular solutions   May 29, 2015, 17:05 #6 Senior Member   Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 2,120 Blog Entries: 29 Rep Power: 38  On a uniform grid, a courant equal to 1 should give you the exact solution for an explicit euler-1st order upwind scheme, at least in the linear case. Maybe there is some problem in your scheme. Can you post it here?   May 31, 2015, 21:51 #7
New Member

youheng
Join Date: May 2015
Location: sc
Posts: 3
Rep Power: 10 Quote:
 Originally Posted by FMDenaro 1) linear equation with first-order upwind is solved exactly at c=1, did you checked that? could you post the convergence curve at c=0.5? 2) Burgers equations with piecewice initial data defines the so-called Riemann problem, you cannot check the accuracy order this way. Have a look to the LeVeque book on FV for hyperbolic equations, you will find this issue explained quite well. Furthermore, you cannot you the differential form for non regular solutions
Quote:
 Originally Posted by sbaffini On a uniform grid, a courant equal to 1 should give you the exact solution for an explicit euler-1st order upwind scheme, at least in the linear case. Maybe there is some problem in your scheme. Can you post it here?
Thanks again for both of your reply. I looked at the book of LeVeque and figured out what is wrong in the analyis of linear wave convection accuracy. In my scheme, for a cell (x_{i-1/2}, x_{i+1/2}), I calculated the cell-centered value at x_i, while the exact solution are calculated at x_{i-1/2} and x_{i+1/2}. When I corrected this mistake, Cr = 1.0 give same solution of exact solution while give L2 Norm of the order e^{-15}.

1) For Cr = 0.5, the error and order of accuracy are given below,
N = 100, L2 = 1.02472e-1,
N = 200, L2 = 6.56238e-2, 0.6429,
N = 400, L2 = 3.95699e-2, 0.7298,
N = 800, L2 = 2.31858e-2, 0.7712,
N = 1600, L2 = 1.34426e-2, 0.7864,
N = 3200, L2 = 7.78293e-3, 0.7884.
It's 0.6429-0.7884, still less than 1.0 though increasing with dx decreasing. Is it correct?

2) For discontinuous solution, on Page 156 of LeVeque, it says: "This indicates the 1-norm of the error decays only like (dx)^{1/2} even though the method is formally first-order accurate based on the local truncation error, which is valid only for smooth solutions". Does this mean the order of accuracy analysis is valid only for smooth solutions.
Also, on Page 150 Section 8.5 Order of Accuracy isn't Everything, it says "higher-order terms may in fact be larger than the dominant term". Does it mean we should choose numerical method with smaller error even it's lower order?

Thanks again.   June 1, 2015, 04:02 #8 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,595 Rep Power: 70   the order of accuracy can be estimated only on smooth solutions  Tags order of accuracy, rate of convergence, upwind finite volume Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules Similar Threads Thread Thread Starter Forum Replies Last Post harsha_kulkarni OpenFOAM Running, Solving & CFD 3 February 18, 2016 05:06 Phil_ OpenFOAM Running, Solving & CFD 0 November 19, 2014 07:52 openfoammaofnepo Main CFD Forum 1 March 24, 2014 02:13 quarkz Main CFD Forum 0 September 24, 2012 03:02 zonexo Main CFD Forum 4 August 14, 2006 00:36

All times are GMT -4. The time now is 22:56.