CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

richardson extrapolation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 8, 2013, 07:02
Default richardson extrapolation
  #1
New Member
 
Albert Puig
Join Date: Jul 2012
Posts: 24
Rep Power: 13
Puigar is on a distinguished road
hello!

I am trying to get a value from an independence mesh test, and I was told to use richardson extrapolation.

If I only have a table with mesh values and the force value. how do I do the extrapolation? I am not able to find suitable examples anywhere.. those are an example of the data. By eyesight I can guess that the value of F on N to infinite will be close to 1.42-1.415. But how I get the value analitically??

N 10 20 30 40
F 1.5984431 1.4780298 1.4446029 1.4293989

Thank you in advance

Puigar
Puigar is offline   Reply With Quote

Old   March 8, 2013, 10:35
Default
  #2
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
What is "N"?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   March 8, 2013, 10:42
Default
  #3
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,399
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
For a correct richardson extrapolation, all you need to know is the order of the discretization error p of your numerical scheme.
The correct formula for a richardson extrapolation can be foung e.g. on wikipedia.

Remember that the size of your elements enters the formula, not the number of elements.
flotus1 is offline   Reply With Quote

Old   March 8, 2013, 10:48
Default
  #4
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Quote:
Originally Posted by flotus1 View Post
For a correct richardson extrapolation, all you need to know is the order of the discretization error p of your numerical scheme.
The correct formula for a richardson extrapolation can be foung e.g. on wikipedia.

Remember that the size of your elements enters the formula, not the number of elements.
But it seems to be much better to calculate "p" based on two refinements rather than just trusting your software that it is 2nd order accurate...
BlnPhoenix likes this.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   March 8, 2013, 11:00
Default
  #5
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,399
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
I agree...
flotus1 is offline   Reply With Quote

Old   March 8, 2013, 11:07
Default
  #6
New Member
 
Albert Puig
Join Date: Jul 2012
Posts: 24
Rep Power: 13
Puigar is on a distinguished road
N10 is 41600 nodes (mesh is 80x520, rectangular domain)
N20 is 166400 nodes 160x1040
N30 is 374400 nodes 240x1560
N40 is 665600 nodws 320x2080

I am running with lattice boltzmann method, and it is fully adimensionalized. So if I have to consider the distance between nodes it could be like (guess):
(x axe)
h
h/2
h/3
h/4

(y axe)
the other values respectively

like this I will be able to find the asymptotic value of h+N where N tends to infinite?
Puigar is offline   Reply With Quote

Old   March 8, 2013, 13:28
Default
  #7
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,399
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
From your values at h, h/2 and h/4 I evaluate the error order p=1.308.

Using this for a Richardson Extrapolation from h/2 and h/4 I get a value of 1.396.

For completeness, here is the formula from Wikipedia:
flotus1 is offline   Reply With Quote

Old   March 11, 2013, 03:36
Default
  #8
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Hi,

For the values of N=10,20,40 I get a numerical order of p=3.34,
an error of the fine grid e=-0.00167 and a correct value of f=1.427732
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   March 11, 2013, 04:20
Default
  #9
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,399
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
Strange...
How do you evaluate the order of the error?
flotus1 is offline   Reply With Quote

Old   March 11, 2013, 04:24
Default
  #10
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
p=LOG(f_20 - f_40 / f_10 - f_20) / LOG(2)
It is LOG(2) only, if the grade of refinement in each step is 2 (in each direction) - which is the case here.
f_10, f_20, f_40 is related to the finest, normal and coarse grid.
This is explained in the Ferziger/Peric book.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   March 11, 2013, 04:34
Default
  #11
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,399
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
A quadratic fit with excel yields this:


Enforcing an "exact" value of 1.427732 yields this, which doesnt fit the values very well:



Are you sure you applied Ferzigers formula correctly?

I derived a similar formula myself, i guess you just mixed up the sequence between coars and fine.

Last edited by flotus1; March 11, 2013 at 05:15.
flotus1 is offline   Reply With Quote

Old   March 11, 2013, 04:54
Default
  #12
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
No , but I just checked it and it seems to be right.
Well, as I understand it, it is not proper to make a quadratic fit in this case. The error of "f" should be something like

e = constant * (dx)^p,

where dx is the size of the grid. Now, if you have two consecutive refinements (=three values) you can estimate "p". If it is about 3.34, it doesn't seem to be right to use a quadratic fit for "e".

Hmm... when I create your first pic, it doesn't look like that, could you check the values for f and dx?

Also, I do not use the N=30 value at all.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   March 11, 2013, 04:57
Exclamation
  #13
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Sorry, I used the value of N=30 instead of N=20... wait a second.

