
[Sponsors] 
March 25, 2009, 12:55 
How to show the steps/iterations

#1 
Member
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9 
Hi every one,
it's a quite short questions: I am working with OpenFoam and pyFoam. How can i see the number of actual iterations. In the shell and the PyFoamplots I can only see the time, not the steps or the iterations. In the other threads i found a lot of plot with the iterations/steps on the xaxis. A lot of words for a short questions Greatings Sebastian 

March 26, 2009, 05:43 

#2 
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,920
Rep Power: 41 
A short answer for a short question: Almost all PyFoamUtilities have a helpoption. That will answer your question. And if the withxxoptions are not sufficient for you you can always define customplots using custom or regexp


April 15, 2009, 09:56 

#3 
Member
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9 
Thanks gschaider (bavarian?) and sorry for the late answer.
I used the helpfunction of pyfoam and it's possible to plot the iterations of the timesteps. But i want to plot for example the residuals in a graph which shows the iterations an the xaxis and not the the time. So at the and i want to see a graph, that shows the complete number of iterations ( for example 10000) and the gradient of the residuals. 

April 15, 2009, 13:28 

#4  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,920
Rep Power: 41 
Hi!
Quote:
Quote:
Time = 1 , Initial residual = 1, Iterations = 12 Time = 2 , Initial residual = 0.8, Iterations = 13 Time = 3 , Initial residual = 0.69, Iterations = 10 Time = 4 , Initial residual = 0.53, Iterations = 9 The you want to plot this data: it = 0 , res = 1 it = 12, res = 0.8 it = 25, res = 0.69 it = 35, res = 0.53 (Residual as a function of the total amount of iterations). No. Sorry. pyFoam can't do that. The best guess would be to use the write option an then read (using excel, Perl, Python, origin, ....whatever) the resulting data files and do the calculation with that tool Bernhard PS: Maybe s subclass of the LogLineAnalyzerclass could also do the trick, but that is more work 

April 15, 2009, 14:42 

#5 
Member
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9 
Thanks again! I'm from Munich, but cheered for Barcelona, too .
Back to topic: I found some pictures, where you can see , what i am looking for. For example in this thread: Strange Velocity in impeller of MRFSimpleFOAM There you can see the following image. Does anybody know, how to create such graphs? CU fightingfalcon 

April 16, 2009, 08:59 

#6  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,920
Rep Power: 41 
Quote:
Right. Sorry to all those not from the area Quote:
If you want iterations of a(!) linear solver on the xaxis then you'll have to go with the advice from above Or did I completely miss the point? Bernhard 

April 17, 2009, 04:25 

#7 
Member
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9 
I think you're right, but I am too new to CFD and OpenFoam! So thank you for your patience!
Is there a difference between steadystate simulation and simulation over a certain time? I'm using rhoTurbFoam for an unsteady case. So I see the Time on the Xaxis like shown on the picture. I hope, I'm begining to understand. Thanks a lot Sebastian 

April 17, 2009, 04:26 

#8 
Member
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9 
Oh.... here's the picture:


April 19, 2009, 01:41 

#9 
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 10 
Hi Sebastian,
Yes, there is a difference between steadystate and transient cases. The steadystate case tries to solve for a steadystate solution of the system, i.e. what it would look like after a long time of running. The transient, or time dependent, case solves for actual time, so you can see the time evolution of the system you're dealing with. That is why the steadystate case shows iteration steps (iterations toward steadystate) and the transient case shows actual time steps of the system (although every time step is also iterated of course ). Or is this not what you meant to ask? Regards, Gijs 

April 30, 2009, 09:09 

#10 
Senior Member
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 10 
To plot the residuals onthefly on screen graphically, I wrote a short tutorial.
See thread Tutorial of how to plot residuals ! 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to show part of the geometry.  gab  FLUENT  1  September 15, 2007 20:16 
Defined Variable does not show  Meri  CFX  3  August 30, 2004 10:16 
cannot show the contour pic  arwang  FLUENT  2  May 10, 2004 09:45 
Show time per iteration  Rogier van Nalta  FLUENT  2  April 20, 2004 11:39 
In a swirl flow, how to show tangetial velocity  Wang  FLUENT  1  October 27, 2000 03:59 