CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   help! (https://www.cfd-online.com/Forums/main/7266-help.html)

 lsm March 10, 2004 00:45

help!

who can tell me why the "middle point rule" in FVM is 2th precision?

 sunil March 10, 2004 02:49

Re: help!

jgjkagdxjagj

 P. Birken March 10, 2004 06:15

Re: help!

Any textbook or lecture notes on numerical methods for ODEs. Or a Taylor-expansion.

 lsm March 10, 2004 07:16

Re: help!

sorry,middle value rule and middle point rule are popular,but i can't see any analysis about precision.

 Tom March 10, 2004 08:33

Re: help!

It follows from the mean-value theorem (=> Taylors theorem) in any school (A-level in the UK) maths text book.

Alternatively consider two points x_l and x_r with midpoint x_m = ( x_l + x_r )/2 and spacing h = x_r - x_l then the trapezoidal rule gives, for a function f,

integral f = h( f_r + f_l )/2 + O(h^3)

and by Taylors theorem f_m = ( f_r + f_l )/2 + O(h^2) which imples the result (assuming you accept the Trapezoidal rule is second order!)

 lsm March 10, 2004 10:38

Re: help!

yes integral f = f(average value at one point between x_l and x_r)*h=?f_middle-pint*h+o(h^3)

 lsm March 11, 2004 00:42

Re: help!

my puzzle is that f = f(average value at one point between x_l and x_r) by middle value rule is strict, but f(average value at one point between x_l and x_r)=?f_middle-pint+o(h^1) is 1th precise. how to explain it?

 Tom March 11, 2004 05:40

Re: help!

Basically the O(h) error term vanishes at the midpoint - look at a book on finite difference methods.

 Hrvoje Jasak March 11, 2004 12:47

Re: help!

Do integral of phi over a ceontrol volume and approximate it with Taylor series expansion.

int_V phi(x) dV

phi(x) = phi_P + (x - x_P) . grad(phi)_P + hot. (1)

When you integrate you get

int_V phi(x) dV = phi_P V + (int_V (x-x_P) dV) . grad(phi)_P + hot.

The gradient comes out of the second integral because it is a constant. So, if the integral

int_V (x-x_P) dV = 0 (3)

the method will be second order, which is true if the point of expansion you are expressing phi in eq(1) around in the centroid of the cell. Fortunately, eq(3) is indeed the definition of the centroid so all is well.

"... and there you are!" (quote from My Big Fat Greek Wedding) :)

Hrv

 lsm March 12, 2004 00:59

Re: help!

thanks,but excuse me, let's do 1d case for 1d case your (3) equation int_V (x-x_P) dV = 0 (3) become int_V (x-x_P) dx = 1/2(x-xp)^2 it is o(2), not o(3)

 All times are GMT -4. The time now is 08:00.