Hi everyone,
I am running into convergence issues with my Code_Saturne simulations where I use a CGNS mesh generated by Star-CCM+. As shown in the screenshot attached, the residuals tend to stabilise around a rather significant value (10^1 in this case, but 10^-1 in others), before eventually diverging after a couple hundred iterations. The test case where these residuals are from can be found here: https://www.dropbox.com/scl/fi/faj6qcwv ... 85le4&dl=0.
This test case simply consists of a short pipe flow without any thermal model activated, but even this simple case diverges, as with every other simulation using a Star-CCM+ mesh, though the mesh works fine when using Star-CCM+ itself (as would be expected). This leads me to believe there is something wrong either with the way I export the mesh to use in Code_Saturne, or the way Code_Saturne interacts with the mesh.
For reference, I've had to change the library version number of the CGNS meshes from Star-CCM+ from 3.4 to 3.3 using cgnsview (as described here: viewtopic.php?p=17194#p17194), before they can be used by Code_Saturne.
Convergence issues with CGNS mesh from Star-CCM+
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 16
- Joined: Sun Aug 06, 2023 3:40 am
-
- Posts: 4138
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Convergence issues with CGNS mesh from Star-CCM+
Hello,
The CGNS version detection workaround is available in v8.0, not v7.0, so with V8, you would not need to change the CGNS version.
Otherwise, the mesh export seems OK. One issue with the mesh is that you have what looks like a viscous layer at the inlet and outlet, whereas this is useful only for walls. Otherwise, this can lead to higher than necessary CFL numbers at the inlet (probably not too much of an issue) or outlet 'more risky).
The residuals are difficult to interpret, but your computation seems to diverge due to a recirculation appearing near the outlet.
So I recommend applying the "Safe mode" options described in the BPGs (https://www.code-saturne.org/documentat ... oting.html). At least using the least-squares gradient.
Another thing maybe not mentioned in the BPGs (which we need to update) which can be interesting is to use a constant pressure outlet, and/or extrude the mesh over 1 or 2 layers at the outlet (so cell orthogonality is better there, as sensitivity to this may be the cause of the recirculation).
Best regards,
Yvan
The CGNS version detection workaround is available in v8.0, not v7.0, so with V8, you would not need to change the CGNS version.
Otherwise, the mesh export seems OK. One issue with the mesh is that you have what looks like a viscous layer at the inlet and outlet, whereas this is useful only for walls. Otherwise, this can lead to higher than necessary CFL numbers at the inlet (probably not too much of an issue) or outlet 'more risky).
The residuals are difficult to interpret, but your computation seems to diverge due to a recirculation appearing near the outlet.
So I recommend applying the "Safe mode" options described in the BPGs (https://www.code-saturne.org/documentat ... oting.html). At least using the least-squares gradient.
Another thing maybe not mentioned in the BPGs (which we need to update) which can be interesting is to use a constant pressure outlet, and/or extrude the mesh over 1 or 2 layers at the outlet (so cell orthogonality is better there, as sensitivity to this may be the cause of the recirculation).
Best regards,
Yvan
-
- Posts: 16
- Joined: Sun Aug 06, 2023 3:40 am
Re: Convergence issues with CGNS mesh from Star-CCM+
Hi Yvan,
Indeed, the simulation seems to converge successfully when I use the least-squares gradient reconstruction method (test case here: https://www.dropbox.com/scl/fi/1idna0rj ... lwiwv&dl=0). However, the magnitude of the residuals still remains at about 10^0 as shown in the screenshot, rather than the 10^-3 or lower that one might expect, despite the results of the simulation appearing accurate. Would you have an idea of why that might be the case?
I can also confirm that the CGNS version number change is not the cause, I ran the cases on the latest version without changing any options and they still diverged.
Indeed, the simulation seems to converge successfully when I use the least-squares gradient reconstruction method (test case here: https://www.dropbox.com/scl/fi/1idna0rj ... lwiwv&dl=0). However, the magnitude of the residuals still remains at about 10^0 as shown in the screenshot, rather than the 10^-3 or lower that one might expect, despite the results of the simulation appearing accurate. Would you have an idea of why that might be the case?
I can also confirm that the CGNS version number change is not the cause, I ran the cases on the latest version without changing any options and they still diverged.
-
- Posts: 4138
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Convergence issues with CGNS mesh from Star-CCM+
Hello,
The residuals definition might vary from code to code, so its interpretation also. The definition used is in https://www.code-saturne.org/documentat ... utput.html, at "Analyzing the output/Checking the convergence".
Even on a "converged" computation, you may get small fluctuations. Using upwind schemes will probably stabilize this somewhat, but at the possible expense of accuracy... This will also strongly depend on the mesh and flow conditions.
Best regards,
Yvan
The residuals definition might vary from code to code, so its interpretation also. The definition used is in https://www.code-saturne.org/documentat ... utput.html, at "Analyzing the output/Checking the convergence".
Even on a "converged" computation, you may get small fluctuations. Using upwind schemes will probably stabilize this somewhat, but at the possible expense of accuracy... This will also strongly depend on the mesh and flow conditions.
Best regards,
Yvan
-
- Posts: 16
- Joined: Sun Aug 06, 2023 3:40 am
Re: Convergence issues with CGNS mesh from Star-CCM+
Hello Yvan, sorry for the late response. Thank you for pointing out the definitions of the residuals used - and that the residuals shown on the plots are that of the 'time residuals' and not the normalised ones. After discussion with my colleagues, we agreed that the residuals in our cases (that did not diverge) have actually been satisfactory.
Thanks for the help!
Thanks for the help!