Alright, I get an order of p=1.31, error of N=40 is -0.03295 and corrected value is f_corr=1.396453.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   March 11, 2013, 05:03
Default
  #14
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,399
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
Double-checked my values... everything correct.

If I assume the error order to be below 2, I can make a quadratic fit.
And since the quadratic fit "fits" very well, this is a strong evidence that the error is of order h^2 to the maximum.

For my derivation of the error order, I used the Ansatz F(h_i) = F(h=0) + a*(h_i)^p

Edit: just saw your last post. glad we agree on this.
flotus1 is offline   Reply With Quote

Old   March 11, 2013, 05:59
Default
  #15
New Member
 
Albert Puig
Join Date: Jul 2012
Posts: 24
Rep Power: 13
Puigar is on a distinguished road
what are the values of the x axe for these two graphs??

Edit: and in addition: What are U_g and U_u from the richardon's formula?? I dont get how do you get that value, since you said you use the h, h/2 and h/4 that make 3 points, but there are only 2 arguments for U in the richardson's formula.
Puigar is offline   Reply With Quote

Old   March 11, 2013, 06:40
Default
  #16
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
x-axis shows the size of "dx" elements:
1/80, 1/160, 1,240, 1/320 for the four cases. You could also take "dy", that does not matter. The three points are used to obtain the numerical order "p". The actual extrapolation is done with only two points.
Ug is the result on the finest grid (N40), Uu is (in my case) the result on the 2x coarser grid (N20). Thus hu/hg = 2.
Better get a copy of Ferziger/Peric...
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   March 11, 2013, 12:45
Default
  #17
New Member
 
Albert Puig
Join Date: Jul 2012
Posts: 24
Rep Power: 13
Puigar is on a distinguished road
Quote:
Originally Posted by RodriguezFatz View Post
p=LOG(f_20 - f_40 / f_10 - f_20) / LOG(2)
It is LOG(2) only, if the grade of refinement in each step is 2 (in each direction) - which is the case here.
f_10, f_20, f_40 is related to the finest, normal and coarse grid.
This is explained in the Ferziger/Peric book.

f_10 you mean the value of the greatest number of nodes??
the values of the N are sorted from the least to the highest number of nodes and therefore from the coarsened to the finest grid.
N10 = coarsened // N= 40 the finest grid

Is it done the calculations like that? the LOG is in base 10 or 2?
Puigar is offline   Reply With Quote

Old   March 11, 2013, 13:11
Default
  #18
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Quote:
Originally Posted by Puigar View Post
f_10 you mean the value of the greatest number of nodes??
the values of the N are sorted from the least to the highest number of nodes and therefore from the coarsened to the finest grid.
N10 = coarsened // N= 40 the finest grid

Is it done the calculations like that? the LOG is in base 10 or 2?
Ok, in your case it has to be:
p=LOG(f_20 - f_10 / f_40 - f_20) / LOG(2)

It does not matter if you take base 10 or 2 for the logarithm. You divide to logarithms, the base cancels.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   March 11, 2013, 14:25
Default
  #19
New Member
 
Albert Puig
Join Date: Jul 2012
Posts: 24
Rep Power: 13
Puigar is on a distinguished road
Quote:
Originally Posted by RodriguezFatz View Post
Ok, in your case it has to be:
p=LOG(f_20 - f_10 / f_40 - f_20) / LOG(2)

It does not matter if you take base 10 or 2 for the logarithm. You divide to logarithms, the base cancels.

Where can I get information of error order calculation "p"? I don't know how to find it via internet.

Thanks for the attention. I appreciate it a lot.
Puigar is offline   Reply With Quote

Old   March 11, 2013, 15:31
Default
  #20
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
a) Are you a student? Maybe your university has access to springerlink and you can just download the book of Ferziger and Peric:
http://books.google.de/books/about/C...AJ&redir_esc=y

b) Or go to:
http://cfd.mace.manchester.ac.uk/twi...st-quality.pdf
At page 8, you will find the ansatz for two different grids. Write down a third equation for the finest grid (dx/4) in the same manner. Now combine these three equation to eliminate all unknowns - higher order terms are neglected. You will get "p"!

Also buying the book (a) is a good choice. This is the best book for CFD I know.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Richardson extrapolation pc Main CFD Forum 11 March 8, 2013 06:50
Discretization error with Richardson extrapolation. cfdstudent004 CFX 1 May 29, 2012 19:04
Richardson Extrapolation to check time and space convergence Hooman Main CFD Forum 0 December 29, 2010 08:19
Richardson extrapolation cynthia FLUENT 4 June 20, 2008 08:58
One-sided extrapolation coolblizz Main CFD Forum 2 February 8, 2006 20:24


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