CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   How to determine the order from numerical experiments (https://www.cfd-online.com/Forums/main/95112-how-determine-order-numerical-experiments.html)

werder85 December 6, 2011 09:47

How to determine the order from numerical experiments
 
Hi!

I'm a relative rookie in the field of CFD and I have a basic question: how do you determine the order of a method from experimental results. I've seen in several papers that it is determined by using a certain norm (1,2 or inf), the grid spacing is then usually halfed in sequential steps, but then based on the L-norm, how do you determine the order?

Here is an example for a 1D domain. How are the values in the last column obtained?

dx L2-error Order
dx = 1/ 40 0.18*10−3
dx = 1/ 80 0.13*10−4 3.80
dx = 1/160 0.86*10−6 3.90
dx = 1/320 0.56*10−7 3.96
dx = 1/640 0.35*10−8 3.98


Thank you very much!

JPBodner December 6, 2011 15:41

Check out the ASME V&V20 standard for CFD validation or search for the various papers and books by Roache on V&V for a cook-book methodology.

cfdnewbie December 6, 2011 17:22

Assume that the error of your approximation has the following form:

E1=c1*h1**p, where c1 is a constant, h1 is your current grid spacing and p is the order of your approximation (for h->0).

Now consider another grid spacing h2:
E2=c1*h2**p, with p=p, assume that c1 is due to the formulation and a constant factor

now:

E1/E2 = h1**p / h2**p

Take the Log to get

log (e1/e2) = p * log ( h1/h2)

solve for p!

so try it out with your example, e.g. the first pair:

dx = 1/ 40 0.18*10−3
dx = 1/ 80 0.13*10−4 3.80

just did the math, came up with p=3.795, just try it!


basic idea behind it is: assume error has polynomial shape with constant p, pick two grid spacings and associated errors and fit a curve thru them. slope gives order....

lbrieda December 7, 2011 00:50

The order basically tells you how fast the error decreases as you refine your mesh. First-order convergence means that if you go from cell spacing of let's say 2mm to 1mm, your error will also decrease by a factor of 2. Second order convergence would mean that the error went down by a factor of 4.

To determine the error, you do basically what you said. You come up with some method to calculate the error - this is the norm, the L2 norm is used quite a lot. Then calculate the norm for the baseline mesh. Then make the mesh finer by refining the mesh. Calculate the norm again. Repeat as much as you like. You will now have a set of "x-y" points that you can graph and analyze to determine the convergence behavior.

werder85 December 7, 2011 02:57

Thank you all for your help! It's clear to me now.


All times are GMT -4. The time now is 10:31.