CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Axis on the convergence history (https://www.cfd-online.com/Forums/cfx/23646-axis-convergence-history.html)

Gary February 15, 2007 09:44

Axis on the convergence history
 
Hello,

my solution converges quite well after 35 time steps. Im assuming this does not mean there have been 35 iterations but there are several iterations per time step. Does anyone know how to find out how many iterations took place?

Thank you for your help

Gary

Shastri February 15, 2007 09:51

Re: Axis on the convergence history
 
If it was a steady state solution, it means that it indeed took only 35 iterations to converge. If this feels too incredulous to you, you might have a very coarse mesh. If you were running an unsteady simulation, for each time step it will have several iterations. The maximum number of iterations for each time steps is specified by user in CFX pre. If the solution converges (within a timestep that is) before the maximum iterations are reached, the solver goes to the next time step. The actual number of iterations for each time steps can be seen in the *.out file. And yes, I am assuming you are talking about CFX. Shastri

Gary February 15, 2007 10:32

Re: Axis on the convergence history
 
Thanks for your quick response Shastri.

Gary

Robin February 16, 2007 12:53

Re: Axis on the convergence history
 
Hi Shasti,

Actually, each timestep does comprise many sweeps on the mesh. This is the Multigrid method. Within a timestep, the solver will do a single sweep on the full mesh, then solve additional error redistribution sweeps on progressively coarser 'grids'. I put grids in quotes, but it doesn't actually re-grid or re-discretize the equations, but rather it is agglomerating the control volumes.

Basically, if you add the equations for two control volumes together, the fluxes between the control volumes cancel out, because they are equal and opposite, leaving you with the fluxes at the boundary of the agglomorated control volume and the central coefficients. Do this repeatedly and you can significantly reduce the number of equations that need to be solved. If you're smart about which control volumes to agglomorate (and CFX is), you can correct for high aspect ratio elements and improve the behavior of stiffer equations.

CFX does this automatically and the heuristics of how the code decides which control volumes to agglomorate has been fine tuned over the last 20 years. At the coarsest level, a mesh can be reduced to ~1000 control volumes at which point a direct solver can be used.

If you add together the total number of equations solved in a timestep and divide it by the number of equations in the fine grid you will get a number known as the "Work Units", i.e. the number of equivalent sweeps on the fine grid. This number is output to the OUT file for each equation class at the end at each timestep; it is the number in the 3rd column from the right.

For the mass and momentum equations, which are coupled, there is one Work Unit reported, because they are solve simultaneously, but it is divided by the number of equations in one of these equation sets. So for reference, a work unit on mass and momentum of '9.2' means that it did slightly more than 2x the work as on the fine grid for these equations, which would be 4.

So, to answer your question... Yes, CFX does do more than one sweep. This is why the timesteps take a little longer than in a segregated solver, but the result is that the equations are solved much more effectively.

If you made it this far in my response, good for you!!

Regards, Robin

P.S. Now that you know this, look at the number of work units reported at different points in the run. You should see that they are high at the start, as the solver deals with poor initial conditions, then reduce later. If the number of work units is very low, it is also an indication that the solver is dealing with the solution quite easily and you could probably get away with a larger timestep. The reverse is also true.


All times are GMT -4. The time now is 19:41.