CFD Online Logo CFD Online URL
Home > Forums > General Forums > Main CFD Forum

Finite difference schemes on non uniform grid

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

LinkBack Thread Tools Display Modes
Old   October 12, 2007, 11:47
Default Finite difference schemes on non uniform grid
charlie ryan
Posts: n/a

i have a non uniform grid, and i would like to use a finite difference scheme upon it to solve a collection of coupled PDE's [i.e. use FD method to create a load of ODE's then solve these using Runge Kutta - Method of Lines]. But i am struggling to find a source for finite difference schemes with non-uniform grids, for approximating y_x and y_xx. I have found formulas for central differences, but would also like formulas for backward and foward differences, for both y_x and y_xx - does antone know of a reference that contains these? Or perhaps you could show me how to derive them?! Thanks in advance,

Charlie Ryan
  Reply With Quote

Old   October 12, 2007, 14:45
Default Re: Finite difference schemes on non uniform grid
Posts: n/a
Deriving them can be done using taylor series expansion.

Assume you want to find the derivative at node i using the points i-1,i,i+1.

fx_i = Af_i + B f_i-1 + C f_i+1

your aim is to find A,B,C now.Expand f_i+1 and f_i-1 using taylor expansion and assume (hn=abs(x_i-x_i-1) , hp=abs(x_i+1-x_i) )

f_i-1=f_i-hn fx_i+hn^2/2 fxx_i + HOT

f_i+1= f_i +hp fx_i +hp^2/2 fxx_i + HOT

substituting back you would get

fx_i=(A+B+C)f_i+(-B hn + C hp) fx_i +(B hn^2/2 + C hp^2/2)fxx_i

equating both sides u get three equations A+B+C =0 -B hn + C hp = 1 B hn^2 + C hp^2 =0

Solve to get A,B,C and you have the expansion.

  Reply With Quote

Old   October 13, 2007, 11:13
Default Re: Finite difference schemes on non uniform grid
Posts: n/a
A very good book for finite difference is:

"Computational Fluid Mechanics and Heat Transfer" by Dale A. Anderson, John C. Tannehill, R. H. Pletcher

I hope this could help you
  Reply With Quote

Old   October 18, 2007, 11:32
Default Re: Finite difference schemes on non uniform grid
charlie ryan
Posts: n/a

thanks for your responses - very helpful both of them. One Q - how do you calculate the error [the HOT?], from the finite difference approximation? Thanks Charlie
  Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
turbulent jet simulation antonio_ing OpenFOAM Running, Solving & CFD 5 September 16, 2010 02:31
rhoSimpleFoam claco OpenFOAM 7 April 20, 2010 04:32
On grid independent solution for pulsatile flow David FLUENT 4 June 8, 2005 16:20
uniform grid and beta clustering rvndr Main CFD Forum 0 February 22, 2004 00:19
finite difference method for navier-stokes problem dallybird Main CFD Forum 5 February 17, 2003 23:00

All times are GMT -4. The time now is 07:55.