CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Monitor point convergence (http://www.cfd-online.com/Forums/cfx/109530-monitor-point-convergence.html)

costinruja November 20, 2012 03:21

Monitor point convergence
 
Good morning,

I am simulating flow in heated pipe.I have a monitor point inside the pipe wall (solid) and one in the fluid.

How can I set convergence criteria for these to values, let's say 0.1 deg. C between two iterations ?

evcelica November 20, 2012 10:13

That would not be a very good way to judge convergence. Your temperature solution will oscilate in the beginning, and you could easily meet this convergence criteria at the crest or trough of an oscillation, even though you are far from a real solution. Monitor imbalances instead, or use the conventional convergence criteria.

brunoc November 20, 2012 17:30

I'm yet to check version 14.5 (just released) but up until version 14.0 this feature wasn't included in CFX.

You could do that with UserFortran, though.

Cheers

evcelica November 20, 2012 22:50

Quote:

Originally Posted by brunoc (Post 393275)
I'm yet to check version 14.5 (just released) but up until version 14.0 this feature wasn't included in CFX.

You could do that with UserFortran, though.

Cheers

Why would you want to do this, its just a bad idea all around, unless you like garbage.

costinruja November 21, 2012 02:45

I am already checking the fluid point temperature graph and it seems preety smooth, it's just growing fast in the first 20-25 iterations and then the slope is decreasing, but doesn't quite reaches a flat top.So i think i could impose a convergence criteria to this.Evcelica, the simulation is steady state, not transient so the value doesn't bounce up and down.I think i can cheat this by imposing min 500 iterations for the solver and see how the curbe flattens.

Anyway, i'm still hoping this can be done the elegant way.

Thanks,
Costin

ghorrocks November 21, 2012 06:20

I agree with Erik. This sounds like a bad idea to me.

Put a convergence criteria on the imbalances. This is physically relevant and is meaningful.

brunoc November 21, 2012 07:48

Quote:

Originally Posted by evcelica (Post 393313)
Why would you want to do this, its just a bad idea all around, unless you like garbage.

Nice.

Ok, off to the long post.

Well, in lots of industrial cases when you're at early design stages you want to do lots of simulations just to get a general idea of how different variables behave. Needless to say, if you have a parametric model you can't fine tune it to a specific condition. Forget about academics, where everything has to be perfect; we're talking about industry here, where this type of thing happens all the time.

Now, normally on steady state simulations your domain will reach a steady state condition, which will cause residual levels to go down and eventually reach your tolerance, stopping the simulation. But since your model is not fine tuned, there are some cases where residual levels stop decreasing. That can be due to lots of reasons but the most common two are some type of transient behavior (vortex shedding being the most common here if you're using a small dt) and bad mesh quality on some regions.

If you're monitoring some values important to you - torque, power, delta P, mixture temperature, you name it - you will see that it will probably eventually reach a steady state solution, even if residual levels are oscillating a little over your tolerance (and yes, global imbalances will likely also be under tolerances). That means that what is keeping your results from converging is probably within a contained region. If you check the residuals in your domain, it's very likely that most of it will be under your tolerance, but since those small regions haven't reached tolerance level that keeps convergence from happening.

If the regions of high residual levels are not impacting your results, there is no reason why you should run your case for an additional 10k iterations. In fact, monitoring something important to you is just best practice; you should always monitor macroscopic values to see how your simulations is evolving.

To see if your monitored values reached steady state you have to watch how its value progresses through a number of iterations (that is why you would need UserFortran) and, if possible, also monitor if the residual levels are bouncing. If both of these conditions are true, stop the simulation and proceed to the next design point. But if you're leaving your computer running through the weekend (or even though the night) you can't do that manually. So an automatic procedure comes in handy.

About monitoring imbalance, as far as I know CFX will only monitor global imbalances, not control volume imbalances. So by monitoring imbalances only, if you bump into one of those conditions from above, your simulation might stop even though you still haven't reached steady state condition though you're entire domain.

ghorrocks November 21, 2012 18:15

The imbalances looks at the global balance of mass, momentum, heat etc.

The residuals in effect look at the accuracy of the solution of the equations at the control volume level.

I was not suggesting judging convergence on imbalances alone. Residuals are the best judge of convergence in most cases, so I was proposing judging convergence on both residuals and imbalances. Sorry if that was not clear.

BTW: I have worked in CFD in industy for 12 years now and am well aware of the need to just get it done. But this needs to be balanced with the risk of getting the wrong result. So in my experience your best chance of getting a result in a reasonable time with an acceptably low risk of beign wrong is to understand the underlying physics and set convergence parameters linked to those physics, so convergence is declared when key errors are reduced to adequate levels.

As Erik said earlier on, judging convergence on a parameter being close enough to is value last iteration means convergence will be declared when the parameter is really miles away but going over a trough.

brunoc November 21, 2012 19:49

Quote:

Originally Posted by ghorrocks (Post 393537)
As Erik said earlier on, judging convergence on a parameter being close enough to is value last iteration means convergence will be declared when the parameter is really miles away but going over a trough.

I agree, comparing values from current and last iterations alone is not only bad, it's wrong. That's is why I said you need to look at the parameters history, ie, it's values over a number of iterations and them check for stability, like its standard deviation. That's also why I said you need UserFortran for this: CFX won't let you read values from more than two iterations back. Comparing variables against their values at the previous iteration can be done directly after some tricks.

Again, I've seen lots of occasions where both imbalances and residuals (set at their standard values) are met but the problem hasn't yet reached steady state condition. But for those cases where residuals won't get below your tolerance, I think combining imbalances and monitor point convergence is the best option.


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