Different one sided derivative approximation?
In my FVM code, I am trying to approximate the face value of pressure at the boundary wall. Since it is a cell-center code, all pressure values are at the cell's center.
For e.g. at the south/bottom wall, dp/dy=0. the simplest approx will be p_s=p(i,j) higher accuracy from Blazark's CFD book gives p_s=(1/8)*(15*p(i,j)-10*p(i,j+1)+3*p(i,j+2)). however, it is also possible to use dp/dy=(1/2h)*(3*p_s-4*p_n+p_nn) where h=delta, p_n=(p(i,j)+p(i,j+1))/2, p_nn=(p(i,j+1)+p(i,j+2))/2 simplifying, p_s=(2/3)*p(i,j)-(1/3)*p(i,j+1)-(1/6)*p(i,j+2) based on the no. of values used, they should be of the same accuracy, but why are their values different? Also, does anyone has similar expression for non-uniform grids? thanks |
Re: Different one sided derivative approximation?
They may be of the same order but the error can be different. Remember that the error is of the form Ch<sup>r</sup> and different schemes of the same order can have different values for C.
For non-uniforms grids you can fit a polynomial p(y) = p<sub>s</sub> + p<sub>1</sub> y + p<sub>2</sub> y<sup>2</sup> + ... and also use dp/dy(y=0) = 0 to obtain the value of p<sub>s</sub> |
Re: Different one sided derivative approximation?
i think there is a mistake in ur simplification, it should come as Ps = (2/3)*Pi,j + (1/2)*Pi,j+1 - (1/6)*Pi,j+2
|
All times are GMT -4. The time now is 10:04. |