CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   divergence handling (

niklas February 2, 2010 07:25

divergence handling
Im working with ANSA and morphing and have written some scripts to do DOE's for geometry optimization using simpleFoam.
It works well...when it works.

There is a feature that I'd like to add though.
When simpleFoam diverges there is no way to tell at the moment.
There are alot of runs that just produces a number (pressure-drop) and for now
I am blindy trusting these number, hoping that it was obtained from a converged result.

What I would like to have is some feature that gives me some sort of feedback if the run didnt converge.

I was thinking along the lines of checking the residuals of the variables and if it is larger than some
given value to just abort the run and write an empty file called .diverged...or something.

Has anyone done anything on this or have any ideas on how I should go about it?


hjasak February 3, 2010 05:52

Yes: write yourself a little function object which will extract the data from the solver that indicates the run is healthy. I would suggest min/max pressure and velocity, maybe a pressure drop (you know what would be reasonable).


niklas February 3, 2010 08:18

Thanks, that sounds like a good idea :)

All times are GMT -4. The time now is 21:31.