CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Formula for 2nd order upwind scheme for non-uniform grids? (http://www.cfd-online.com/Forums/main/106480-formula-2nd-order-upwind-scheme-non-uniform-grids.html)

 quarkz August 30, 2012 03:57

Formula for 2nd order upwind scheme for non-uniform grids?

Hi,

I've seen the formula for 2nd order upwind scheme for uniform grids as:

phi_e = 1.5*phi_P - 0.5*phi_W for u_e > 0

phi_e = 1.5*phi_E - 0.5*phi_EE for u_e < 0

Is there a formula meant for non-uniform grids as well?

Thanks

 michujo August 30, 2012 04:57

Hi, you can try to derive it. Just take the Taylor expansions around the nodes E and EE, taking into account the different grid spacing for node i.

The formulas you showed is a particular case where the grid spacing is constant. Under this assumption, the grid spacings appearing in numerator and denominator of your expressions when you solve for phi_e cancel out and disappears from the equation. However, the different will appear in the expression of phi_e if you consider grid non-uniformity.

I hope it helps.

Cheers,
Michujo.

 FMDenaro August 30, 2012 17:25

Quote:
 Originally Posted by quarkz (Post 379443) Hi, I've seen the formula for 2nd order upwind scheme for uniform grids as: phi_e = 1.5*phi_P - 0.5*phi_W for u_e > 0 phi_e = 1.5*phi_E - 0.5*phi_EE for u_e < 0 Is there a formula meant for non-uniform grids as well? Thanks
Be careful that upwind schemes are usually first, third, fifth ... order accurate... the reason is to have a local truncation error that has a dissipative behaviour ... the above formulas are based on a linear extrapolation of the value, that is highly unstable in general.

I suggest to construct a second degree polynomial on non-uniform stencil in such a way that if u_e>0 then Phi_W,Phi_P, Phi_E are involved (the counterpart for u_e<0 involves Phi_P,Phi_E, Phi_EE).
This way the use of Phi_P ensures better stability properties

 All times are GMT -4. The time now is 04:49.