|
[Sponsors] |
January 5, 2001, 10:19 |
how to compute the gradient of a function
|
#1 |
Guest
Posts: n/a
|
the value of the function f is known on each grid point, to approximate the gradient of the function f, i.e. (df/dx, df/dy) which is the good choice, central difference? or one-sided difference? or some more complicate form?
|
|
January 5, 2001, 13:02 |
Re: how to compute the gradient of a function
|
#2 |
Guest
Posts: n/a
|
(1). It depends on the nature of this function. (2). In principle, the central difference is more accurate than the one-sided difference, based on the Taylor series expansion. (2). Most numerical analysis books have a chapter on the numerical interpolation. And if you are dealing with test data, with some random distributions, then you will have to create a new approxmate smooth function first, in order to derive the general trend or gradient.
|
|
January 10, 2001, 09:11 |
Re: how to compute the gradient of a function
|
#3 |
Guest
Posts: n/a
|
For finite differnece method,the central difference is usually used to calculate the gradient on account of the accuracy.Meanwhile,for finite volume method,it is better to use Gauss integral theorem over a control unit to calculate the gradient than central differnce.For example,when you calculate the derivative of velocity on the cell interface for viscous term in the N-S equations,the central differnce only takes account of one direction,i.e.you deal with the thin layer N-S eq or PNS,but the Gauss integral considers all direction,i.e.you deal with the full N-S eq.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
surface tension as function of normal gradient | tom | FLUENT | 2 | September 7, 2016 04:48 |
get velocity gradient with a boundary function | Chris Lucas | OpenFOAM Programming & Development | 4 | August 27, 2012 04:11 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 01:35 |
User defined function for density gradient | ben akih | CFX | 3 | October 10, 2006 22:47 |
How to compute gradient for non-orthogonal grids? | Paul Hsieh | Main CFD Forum | 3 | November 11, 2003 05:52 |