
[Sponsors] 
December 14, 2017, 10:43 
comparison of discretization scheme

#1 
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 
Hi all
according to Verstig CFD book (and also Patankar) I want to see the effect of the discretization scheme on the results (especially diffusion error in upwind scheme and unboundedness in central scheme). For this purpose I want to solve the equation of T like: div (phi , T) = 0 (diffusion term should be removed (to see numerical diffusion)) beside the continuity and momentum eqn. in a steady state mood with openfoam(where phi is the flux). I have gotten the result by Upwind scheme, but unfortunately I can't solve the eqn. with central scheme! my solution become diverge. Do you know why? I want to compare the result of two schemes. Thanks 

December 14, 2017, 12:21 

#2  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,858
Rep Power: 73 
Quote:


December 14, 2017, 12:24 

#3 
Member
Ravindra Shende
Join Date: Feb 2011
Location: Pune, India
Posts: 45
Rep Power: 15 
Central difference scheme is unstable for this equation, that is why your solution is diverging.
You will have to add diffusion artificially in order to stabilize the scheme and get a converged solution. 

December 14, 2017, 14:27 

#4 
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 
As a general statement, it will be challenging to compare something to central difference. Central difference requires artificial dissipation and the required amount will depend on things like boundary conditions, time marching, how you start the solution (impulse or gradual start), and the form of dissipation itself. Creating a good central difference methodology will allow you to minimize the amount of artificial dissipation, though you may not get to zero. One option is for you to compare things in 1D. Depending on what you're doing, you may not need artificial viscosity for central difference. For example, I've been able to get away with zero artificial viscosity for some subsonic compressible 1D Euler runs in conservative form. But that is for 1D only. 2D and 3D are different stories.


December 15, 2017, 08:09 

#5  
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 
Quote:
thanks for your answer But some body did it : http://openfoam.blogfa.com/post/112 

December 15, 2017, 08:13 

#6  
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 
Quote:
My problem is 1D, steady and pure diffusion. somebody has done it before, but I can't get results! http://openfoam.blogfa.com/post/112 

December 15, 2017, 12:52 

#7  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,858
Rep Power: 73 
Quote:


December 15, 2017, 19:07 

#8  
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,750
Rep Power: 66 
Quote:


December 16, 2017, 04:34 

#9 
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 

December 16, 2017, 05:01 

#10 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,858
Rep Power: 73 
Again, have a look to the book of Peric and Ferziger. Then, to understand the characteristics of a first and second order FD derivative you can just have a look to the local truncation error in physical and wavenumbers space. That is a classical topi for students in CFD. 

December 16, 2017, 05:12 

#11  
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 
Quote:
So, how did he solve that equation?! It means that we never can solve the pure advection eqn. with central scheme? 

December 16, 2017, 05:12 

#12  
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 
Quote:
thank you 

December 17, 2017, 12:10 

#13 
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 
I'm unable to read the language that page is written in and I'm not very good at Openfoam and its terminology. My question is, are you solving for velocity or is it fixed and what you're solving for is an uncoupled transport equation?
Given what I saw on that page I'm hesitant to say artificial viscosity is required. Granted, as a general statement, it is required. An underlying assumption for central differencing is that the system is continuous, i.e. (+) and () derivatives are equal. Unfortunately, numerically the system is discontinuous, even for a physically continuous system, if there are Taylor series truncation errors. And I'm under the impression that what is shown on that page may be low order, thus little truncation error. Same as with my 1D problem, channel flow with area change. In that case Area*rho*U is constant at all points. Thus, if it's in conservative form and solving for steady state implicitly, it's zero order. Of course there can always be a bug in your code, but I would suggest initializing your run with the exact answer or your upwind scheme solution, and see where things go. But, again, I have little idea about how Openfoam goes about things, so the solution methodology may introduce higher order noise, in which case byebye solution. Edit: when I wrote that (+) and () derivatives are equal, I meant forward and backward derivatives. 

December 18, 2017, 14:37 

#14  
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,750
Rep Power: 66 
Quote:
"he" did not solve the pure convection equation. He was solving the full advectiondiffusion equation. However, the BC's such that there is no physical diffusion. Notice the BC's in the problem setup. Numerical diffusion stabilizes the problem. The problem is you are trying to eliminate the diffusion term entirely and solve only the advection part from the governing equations and hence your problem. 

December 19, 2017, 02:21 

#15  
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 
Quote:
The velocity is fixed. I'm solving T as a scalar in div(phi,T)=0 where phi is the mass flux (rho*U). I wrote a code for this problem: div(phi , T) = 0 for 2D domain: Fe.Te  Fw.Tw + Fn.Tn  Fs.Ts = 0 rho, U and A in all of the cells are equal. so: Fe = Fw = Fn = Fs and : Te  Tw + Tn  Ts = 0 if we use "upwind" scheme, we have: TpTw+TpTs=0 and finally: Tp = 0.5 * (Ts + Tw) I got good result for the upwind scheme. but if I want to use "central" scheme: (Fe  Fw + Fn  Fs) * Tp = Fw*TW  Fe*TE + Fs*TS  Fn*TN Tp = (Fw*TW  Fe*TE + Fs*TS  Fn*TN) / (Fe  Fw + Fn  Fs) rho, U and A in all of the cells are equal. so: Fe = Fw = Fn = Fs and the denominator of Tp become zero! Tp = (TW  TE + TS  TN) / (0) !!!!!! is it correct? according to what I typed (if it is correct!), we never can use central scheme for pure advection equation. yes? Thanks 

December 19, 2017, 02:36 

#16  
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 
Quote:
some questions: 1 Could you please write the equation that he used? I want to solve this problem div(phi,T) = ??? (numerical diffusion) 2 As you see in my answer to Martin, I solved this problem with upwind scheme. But I didn't mention Numerical diffusion nor physical diffusion and I could see the numerical diffusion in contour of T. is it wrong? (that I didn't mention Numerical diffusion) 3 I want to find out the concept of "Numerical diffusion" or "false diffusion". I have read Patankar and some other cfd books. but I didn't get that! could you please explain it? or give me a reference to read about it? Thank you 

December 19, 2017, 02:47 

#17 
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 
The problem needs to be marched forward in time so that the matrix is not singular. What needs to be solved is:
dT/dt + div(T*rho*V) = 0. 

December 19, 2017, 05:06 

#18 
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 

December 19, 2017, 05:30 

#19 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,858
Rep Power: 73 
In discrete form, without considering BC.s, you have a system like
A.x=0 so, to avoid to get only the solution x=0 what condition do you need? 

December 19, 2017, 06:14 

#20 
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 

Tags 
central, discretization, openfoam, unboundedness, upwind 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
comparison of discretization scheme  alimea  OpenFOAM Running, Solving & CFD  0  December 14, 2017 10:42 
Temporal discretization Scheme CoEuler  vsammartano  OpenFOAM Running, Solving & CFD  0  April 12, 2016 08:06 
Discretization Scheme  dinesh  FLUENT  0  August 31, 2013 05:52 
Time discretization scheme  HaKu  Main CFD Forum  1  June 12, 2011 03:06 
MARS discretization scheme  raymond  Siemens  3  February 1, 2002 06:33 