CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to show the steps/iterations (https://www.cfd-online.com/Forums/openfoam-solving/63004-how-show-steps-iterations.html)

fightingfalcon23 March 25, 2009 11:55

How to show the steps/iterations
 
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 :o

Greatings
Sebastian

gschaider March 26, 2009 04:43

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

fightingfalcon23 April 15, 2009 09:56

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.

gschaider April 15, 2009 13:28

Hi!

Quote:

Originally Posted by fightingfalcon23 (Post 213003)
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 (Post 213003)
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

fightingfalcon23 April 15, 2009 14:42

1 Attachment(s)
Thanks again! I'm from Munich, but cheered for Barcelona, too :D.
Back to topic:

I found some pictures, where you can see , what i am looking for. For example in this thread:

http://www.cfd-online.com/Forums/ope...implefoam.html

There you can see the following image. Does anybody know, how to create such graphs?

CU
fightingfalcon

gschaider April 16, 2009 08:59

Quote:

Originally Posted by fightingfalcon23 (Post 213048)
Thanks again! I'm from Munich, but cheered for Barcelona, too :D.

Ah. 1860 ;)
Quote:

Originally Posted by fightingfalcon23 (Post 213048)
Back to topic:

Right. Sorry to all those not from the area
Quote:

Originally Posted by fightingfalcon23 (Post 213048)
I found some pictures, where you can see , what i am looking for. For example in this thread:

http://www.cfd-online.com/Forums/ope...implefoam.html

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

fightingfalcon23 April 17, 2009 04:25

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 April 17, 2009 04:26

1 Attachment(s)
Oh.... here's the picture:

gwierink April 19, 2009 01:41

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

wolle1982 April 30, 2009 09:09

To plot the residuals on-the-fly on screen graphically, I wrote a short tutorial.

See thread http://www.cfd-online.com/Forums/ope...residuals.html


All times are GMT -4. The time now is 11:13.