
[Sponsors] 
October 18, 2016, 02:24 
better convergence in final residulas

#161 
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 15 
Dear all,
I have checked the log file and I knew that the final residuals for Ux, Uy, Uz , k and p are much better. The ones that I've reported in the last post were initial residuals. The final ones are as following: Ux, Uy and Uz ~ O(10^6) p~ O(10^5) in first loop and p~O(10^10) in the second loop of correction k~ O(10^6) Is there any way to plot the final residuals instead of initial ones? Cheers, Elham 

October 18, 2016, 07:04 

#162  
Senior Member
Timofey Mukha
Join Date: Mar 2012
Location: Stockholm, Sweden
Posts: 118
Rep Power: 13 
Quote:
In principle, the higher the order of the statistics you want, the longer it takes to converge them. I've never used any formal criteria but relied on just seening that things "don't change anymore". One thing you can look at is the behvaiour of the average (in space) u_\tau. Mostly this is useful for looking whether the initial transients have been flushed out. These can affect the average for a long time, so you should restart the simulation at that point and only then start the field averaging. If 4.5 sec is 15 flowthrough times, it is a bit surpising that you get the same profile after 0.5 sec  seems way too fast for convergence. The results in the figure you attach don't look too good either. Maybe you can upoad the case to Dropbox, I might have some time to take a quick look at it. Best, Timofey 

October 18, 2016, 07:07 

#163  
Senior Member
Timofey Mukha
Join Date: Mar 2012
Location: Stockholm, Sweden
Posts: 118
Rep Power: 13 
Quote:
You should definitely be able to plot the residuals. If nothing else works, you can use PyFoam, it allows you to plot everything you see in the logfile by specifying a regular expression. Takes some time to get a hang of it, but it is worth it. Best, Timofey 

October 27, 2016, 22:17 
Cannot get to Timofey results

#164 
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 15 
Dear Timofey,
Since I couldn't get to my desired Retau with a very small channel area, I run the channel that you have used with all your settings including the channel size, mesh, solvers,... But after more than 12000 sec I still could not get to Reb=13300 and Retau=395. My results with M2 mesh of your case are as followings: Reb=15072 yPlus1=4.27 Retau=1764 delxPlus=88 delzPlus=58 What is your idea about my case. I have read your report "Large_Eddy Simulation of Turbulent Channel Flow" and set everything like yours. Cheers, Elham 

October 28, 2016, 06:15 

#165  
Senior Member
Timofey Mukha
Join Date: Mar 2012
Location: Stockholm, Sweden
Posts: 118
Rep Power: 13 
Quote:
I don't know, it is hard to tell just like that. The thing is that Reb is enforced by the solver, since you prescribe Ub, delta and nu as input parameters, so that should really not be off whatever else happens . You should get 13350! Best, Timofey 

October 31, 2016, 02:36 
My global coordinate plot

#166 
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 15 
Dear Timofey,
By reading your report carefully, I understood that your Uc which is the centre line velocity is very near to mine, let's say, 0.1497 comparing to yours 0.15210, consequently our Re_c are near. by using your yPlus function that you have used in controlDict and calculating utau, my utau is 0.0066 and yours is 0.00746. My results are based on averaging after 50 flow through (channel width over ub) and until 20000 sec. My first yplus is 0.7371 and I have more than 10 cells in y+<5. 1. I suppose your Ub is based on your initial settings and you didn't read it anymore, I am right? My u versus y in global coordinate when I put u_c for yaxis (ave(streamwise u)/0.1335) is much near to DNS rather than (ave(streamwise u)/u_c). 2. What is your idea about my results? Is it correct to put yaxis (ave(streamwise u)/0.1335) for global coordinates plot? I have attached my results based on yaxis (ave(streamwise u)/0.1335) for global coordinates plot. Thanks for your kind attention. Cheers, Elham 

October 31, 2016, 13:01 

#167  
Senior Member
Timofey Mukha
Join Date: Mar 2012
Location: Stockholm, Sweden
Posts: 118
Rep Power: 13 
Quote:
Ub is enforced by the solver by a varying pressure gradient. So whatever value you put in fvOptions should be enforced and your Re_b should be very accurate. Yes, scaling with U_b is common practice when plotting in outer coordinates. Your result is a bit weird since you have some jiggling in the core of the channel. Both for the line and the stars  I don't know which represent ehat though. 

October 31, 2016, 20:30 

#168 
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 15 
Dear Timofe,
The star data are the DNS ones. Sorry I forgot to mention that. The jiggling may be because of the lack of enough points of probe. Thanks for all your helps. Cheers, Elham 

November 2, 2016, 05:23 

