08 May Investigating the reasons why your CFD analysis is not converging
If you are a CFD user then you definitely experienced it at least once: the simulation is not converging. Residuals, which somehow represent the error calculated in each iteration, get bigger and bigger and then you get an error. Also in CONSELF it is possible that, in some cases, your simulation does not converges towards a final solution but instead diverges. The reasons of such behaviour can be many and sometimes you feel like a detective that needs to find out who is the guilty of a crime scene. Before we begin, just relax a bit: CONSELF CFD analysis proved to be amongst the most stable. Our development team cross-checks thousands of simulations every month and, thanks to this experience, we keep improving our algorithm choices to help all our customers continuously. Unluckily the number of possible combinations is so big that a sort of manual that helps understanding the reason the analysis is diverging can definitely improve our user experience.
Situation: when a simulation is diverging? While a CFD simulation is running it is possible to have a real-time preview of the residual plot. In this plot we should see the residual going down as the iterations are proceeding. The image here reported shows a general residual plot. Don’t you note anything weird? After few hundreds iterations it seems the residuals are basically moving back to their original value and a new simulation starts. This is the expected behaviour in CONSELF: each CFD simulation is in fact made of two analysis. The first one is less accurate but more stable, the second one far more accurate but less stable. These two analysis are performed automatically in CONSELF everytime you submit a CFD step.
If your CFD analysis doesn’t have this residual behaviour it is possible you are obtaining a diverging solution and you will be reported an error. If this happens well, get ready because the investigation starts!
Hint # 1: make sure of your settings
The first error is also the most common one. Simple CFD analysis are made of at least one inlet, one outlet and a certain number of walls. First of all check out you have this boundary condition scheme in your simulation. Sometimes the error is not really the boundary condition layout but rather the input value you are using: velocity is too high, too different pressure values, very high temperature imposed … double-checking all the input data is for sure the first thing in your to-do list before moving to other possibilities.
Hint # 2: submit a new CFD step to check out the flow fields
Every CFD simulation consists of a certain number of variables to be solved. These variables are: pressure, velocity, temperature, turbulent variables, … and many others. In most cases they do not diverge simultaneously but there is one which starts before the others. And there is also a particular point of the domain from which the divergence take place. Discovering which variable and from which point of the domain the divergence starts would be really helpful in finding the solution of the problem. To discover it the trick is rather simple: submit a new CFD step for a little number of iterations and write a solution field as frequently as you can. With these data you can use Paraview to understand where the problem arise.
Hint # 3: double check your outlet boundaries
In a certain number of cases you may have fluctuating residuals even during the first order simulation. Such a behaviour, displayed in the following figures, is due to an incorrect outlet definition. The problem, to be precise, is not related to the CFD settings, but rather to the geometry definition.
The right image shows the velocity contour on a problematic outlet. It’s straight forward noting the zero velocity in most of the outlet surface. This zero velocity is due to the presence of a back-scatter flow, meaning a flow which moves inside of the domain rather than going outside. This behaviour is very unstable and causes the problem.
In order to solve this situation there is a very simple trick: define the outlet surface farther away and increase the downstream flow development zone. We must extend the domain as long as the outlet suffer because of back-scatter flow.
Hint # 4: use a different turbulence model/flow model
If you still have no glue of what is happening it might be the case to reduce the complexity of your analysis. Generally this can be done in two ways: moving to a laminar flow and use a non-compressible fluid model. Obviously the results you get are not consistent with your needs, but you might get a useful hint of what you need to change to improve your simulation stability.
Hint # 5: create a different mesh
Meshing is definitely the most critical part of any CFD simulation. The vast majority of the non-converging simulation the reason lies beneath a poor quality mesh or a low-refinement mesh. We proposed many way of analyzing your mesh quality in the past, and they surely remain valid. Probably if you have discovered the point from which the divergence takes place it might be the case to modify the refinement level in such a location.
Hint # 6: run a precursor CFD simulation
Sometimes the initialisation values are simply too far away the inlet values for a CFD simulation to converge. Well, in these cases we can run one or more precursor analysis: we start with a lower inlet value and then we submit a new analysis initialising it from it. Since v2.8.3 it has been possible to use a CFD analysis to initialise/restart a new one. Let’s take advantage of all the possibilities we are given then!
Hint # 7: modify your input geometry
We are really in a situation in which all previous suggestions failed. Probably we have to modify our geometry a bit. Remember in fact the this type of simulation needs a simplified geometry since an accurate resolution of small feature would require a huge number of cells.
CONSELF wants to make state of the art, cutting edge technology, available to every professional in the globe.
CFD and FEM simulation software is a very powerful tool, with its adoption optimization and innovation can be achieved in every field. To make this instrument accessible to everyone means lowering costs, but mainly to develop an infrastructure that favours a super-easy adoption by market new entrants.
CONSELF is highly committed and will pursue this goal working side by side with professional and industries to define the best strategies and solutions.
Ruggero Poletto – email@example.com