CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Automated check for convergence (https://www.cfd-online.com/Forums/cfx/101341-automated-check-convergence.html)

Chander May 1, 2012 20:06

Automated check for convergence
 
Hi,

I am going to run a large number of small CFX simulations for a parametric study (about 200 of them).
Now I run my CFX simulations on a cluster and I always check if simulation did reach convergence before the cluster stops the run and makes the result file. This is because the simulation stops either when it is actually converged or when the total time limit of the run is reached. In the latter case, the simulation has to be restarted with the current result file as initial condition.
So, when my simulation is completed, I open the .out file and make sure that it did reach convergence before being stopped by the cluster.
Now I am looking for a way to automate this check for convergence so that I do not have to individually open each of the 200 .out files to check the convergence.
Any ideas?

Thanks!
Chander

ghorrocks May 2, 2012 00:51

So why don't you just extend the total time limit and give it extra time to get to convergence? Then you do not have to check whether it converged or not.

Chander May 2, 2012 12:13

Indeed I can do that.
But sometimes, the simulation still exceeds the extra cluster time also.

Anyway, I think I have solved the issue partially.
I will ask CFX to save residual values in result file. Then using those values I will calculate , for each result file, rms residual for each dependent variable. For example, for velocity V, I can find rms V momentum residual as :

sqrt((sum(V Mom Domain 1.Residual^2)@Domain 1 + sum(V Mom Domain 2.Residual^2)@Domain 2)/(count()@Domain 1+count()@ Domain 2))

where Domain 1 and Domain 2 are two fluid domains in simulation. By this I get a value that is close to the one reported in .out file in last iteration. And this can be easily done via a script.

However, I still do not know how I can check for conservation imbalance for different quantities. I tried to work it out but my calculation was far away from the value reported in .out file. The .out file reports Domain imbalance for various quantities , both actual value and a percentage imbalance ( and this percentage imbalance for each quantity should be less than the conservation target specified in CFX pre for the simulation to stop, along with the residual criteria being satisfied). I am wondering, that when CFX states Domain imbalance in percentage, then what does it mean, I mean percentage of what quantity?
And how can I calculate it myself from result file.

However, the easiest way would be , if I could get the CFX solver to save the rms residual and domain imbalance values in a separate file when convergence is reached.

ghorrocks May 2, 2012 18:07

You can get the solver manager to display imbalances as well.

But again - why not simply put a really long total time so it has all the time it needs to reach convergence? And if you also need the imbalances for convergence then add them as a convergence critereon as well. I see no reason for the convergence checker you are proposing.


All times are GMT -4. The time now is 12:16.