CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

How to show the steps/iterations

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 25, 2009, 12:55
Default How to show the steps/iterations
  #1
Member
 
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9
fightingfalcon23 is on a distinguished road
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 PyFoam-plots 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 x-axis.

A lot of words for a short questions

Greatings
Sebastian
fightingfalcon23 is offline   Reply With Quote

Old   March 26, 2009, 05:43
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,934
Rep Power: 41
gschaider will become famous soon enoughgschaider will become famous soon enough
A short answer for a short question: Almost all PyFoam-Utilities have a --help-option. That will answer your question. And if the --with-xx-options are not sufficient for you you can always define custom-plots using --custom or --regexp
gschaider is offline   Reply With Quote

Old   April 15, 2009, 09:56
Default
  #3
Member
 
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9
fightingfalcon23 is on a distinguished road
Thanks gschaider (bavarian?) and sorry for the late answer.

I used the help-function 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 x-axis 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.
fightingfalcon23 is offline   Reply With Quote

Old   April 15, 2009, 13:28
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,934
Rep Power: 41
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi!

Quote:
Originally Posted by fightingfalcon23 View Post
Thanks gschaider (bavarian?) and sorry for the late answer.
No. Not Bavarian. Austrian. Language is similar, but WE cheered for Barcelona this week. SCNR

Quote:
Originally Posted by fightingfalcon23 View Post
I used the help-function 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 x-axis 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.
You mean you want the accumulated number of iterations as the x-axis? So if for instance simpleFoam gives these iterations for p (the other question is of course: iterations of which solver)

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 LogLineAnalyzer-class could also do the trick, but that is more work
gschaider is offline   Reply With Quote

Old   April 15, 2009, 14:42
Default
  #5
Member
 
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9
fightingfalcon23 is on a distinguished road
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
Attached Images
File Type: jpg 7302.jpg (31.5 KB, 21 views)
fightingfalcon23 is offline   Reply With Quote

Old   April 16, 2009, 08:59
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,934
Rep Power: 41
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by fightingfalcon23 View Post
Thanks again! I'm from Munich, but cheered for Barcelona, too .
Ah. 1860
Quote:
Originally Posted by fightingfalcon23 View Post
Back to topic:
Right. Sorry to all those not from the area
Quote:
Originally Posted by fightingfalcon23 View Post
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
Again: on the x-axis: Are these iterations of the solver? Then this is what the usual residuals-graph is displaying anyway (it's just called Time and the scaling is different - but logarithmic)
If you want iterations of a(!) linear solver on the x-axis then you'll have to go with the advice from above

Or did I completely miss the point?

Bernhard
gschaider is offline   Reply With Quote

Old   April 17, 2009, 04:25
Default
  #7
Member
 
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9
fightingfalcon23 is on a distinguished road
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 steady-state simulation and simulation over a certain time? I'm using rhoTurbFoam for an unsteady case. So I see the Time on the X-axis like shown on the picture. I hope, I'm begining to understand.

Thanks a lot
Sebastian
fightingfalcon23 is offline   Reply With Quote

Old   April 17, 2009, 04:26
Default
  #8
Member
 
Sebastian
Join Date: Mar 2009
Location: Munich, Germany
Posts: 30
Rep Power: 9
fightingfalcon23 is on a distinguished road
Oh.... here's the picture:
Attached Images
File Type: png Residuen.png (9.5 KB, 13 views)
fightingfalcon23 is offline   Reply With Quote

Old   April 19, 2009, 01:41
Default
  #9
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 10
gwierink is on a distinguished road
Hi Sebastian,

Yes, there is a difference between steady-state and transient cases. The steady-state case tries to solve for a steady-state 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 steady-state case shows iteration steps (iterations toward steady-state) 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
gwierink is offline   Reply With Quote

Old   April 30, 2009, 09:09
Default
  #10
Senior Member
 
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 10
wolle1982 is on a distinguished road
To plot the residuals on-the-fly on screen graphically, I wrote a short tutorial.

See thread Tutorial of how to plot residuals !
wolle1982 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 09:02.