CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   When to use upwind or central differencing schemes? (https://www.cfd-online.com/Forums/main/91593-when-use-upwind-central-differencing-schemes.html)

 quarkz August 16, 2011 09:26

When to use upwind or central differencing schemes?

Hi,

I am using central differencing scheme currently.

I read that it is preferable to use an upwind scheme at high Re of 10,000 to ensure convergence.

Is this true?

Also, is upwind scheme only suitable for problems with a general direction of flow e.g flow past a cylinder, from left to right?

In that case, if I'm trying to simulate a flapping foil in a hovering configuration (with no inflow and symmetry BC all around), will I need to use an upwind scheme?

Thanks!

 leflix August 17, 2011 15:20

Quote:
 Originally Posted by quarkz (Post 320292) Hi, I read that it is preferable to use an upwind scheme at high Re of 10,000 to ensure convergence. Is this true?
yes more or less...

upwind scheme as well as central differencing scheme are finite difference schemes which will use different locations of the variable you want to derive.
Imagine you want to discretize a first, second,....derivative of a given function f at a i location. To do that if you use f(i), f(i+1), f(i-1), f(i+2), f(i-2).. these expressions will refer as centred (means centred around i)
If you use f(i) f(i-1), f(i-2)... this one will refer as upwind because you only use upwind location around i.
If you use f(i), f(i+1), f(i+2)...this expression will refer as downwind.

The choice of one possible expression instead of another one will have somme consequences on accuracy and stability.

Now when you plan to discretize the Navier-Stokes equations this notion apply on the discretization of the convective term of the NS equations.
Let's imagine you use finite volume method , but in finite difference or in finite element the problem is the same.
In the discretization process you will need to the value of the velocity on the faces of your control volume. For example on the "east" side you will need u_e. in finite difference this location is generally noted i+1/2
If you use a centred scheme you will say U_e= (U_E+U_P)/2 (if the east face is at the mid distance between E and P.
If you use an upwind scheme you will say U_e= U_P is the convective velocity is positive and U_e=U_E is the convective velocity is negative. Saying that you understand why we speak of "upwind" scheme.

centred scheme is 2nd order accurate while upwind scheme is only first order. upwind scheme is also more diffusive than centred scheme but it is also more stable than centred scheme which can lead to some spurious oscillations (dispersive errors). It is well known than when peclet number is >2 it is preferable to switch from centred scheme to upwind scheme.

So due to this possible oscillating behaviour of the centred scheme, especially on convective dominated flow (high re number) the use of the upwind scheme could stabilize the solution.
But it will be in the same time less accurate..
But other options are possible.

in fact I should have told you first, to refer to CFD wiki
http://www.cfd-online.com/Wiki/Appro...grids_-_Common

You will understand the point.

Quote:
 Also, is upwind scheme only suitable for problems with a general direction of flow e.g flow past a cylinder, from left to right? In that case, if I'm trying to simulate a flapping foil in a hovering configuration (with no inflow and symmetry BC all around), will I need to use an upwind scheme? Thanks!
Not at all ! now you will undertsand that it has nothing to do. Even if your flow is from right to left, it may be wise to use also upwind scheme for high reynolds number flows.
For the upwind scheme what is important is the local direction of the velocity.
Even if the flow is from left to right if you have some recirculating regions or vortices evolving in the flow, the velocity could be locally negative and thus you will retain U_E to compute U_e on the "east" side of the control volume .

 quarkz August 18, 2011 03:34

Thanks leflix for the in depth answer.

Just to confirm, the key point of the upwind scheme is the local convective velocity. Hence for high Re flow, no matter if the inflow is left to right, or if it is a hovering case with symmetrical BC, an upwind scheme is preferred. Is that so?

 leflix August 18, 2011 04:42

Quote:
 Originally Posted by quarkz (Post 320581) Just to confirm, the key point of the upwind scheme is the local convective velocity.
yes

Quote:
 Hence for high Re flow, no matter if the inflow is left to right, or if it is a hovering case with symmetrical BC, an upwind scheme is preferred. Is that so?
"preferred" is not the word. It is very problem dependent. If the code converge with a centred scheme use rather this one because the accuracy is better. But sometimes the solution could diverge with a centred scheme and converge with the upwind one.
In any case you can always use an upwind scheme. When it is necessary it will bring stability because of its propensity to numerical diffusion. But in the same time its accuracy is lower than other scheme for the same number of grid nodes.

 andy_ August 18, 2011 04:47

Quote:
 Originally Posted by quarkz (Post 320292) I read that it is preferable to use an upwind scheme at high Re of 10,000 to ensure convergence. Is this true?
Perhaps. It depends on the design and objectives of the numerical scheme.

Quote:
 Originally Posted by quarkz (Post 320292) Also, is upwind scheme only suitable for problems with a general direction of flow e.g flow past a cylinder, from left to right?
No. Upwinding is applied at a cell or cell face level and so varies throughout the grid.

Quote:
 Originally Posted by quarkz (Post 320292) In that case, if I'm trying to simulate a flapping foil in a hovering configuration (with no inflow and symmetry BC all around), will I need to use an upwind scheme?
Perhaps. It depends on the numerical scheme adopted.

At high Reynolds number upwinding introduces stability in a physically reasonable manner and so is generally good thing. However, the scheme may seek to introduce stability by numerically conserving physically quantities in a global manner (e.g. energy conservation is popular with LES schemes) which may preclude the use of upwinding which introduces "dissipative" terms.

 quarkz August 19, 2011 02:21

Thanks andy_ for the additional info.

Currently, my flapping foil simulation at Re=10000 converges with central differencing. However, I'm getting non-periodical solution when it's supposed to be periodical based on experiments.

Is central differencing the problem? Should I use some form of upwind scheme? But leflix says central scheme should be more accurate.

Another reason could be turbulence, since my solver is only solving laminar flow.

 andy_ August 19, 2011 03:24

Quote:
 Originally Posted by quarkz (Post 320724) Currently, my flapping foil simulation at Re=10000 converges with central differencing. However, I'm getting non-periodical solution when it's supposed to be periodical based on experiments.
Turbulence isn't periodic and so if the flow is turbulent it can only be periodic after the turbulent motion has been averaged in some sense.

Quote:
 Originally Posted by quarkz (Post 320724) Is central differencing the problem? Should I use some form of upwind scheme? But leflix says central scheme should be more accurate.
Centred schemes and upwind schemes introduce numerical errors that behave differently. Which type of error is preferable depends on the details of how you go about solving the Navier Stokes equations.

Leflix was referring to formal accuracy and then only in a typical sense for centred and upwind schemes that use the same number of grid values. Assuming a solution is obtained, in the presence of significant numerical errors this is not the only property of a numerical scheme that is of relevance to a simulation.

Quote:
 Originally Posted by quarkz (Post 320724) Another reason could be turbulence, since my solver is only solving laminar flow.
If you resolve the flow in space and time and use appropriate boundary conditions then what you are doing is fine. It is usually called DNS (Direct Numerical Simulation) in CFD jargon.

If you do not resolve the flow in space and time then what you are doing is almost certain to result in an unreasonable simulation of the flow. The most common approach is to change the form of the equations being solved by introducing some form of averaging (a turbulence model) and then to resolve those equations in space and time.

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