
[Sponsors] 
February 25, 2014, 06:25 
Conservation

#1 
Senior Member
Join Date: May 2012
Posts: 137
Rep Power: 5 
Hi,
I have an incopressible code that produces correct results when compared to the literature for lid driven cavity flow. I have a few questions though: 1. When I check the continuity equation it seems that it is quite far from zero, in the order of 1e1 for the cavity flow case. Can a code produce correct results without continuity satisfied? 2. The code is transient and I am not really sure how to judge steady state conditions other than plotting the velocity in a few points. The time derivative is never zero even if the velocities do not change in the monitoring points. 3. With regards to 2. above I wonder if it is good to sum all velocities in all cells and subtract the result from a previous timestep result in order to find whether a steady state has occurred. It seems that I need to include the timestep here in some way as well since a small timestep should yield a smaller change in the flow field. Any suggestions? Thanks. =) 

February 25, 2014, 07:36 

#2  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,863
Rep Power: 25 
Quote:
1) what about your numerical formulation? Are you using an exact or approximate projection method or something different? 2) steady state is when your time derivatives vanish in some norm. Practically, you can check for the max derivative in all the points and stop when its value (normalized) is under some threshold (for example 10^4 or smaller) 3) see 2) 

February 25, 2014, 08:26 

#3  
Senior Member
Join Date: May 2012
Posts: 137
Rep Power: 5 
Quote:
1) I am not sure. I construct a Poisson equation for pressure, using the momentum equations and continuity equation, similar to the MAC formulation but without a staggered grid. 2) So I have tried the following: abs(u_oldu_new)/u_old (this seems like something I would use to determine a relative residual in a pure steadystate formulation, usually I use a convergence criteria based on lowering the initial residual by 34 orders of magnitude) (u_newu_old)/delta_t (shouldn't this converge to zero in the steadystate limit for a transient formulation?) None of the above seem to work. What type of norm do you suggest using? 

February 25, 2014, 08:44 

#4 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,863
Rep Power: 25 
MAC method require a second order discretization on staggered grid to ensure that the divergencefree constraint is satisfied up to machine precision. Differently, You have only an approximation of the order of the local truncation error.
Estimating max(unewuold)/dt must work... 

February 25, 2014, 09:30 

#5  
Senior Member
Join Date: May 2012
Posts: 137
Rep Power: 5 
Quote:
Ok I will check the criteria in my code once more. May I ask again if it is possible to get correct results without correct conservation of mass? What I mean is that when I terminate the cavity flow calculation it is very close to the solution of Ghia et al, but the continuity equation is not satisfied very well. Last edited by Simbelmynė; February 25, 2014 at 10:35. Reason: Added some files. 

February 25, 2014, 16:01 

#6 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,863
Rep Power: 25 
as you can see, the continuity error seems localized at the corners, you can check the streamlines there and control what happens.
Generally, the error in the divergence of the velocity is a source term in the kinetic energy that can produce a numerical instability. But for steady laminar flows the error is quite controlled and results can be stable 

February 25, 2014, 17:26 

#7  
Senior Member
Join Date: May 2012
Posts: 137
Rep Power: 5 
Quote:
I have rechecked the code and now the residual du/dt converges to zero at steadystate. So now I do not need the extra monitoring points to judge whether steadystate has occurred =) I think the main problem with the continuity is that I noticed that the poisson equation for pressure stalls quite quickly. If I iterate for 1 or 1000 iterations does not seem to matter the results will be the same. The timestep, however, helps in that it reduces the continuity error (lower timestep yields lower continuity error). I think I might have misformulated the poisson solver in some way (not severely enough to cause instability though). I'll see what I can come up with tomorrow. 

February 26, 2014, 07:04 

#8 
Senior Member
Join Date: May 2012
Posts: 137
Rep Power: 5 
Update:
I have added a single Dirichlet pressure point on the otherwise all Neumann wall boundary and now the Pressure Poisson solver converges without stalling (now I see the importance of fulfilling the Scarborough criteria). The current problem is that the timestep is still the most dominant factor in producing accurate results (lower yielding better results). This is confusing. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Does FEM satisfy conservation locally?  Vino  Main CFD Forum  0  January 23, 2014 15:14 
How to call the subroutine to compute two temperature energy conservation equations?  wangweizong  Phoenics  1  March 21, 2012 10:27 
lost of mass conservation  jjchristophe  FLUENT  0  June 18, 2010 05:44 
Conservation target in transient simulations  Target  CFX  12  September 25, 2006 07:20 
Mass conservation  Diego Nogueira  Main CFD Forum  1  July 30, 2004 15:50 