CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   CFX4.4 - mass residuals in 2D? (

Novak Elliott August 19, 2003 23:20

CFX4.4 - mass residuals in 2D?
Hi all,

In CFX4.4 the mass residuals are dimensioned; i.e. they have units of kg/sec. In 3D problems the choice of what value to converge on can be calculated from the mass flux in the model. However, what about in 2D? In theory a 2D flow has no volume and hence no mass. Does CFX4 non-dimensionalise the mass residuals in for 2D problems? If so, how?

I realise that a 2D problem is actually a 3D grid that is only one cell thick but it doesn't make sense for the residual values to have dimensions since that would imply that the thickness of the cells affects the quantity of mass leaked and the accuracy of the solution.

I believe in CFX5 the 2D mass tolerances are indeed non-dimensional but I cannot find information on this in version 4.

Can anyone clarrify this issue?

cheers, Novak.

jeff September 12, 2003 23:31

Re: CFX4.4 - mass residuals in 2D?
Yep, you're right!

The mass flow in a 2D CFX-4 model takes into account the "thickness" of the model in the Z-direction. (Set a fixed velocity and then double the thickness of the model in the Z-direction and you get twice the mass flow of the single thickness model).

The residual is then based on the total mass flow. It's no different than a 3D model, you simply want the residual to end up at some fraction (say 0.1% or less) of the total mass flow which is printed in the output file.

Hope this helps, Jeff

Novak Elliott September 15, 2003 08:03

Re: CFX4.4 - mass residuals in 2D?

And I verified this by making two models, one being 100 times thicker in the z direction. To achieve convergence in the same number of iterations I had to set the mass residual tolerance to be 100 times larger for the thicker model.

Ok, now for a more general question. What if the solution appears to be invariant at a mass residual tolerance that is significantly large in comparison to the total mass flux of the model? i.e. of the same order. Physically this doesn't make sense but thats what the numerics are telling me. Does the fact that the solver is really only solving a 2d (/psuedo 3d) problem have any bearing on this?


Jeff September 16, 2003 22:09

Re: CFX4.4 - mass residuals in 2D?
I don't think so. However, it can happen that there is a very localized area in the model where there are large residuals (like in a badly gridded area or a high vorticity area with too coarse a grid). Even though the rest of the solution is converged nicely, this small area can generate large enough residuals to make the overall solution appear unconverged.

You can check this by adding a graphical scalar (end ch. 2 or 3 in the manual I think) to store the MASS RESIDUAL (check the exact syntax). Then in the post processor, you can see exactly where these very large residuals are comming from and fix that area of the grid. If all the residuals are more or less uniformly bad across the domain, then it's something else.


Novak Elliott September 16, 2003 23:55

Re: CFX4.4 - mass residuals in 2D?
I've already plotted the mass (and velocity) residuals and indeed there are regions which are difficult/slow to converge, with the rest of the domain having converged to several orders of magnitude further.

However, I have a transient flow problem with deforming grids and an adaptive mesh so its difficult to produce a grid that fits the flow at all time steps. There are regions that are difficult to achieve convergence but their locations are time-dependent as the flow and grid changes. These `hot spots' tend to track the local maximum courant number (also plotted) or areas of of high vorticity at each time step.

In my case perhaps a more useful measure of convergence would be the cell-weighted average of the ratio of mass-flow residual to mass-flow over all cells? This would smooth the effect of localised error maxima and consider the domain as a whole. A simple bit of Fortran to sum the product of velocity and cell face area pairs over all cells in the domain would do the trick.



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