#169 
Member
Darko Radenkovic
Join Date: Oct 2015
Posts: 38
Rep Power: 9 
Timofey,
I see now that you replied to my question about ten days ago. In the meantime, I solved problem. Instead of larger domain from my above post, I used smaller part of domain (similar approach was in Eugen's PhD, page 162), with dimensions 140 mm x 35 mm x 52.5 mm. Comparing to my above case, mesh was much finer. Flow through time was around 200. Here is velocity comparison https://www.dropbox.com/s/vpzz8rlaud4rug6/LogLawComparison.eps?dl=0 Thank you for replying. Regards, Darko 

November 2, 2016, 05:49 

#170 
Member
Darko Radenkovic
Join Date: Oct 2015
Posts: 38
Rep Power: 9 
If we say, that 200 flow through times, if we use postChannel utility, is enough for obtaining converged velocity profile in channel (i.e velocity profile that is symmetric with very negligible differences, which can be a criterion, as I read somewhere), how many time steps is expected in order to obtain converged twopoint velocity correlations?
I ask this because I think that twopoint correlations that I have calculated are still time  dependent or I have error in Matlab code. Here is complete Matlab code and all necessary data, so that anybody can run program. https://www.dropbox.com/s/cdc9w5aa63...tions.zip?dl=0 Velocity in channel is 20 m/s. Dimensions of channel are 140 mm x 35 mm x 52.5 mm. If I forgot something important to say, please ask. Regards, Darko 

November 9, 2016, 21:41 
Co number effect

#171  
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 15 
Quote:
Dear Cedric, Would you please let me know why you kept Co number less than 0.4? Is it based on your own experience and cause better results? I had a relatively good results with rough mesh but not with a finer mesh. The time steps for both of them were the same. Is it because of the time step? Co number for the finer mesh is about 1.0. Cheers, Elham 

November 10, 2016, 02:49 

#172 
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 16 
Elham,
Well, as you can see on the forum, I ran these calculations in 2008 (with an old version of OpenFOAM) so .... I don't remember every settings. What I remember is that if I increased the CFL to much, calculation crashed (which make sence). 0.4 was kind of optimum for my case. The size of your mesh and your timestep (if it has been fixed) give you the CFL. If you refine your mesh and you keep the same timestep, you'll get a higher CFL value. Why don't you reduce the time step in such a way that the same CFL is used in both calculations ? What are your results for coarse and fine mesh ? could you give us more details on these meshes ? Cédric 

November 10, 2016, 05:04 

#173  
Senior Member
Timofey Mukha
Join Date: Mar 2012
Location: Stockholm, Sweden
Posts: 118
Rep Power: 13 
Quote:
Also, protip  to know what timestep to pick for a certain CFL you can use the adjustableTimeStep option during the simulation phase where you dump the transients. Then, you can check out the max timestep you had in the log and use that as a constant timestep value in the part of the simulation where you collect the statistics. 

November 10, 2016, 20:42 

#174  
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 15 
Quote:
Thanks. Elham 

November 14, 2016, 03:09 
my case and DNS result are so different

#175 
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 15 
Dear all,
My results for Re_tau=330, target Re_tau=395, with 5 cells in y+<5 and the first y+=0.73 and Re_b=13350 has been attached. As you see the profile in global coordinate is near to DNS results but in wall coordinate is so far from DNS. I suppose I am doing something wrong in drawing the plots. I let the flow to pass around 90 flow throughs and then averaged just for 8 flow throughs. I know the averaging time is not enough but the difference between DNS results and mine is so big that I think the problem will exist after passing more and more time. I would appreciate if anyone can give me some clues. PS: The problem may be come from the spatial averaging as I just do time averaging in a specified plane and no spatial averaging. If I want to use fieldAverage function in ControlDict, I need to keep data of every time step which demands high storage capacity. Cheers, Elham 

November 14, 2016, 12:57 

#176 
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 272
Rep Power: 17 
Elham,
How are you calculating the wall shear stress? It seems your wall scaled plots are off by a scale, use wallGradU utility to read the velocity gradient at the wall rather than calculating it by matlab or anything else. 

November 18, 2016, 02:43 

#177 
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 15 
Dear Mahdi,
I calculated utau by means of wallGradU and wallShearStress utility but the big gap between mine and DNS exists. Actually, the utau in all of the methods are nearly the same. You can have a look at my calculation process. I will appreciate if you can correct me: yPlus=dist()/nu*sqrt((nu+nuSgs)*mag(snGrad(U))) %in controlDict (Timofey code)) yPlus1=time_averaged of yPlus Y1=dist() % in controlDict utau=yPlus1(:,2)*nu/Y1; Cheers, Elham 

November 18, 2016, 05:49 

#178  
Senior Member
Timofey Mukha
Join Date: Mar 2012
Location: Stockholm, Sweden
Posts: 118
Rep Power: 13 
Quote:
Best, Timofey 

November 18, 2016, 07:59 

#179 
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 16 
Elham,
What is U in your yPlus calculation ? instanteneous or averaged velocity ? Have you try to calculated utau from the averaged velocity profiles you send us ? I mean from the mean velocity profile you can calculate tauw from tauw you get utau. Is this value coherent with the one you already have ? Cedric 

November 20, 2016, 21:01 

#180  
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 15 
Quote:
When I use fieldAverage to have UMean in each outputTime, I just have UMean in the outputTime directory. So I need to keep output time directory which is demands big memory space. 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Pressure inlet boundary conditions for open channel flows  jack2000  OpenFOAM Running, Solving & CFD  5  December 6, 2018 11:00 
LES In Turbulent in channel flow  pankaj saha  Main CFD Forum  18  November 20, 2014 05:49 
LES In Turbulent in channel flow  pankaj saha  Main CFD Forum  8  April 15, 2009 11:34 
Turbulent channel flow  roberthino  OpenFOAM Running, Solving & CFD  5  August 15, 2007 08:35 
Bc for turbulent channel flow  roberthino  OpenFOAM Running, Solving & CFD  0  August 13, 2007 08:12 