CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   STAR-CCM+ Stopping simulations after residuals convergence (https://www.cfd-online.com/Forums/star-ccm/207023-star-ccm-stopping-simulations-after-residuals-convergence.html)

skhan547 September 21, 2018 18:46

STAR-CCM+ Stopping simulations after residuals convergence
 
Hi all,

I've been wondering how to stop a simulation based on residuals convergence.

When I've got MATLAB models, I usually exit my numerical analysis when error hits a predetermined lower limits, such as 1e-4. The only thing I've found built into STAR-CCM+ is the 'Stopping Criteria', which seems to be based off number of iterations. I want to optimise here, and not run more iterations than needed.

I'm proficient at writing macros, so if there's anything in the API you'd like to point me to, I'd appreciate the reference.

Thanks!

me3840 September 21, 2018 23:41

There are stopping criterion you can add from the residuals. Right click the stopping criterion folder in the tree. Then add one based on a monitor. A monitor exists for all residuals.


Though I will add deciding convergence on residuals alone is not a good idea. You should be monitoring engineering quantities and ensure they converge as well.

skhan547 September 22, 2018 00:20

Thanks for the help, that worked great for what I wanted!

However, I thought that convergence of engineering quantities was proportionally reflected in the convergence of error (ie, residuals). I may have a flawed understanding of residuals then; will try and do more reading.

me3840 September 22, 2018 00:51

The residuals are just one measure of convergence. The value you get is just a volume weighted average of sorts of all residuals in the domain. I'm sure you can imagine several ways such a value can fool you. In academic problems it can be easier to actually get them to machine zero, but for engineering problems this is often impossible. They may just flatline or oscillate about a low value as the linear solver struggles to reduce error further. Many times this would make evaluation of convergence ambiguous without another quantity to measure.

It may or may not be true for your problem, but I would encourage you to monitor both and find out. Ideally you should have a mix of important localized values (probes in a shear layer or expected area of instability, for example) and integrated quantities (drag, nusselt number, mass flow rate in a passage, etc). Monitor a few and see what happens on different cases, you may find yourself surprised.


All times are GMT -4. The time now is 22:29.