CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   central difference approximation (https://www.cfd-online.com/Forums/main/83577-central-difference-approximation.html)

 Hermano January 4, 2011 09:49

central difference approximation

Hi,

Where can I find the expression of the central difference approximation of the first and second derrivative (spatial) for a NON uniform grid?

 otd January 4, 2011 19:00

For 3 points, (x1, f1), (x2, f2), (x3, f3), x1 < x2 <x3

Two methods (identical results for the approximation):

1. Expand f1 and f3 about x2 in Taylor series. Expand through the second derivatives.

You get two equations with unknowns df/dx and d^2f/dx^2 evaluated at x2. Solve those for your solution. Note: Expand through the 3rd and 4th derivatives, you have terms for the major errors you ignore by truncating the series after the 2nd derivatives.

2. Fit a parabola, f(x) = f2 + b(x - x2) + c(x - x2)^2 through the 3 points. b and c will be functions of x1, x2, x3 and f2 and f3.

Good luck.

OTD

 DoHander January 5, 2011 18:23

Try this book:

Ferziger and Peric - Computational Methods for Fluid Dynamics

Do

 All times are GMT -4. The time now is 12:44.