Time to reach steady state for cavity flow?
Hi,
I've been testing my NS code for different Re of cavity flow. My range is from 100 to 10000 (as Ghia's) Since mine is a transient solver, I'm not sure when I should stop. It seems that as Re increase, the nondimensional time to reach steady state also increases. Is that so? Is there any recommended time for different values of Re? Also, my u,v results compared to Ghia's is about 5% difference. Is that acceptable? I'm using a 2nd order projection mtd. Thanks alot! 
Re: Time to reach steady state for cavity flow?
For each Re, at different time u will be the converged solution. so You can check for the rms error in the previous and current time step velocities (say rmsU, rmsV, rmsW) and then find out the maximum error: rms_max(rmsU,rmsV,rmsV) check if (rms_max/dt) > tolerance I kept the tolerance as 1e6 and got the approximately same values as Ghia et al. I think 5% is acceptable.

Re: Time to reach steady state for cavity flow?
I am unable to accept that 5%, because when I talked to some gurus I was told that <1% deviation may be accepted.It is not the time, it is acceptable error level which determines the convergence.nondim residue of continuity eqn (Patankar's b) <1e04 is recommended by Spalding.with increased Re, at the top of the driven cavity the diffusion becomes too low and as a result the convection is to be arrested. a refined grid helps. but if you follow uniform gridding, better to consider some different discretisation for the convection term.

Re: Time to reach steady state for cavity flow?
To really answer your question, I'd suggest you experiment with different times, different mesh densities, etc. Keep track of the convergence parameters, tabulate them, and try to draw your own conclusions.
The driven cavity is not a 'real' flow, but it's a very good problem to build your intuition or 'feel' for how your code works. You need to do this problem enough different ways that you can decide for yourself what's 'good enough.' 
Re: Time to reach steady state for cavity flow?
hi ramp,
just to confirm, is the rms error formula = sqrt( sum(u(new)^2u(old)^2)/n ) ? i'll then get 1 rms error value each for u,v,w. Then the largest of these 3 values will be the rms_max and rms_max/dt must be < 1e6 to stop the run. Is that correct? Thanks! 
Re: Time to reach steady state for cavity flow?
Yes Quarkz, Its correct.

Re: Time to reach steady state for cavity flow?
hi,
just to confirm again, is it sqrt( sum(u(new)^2u(old)^2)/n ) or sqrt( sum((u(new)u(old))^2)/n ) thanks again 
Re: Time to reach steady state for cavity flow?
Hi Quarkz, Its second one... I am making it more clear
rms_u=(U_newU_old)^2 rms_v=(V_newW_old)^2 rms_w=(W_newW_old)^2 N=Ni*Nj*Nk err_u=sqrt(sum of rms_u/N) err_v=sqrt(sum of rms_v/N) err_w=sqrt(sum of rms_w/N) max_rms=maximum of (err_u,err_v,err_w)/dt  Check for convergence  If max_rms < 1.0e6 > STOP Have a nice time..... ramp 
Re: Time to reach steady state for cavity flow?
Hi,
thank you so much! 
All times are GMT 4. The time now is 14:22. 