This week in the Volupe blog we would like to discuss settings for the coupled solver. From our customers we have got the feedback that the coupled solver is needing a lot of manual set up, and that it can be difficult setting up a simulation that provide results which agree with expected values. We would therefore like to provide some information about how the coupled solver works, and also inform about two features that might help you in your simulations – Continuity convergence accelerator and Automatic CFL method. See the picture below for where in the tree structure to modify the solver settings for the coupled solver.
What it the Coupled solver?
The coupled solver solves the governing equations for your flow field as a system where all equations are coupled to each other and solved simultaneously. The opposite technique is called segregated solver, which solves the equations separately and provides information between equations after the iteration is completed. Compared to the segregated solver the coupled solver might be slower per iteration, but the iterations needed to converge the simulation might be fewer. The coupled solver should be used when you simulation involves stiff equations, meaning that a small change of the input gives a huge change in the solution. Compressible flow is an example of an application where to use the coupled solver.
The coupled solver uses a pseudo-time marching approach, which is utilized in different ways depending on which time dependency is used in the simulation.
- Steady: An unsteady form of the governing equations is driven towards a steady state with a pseudo-transient term which goes to zero. This pseudo-transient term uses an optimized pseudo-time step which is computed to satisfy stability constrains.
- Implicit unsteady: For the inner iterations inside of a physical time step a pseudo-time step is used, which is optimized based on the Courant number.
- Explicit unsteady: Here the actual time-step is determined to fulfill the criterion that the Courant number needs to be below one in every cell.
All together the coupled solver is robust. Simulations with dominant source terms, for example rotational flow, is solved with much more robustness than if the segregated solver would have been used. The linear scaling of CPU time versus mesh size is also a strong property of this robust solver, since no loss in solver time is added when refining the mesh.
CCA – continuity convergence accelerator
When using the coupled solver, you are probably simulating high speed compressible flow. The convergence for this type of simulation can be quite slow due to mass imbalance. There is a method in Simcenter STAR-CCM+ to speed up these computations which is called CCA (continuity convergence accelerator). This method is adding additional equations to minimize the mass imbalance for each individual cell at each iteration. CCA formulates and solves a pressure-correction equation using the density-based/Riemann flux discretization. This discretization is a mathematical transformation that can be used on a conservation equation system to speed up the solving time. The mathematical transformation uses Riemann invariants to narrow down the possible solutions to follow certain behaviors. In our case CCA uses the assumption of a calorically perfect gas, meaning that the ideal-gas law is fulfilled together with that the specific heat is constant. This is good assumptions for ideal perfect gas with Mach number below three. If these assumptions are applicable in your simulation, you can use this feature to speed up your simulations and still obtain the same results that you would end up with without using CCA, but quicker.
Note: CCA should be used only when mass imbalance is slow, this is not a solution to solve other problems in your simulation.
Automatic CFL as CFL control method
In Simcenter STAR-CCM+ version 2020.1 the automatic CFL control method for the coupled solver was introduced. Previous the Expert driver settings were recommended to use, but automatic CFL is more user friendly and also controls the simulation to save time together with resulting in a more accurate solution (up to 23% speedup was mentioned in the release notes of version 2020.1). With the release of version 2020.1 the Automatic CFL method was set as default for steady simulations. In the past one and a half year the speedup has been increase even further, up to 1.45x in version 2020.2 and the default settings inside the method have also been improved in version 2021.1 and 2021.3.
For time dependent solutions with implicit method the coupled solver uses a constant value of CFL equal to 50 as default setting. In the documentation it is stated that this value should be changed in most simulations, to a value of 1’000 or even up to 100’000. There would be much less risk of using unwanted settings in the solver if the default value of how to treat CFL method would be the same regardless time dependencies. Especially when there is an automatic control which seem to be a much better setting in most cases.
Note: Please choose your simulation settings with care, and check if the default settings are the best for your simulation. Sometimes neither the default nor the most convenient setting is the correct one for you. It can then be worth investigating if a constant CFL of the value 1 is needed for your problem statement – but that might come together with refining the mesh and time step which demands more computational resources.
Comparison for simulations with different solver settings
To see the actual benefit of the Automatic CFL method and CCA I created a simple test case. The test case is visualized below, where air (ideal gas) is pumped into a closed box at atmospheric pressure.
Since there is no outlet in the simulation, I expect the pressure to rise in the domain. In the plot below you see the pressure increase for six simulations. In these six simulations I run automatic CFL, the default value 50 for a constant CFL and a constant CFL value of 10000, for these three setups I run with and without the CCA.
In the plot you can see that the CCA is improving accuracy of the results, especially compared to the default value of constant CFL equal to 50. Using automatic CFL seem to get you closer to a linear increase in pressure, but not as close as if you are using a high CFL number (the CFL number in my test case is above 50). The combination of automatic CFL and CCA seem to help providing expected results, and therefore it can at least be good to know about these features when calculating simulations with the coupled solver. The computational time needed for the simulations with CCA and automatic CFL where not increased even though a more accurate solution was obtained. Without these features we would have needed a finer time step and therefore longer simulation time, to obtain a more accurate solution.
Note: The test case is not resolved enough in terms of mesh settings, which give rise to mass imbalance and therefore running with CCA is much better than without. Since the test case have high CFL number running with a higher CFL value seem to be better than with a low or automatic value for the CFL method.
We at Volupe hopes that this blog post has been informative and that it will help you in your simulations using the coupled solver. If you have any comments or questions, please reach out to us at firstname.lastname@example.org.
Related to this blog post I have also created a discussion at the PLM community (IdeaStorm). If you would like to have automatic CFL as the default CFL control method, you can vote for the idea (like the idea at the community) via this link. We also would like to encourage you to post your own ideas at the community, to be a part of the development of the software.
Christoffer Johansson, M.Sc.