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

uniform discretization scheme on non-uniform grid

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2019, 13:02
Default uniform discretization scheme on non-uniform grid
  #1
New Member
 
Theo
Join Date: Mar 2009
Posts: 26
Rep Power: 17
holgerbre is on a distinguished road
imagine using a discretization scheme for a uniform grid, e.g.


(x_(i+1) + x_(i-1) - 2*x_i)/h²


for a second derivative, even if the grid is not uniform, i.e. h_(i+1), h(i-1) and h_i are not equal. Does that introduce a significant error? or is there a certain grid stretching below which it is acceptable? Reason for this question is that uniform schemes are obviously much easier to implement and faster to compute.
holgerbre is offline   Reply With Quote

Old   March 27, 2019, 13:06
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,760
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by holgerbre View Post
imagine using a discretization scheme for a uniform grid, e.g.


(x_(i+1) + x_(i-1) - 2*x_i)/h²


for a second derivative, even if the grid is not uniform, i.e. h_(i+1), h(i-1) and h_i are not equal. Does that introduce a significant error? or is there a certain grid stretching below which it is acceptable? Reason for this question is that uniform schemes are obviously much easier to implement and faster to compute.



Of course the answer is that you have a wrong formula on non uniform grid. To check this try to expand the local truncation error.
The correct formula is very easy to write, you can write the lagrangian polynomial of second degree on three non equidistant nodes. The second derivative is constant in such interval.
lcarasik likes this.
FMDenaro is online now   Reply With Quote

Old   March 27, 2019, 13:49
Default
  #3
New Member
 
Theo
Join Date: Mar 2009
Posts: 26
Rep Power: 17
holgerbre is on a distinguished road
sure, but i wonder if there is a limit up to which this error is acceptable?
holgerbre is offline   Reply With Quote

Old   March 27, 2019, 13:53
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,760
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by holgerbre View Post
sure, but i wonder if there is a limit up to which this error is acceptable?

Compute the local truncation and compare the two formula. Check what happens for vanishing mesh size. Remember that to hope in a physically relevant solution you need consistence and stabilty when you perform a discretization of an equation.
Have also a look to the book of Peric and Ferziger about the discretization on non uniform grids
FMDenaro is online now   Reply With Quote

Old   March 27, 2019, 14:39
Default
  #5
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 13
Eifoehn4 is on a distinguished road
Quote:
Originally Posted by holgerbre View Post
sure, but i wonder if there is a limit up to which this error is acceptable?
For constant problems the error is acceptable. For anything else, dont do it.
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.
Eifoehn4 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
dsmcFoam setup hherbol OpenFOAM Pre-Processing 1 November 19, 2021 02:52
rhoPimpleFoam hardship petrus OpenFOAM Running, Solving & CFD 0 October 7, 2016 03:41
Time continuity error & FAN patch Zephiro88 OpenFOAM Running, Solving & CFD 4 April 22, 2015 13:39
simpleFoam Floating point error (Core Dumped) sam.ho OpenFOAM Running, Solving & CFD 2 December 31, 2013 07:57
Grid Independence with discretization schemes saisanthoshm88 CFX 19 May 22, 2013 11:10


All times are GMT -4. The time now is 13:38.