CONWIZ : The 'Convergence-Promoting Wizard' for PHOENICS

by

Brian Spalding, April 2004


contents

Abstract

A new feature of PHOENICS 3.6 is described, the purpose of which is to relieve its users of the need to set convergence-promoting parameters.

The lecture explains:

The lecture is intended for experienced users of PHOENICS or other computer codes who understand what is meant by 'convergence' and 'divergence', and who know that ensuring the former and avoiding the latter are sometimes difficult.


Contents

  1. What is CONWIZ?
  2. Why is it needed?
  3. How is it activated?
  4. Examples of CONWIZ in action
  5. How does it work?
  6. How reliable is it?
  7. Can users participate?
  8. How can it be further developed?
  9. The ideas underlying CONWIZ
  10. How to monitor convergence
  11. How to activate the new features
  12. Future challenges for CONWIZ

start lecture, abstract or contents











1. What is CONWIZ?

CONWIZ is a feature of PHOENICS 3.6 which is designed to ensure that PHOENICS solutions will converge, whenever the input data are sufficient and self-consistent.

The PHOENICS user who invokes it therefore has no need to set:-

He or she can therefore devote full attention to:-

CONWIZ thus reduces worry and improves performance.


2. Why is CONWIZ needed?

Practical CFD calculations can be conducted only by way of iterative error-reduction procedures because of:

For example:

The governing equations enable the errors associated with a particular set of velocities, etc, to be computed. The question is then: what corrections should be made to their values so as to reduce the errors? Well-known solution strategies exist for solving the pressure-velocity-linkage problem, for example SIMPLE and its variants.

However, these involve 'relaxation parameters' which significantly affect the speed with which the errors are reduced, and even whether they are reduced at all.

In PHOENICS, these parameters are set by way of commands in the input file such as:

RELAX(DEN1, LINRLX, 0.5), for relaxing density,or
RELAX(U1, FALSDT, 1.e-3), for relaxing velocity.

However, although numerous examples of such settings are provided in the Input-File Library, little systematic advice has been given about:

The latter point is particularly troublesome when the FALSDT mode is used; for the third argument has the dimensions of 'time'; so the appropriate value is probably related to the speed at which events will take place in the flow; but it has to be chosen before the flow has been calculated.

Moreover, experience has shown that, for many problems, 'linear relaxation doesn't work' for velocities; so FALSDT has had to be used.

Inexperienced users have then sometimes chosen excessively small values of false-time-step, for example 1.e-6; and they have then mistakenly supposed that they had obtained converged solutions because the resulting sweep-to-sweep changes were extremely small.

In the early years of CFD, when its users were mainly specialists in the subject, such lack of guidance was perhaps tolerable, Now that CFD codes are being used by specialists in other subjects, not even good guidance is sufficient: the computer code should choose the convergence-promoting settings on its own.

It is to enable PHOENICS to attain this degree of self-sufficiency that CONWIZ has been introduced. It is as yet a novice 'wizard'; but it is learning fast.


-->

3. How CONWIZ is activated

Just because of its novelty, CONWIZ has not yet been made the default mode of operation, except for the FLAIR version of PHOENICS, which is devoted to heating and ventilating problems.

However, to activate CONWIZ is easy: all that is needed is the line:

CONWIZ = T

in the Q1 file; and there is an easier-to-remember setting which will be described below.

If the user has already made his or her own settings of relaxation parameters, (most of) these will be respected by CONWIZ (but not false time steps for velocities).

Therefore, if it is desired to 'leave it all to CONWIZ', these settings should be de-activated.

These settings can also now be made by way of the 'numerics' panel of the VR-Editor menu.


4. Examples of CONWIZ in action

Library case 274: flow around a van

This veteran example, which has been used as the guinea-pig for innumerable innovations, will be used as the first demonstration of what CONWIZ can do.

The discussion will be based on the two figures displayed by clicking below, standard on the left and conwiz on the right:

These show the graphical-monitor outputs for two runs with the same geometrical and physical inputs, but with convergence-influencing settings which differ in that:

When considering these, it is should be noted that the left-hand plots are not those of the until-now-conventional 'spot values'; instead, the quantities plotted are, for each solved-for variable, the 'whole-domain maximum absolute corrections'.

These should, for a converged solution, fall to acceptably small values; as indeed they do in both cases here.

Convergence, as judged by this criterion, is therefore satisfactory both for the standard and the CONWIZ settings.

More rapid convergence is not to be expected of CONWIZ; indeed, when comparison with long-ago-optimised standard settings is made, somewhat slower convergence is more probable; for CONWIZ makes conservative rather than optimal choices.

Obviously, however, this play-safe policy has led to no serious ill-consequence in the present case.

The next two monitor plots show what happens when the van velocity is multiplied by 100.0 . As before, and for all pairs of pictures below, the standard settings are above and those of conwiz below.


conw_100 .
Evidently, the 'standard settings' which procured convergence for the original case were not able to do the same for the increased velocity; CONWIZ, by contrast, was able to cope with the changed input data quite well.

Library case 492; the gas-turbine combustor

A somewhat-tougher test of the capabilities of CONWIZ is provide by this case, also a veteran, by reason of its more numerous active physical processes, including turbulence and chemical reaction.

Once again, the effects of the standard and CONWIZ settings are compared by way of the graphical-monitor plots which may be displayed by clicking below:

This time, the slower convergence of CONWIZ is more noticeable. However, it is gratifying to observe that convergence gas been achieved, with
CONWIZ = T
as the only setting which the user has had to make.

It should also be remarked that, although the maximum absolute corrections appear to fluctuate more wildly for CONWIZ, their actual values are extremely small.

Library case w802; the nuclear steam generator

CONWIZ has not yet been taught anything specific about two-phase flow; it is therefore interesting to see what happens when it is presented with another 'classic' case.

This is the nuclear steam generator, which was the application which, long ago, led to both to the invention of the IPSA algorithm and to the creation of PHOENICS itself.

CONWIZ is being asked to tackle this problem without even being given a hint (by way of FIINIT(STEAM) ) about the expected volume fractions of steam and water in the generator.

The next two pictures show the relevant monitor plots:

"Not bad for a beginner", one might conclude; although the levelling-off of some residuals requires examining.

Since the selection of relaxation parameters for two-phase flow is notoriously difficult, this first-time success of CONWIZ is especially encouraging.

Library case b524; the Mizuki impeller

CONWIZ has been kept in equal ignorance of the specific features of body-fitted-coordinate calculations, which it therefore treats in the same way as those with cartesian or polar coordinates.

The results, for the veteran Mizuki-impeller problem, are shown in the next two graphical-monitor plots:

Convergence is good for both the standard and the CONWIZ settings; but the episode at the end of the CONWIZ run raises the question: why?

[However, this question is as much about the credibility of the residual plots as it is about the success of CONWIZ.]

Also interesting is what happens when the rotation speed is increased tenfold. This is shown by the next pair of plots:

Evidently, CONWIZ handles the change without difficulty; but the 'standard' settings no longer procure convergence.

Library case i205; temperatures in a computer room

Convergence is particularly difficult to procure for flows with natural convection; for sometimes differing false time steps may be required for: If CONWIZ can handle them well, users of FLAIR (the HVAC version of PHOENICS) will be much relieved.

The next two pictures provide some encouraging evidence in respect of library case i205:

It appears that CONWIZ performs quite as well as the standard settings,


5. How does CONWIZ work?

The main features of CONWIZ are as follows:
  1. It starts by making guesses about 'reference values' of:
  2. From these it deduces and sets some initial values of variables, including the 'DVELDPs', i.e. the rates of change of velocity with pressure difference at every point.
  3. It sets linear under-relaxation factors for all variables, including the DVELDPs .
  4. It sets maximum values to the increments per sweep for some variables.
  5. In some circumstances, it can improve its settings in the course of the computation.

6. How reliable is CONWIZ?

Does CONWIZ always work? No. However, as the above examples have shown, it often does pretty well.

When CONWIZ has failed to procure complete convergence, it has sometimes transpired that there is some special instability promoter in the way in which the problem has been set up.

Fires represented as fixed heat sources regardless of flow conditions have led to solutions which not even CONWIZ can persuade to 'settle down'.

CONWIZ has been in existence only since February 2004, and has not been receiving full-time attention; too much should therefore not yet be claimed for it.

Nevertheless, to set CONWIZ=T is certainly a wise thing to do at the start of a new calculation.


7. How can users participate in the promotion of convergence?

Although CONWIZ is ready to tackle any problem on its own, it will respect user's settings, and accept their assistance.

If users prefer to use false-time-step relaxation, for any variable other than velocity, CONWIZ will print a message questioning their wisdom; but it will not change the settings.

It will however insist on using linear relaxation for velocities.

Any user-set linear-relaxation factor will be used in preference to its own.

User-set VARMINs and VARMAXs will also be respected (even if, being too narrowly defined, they distort the final solution).

8. How can CONWIZ be further developed?

There is much scope for CONWIZ to improve its performance, for example as follows:
  1. By systematically inspecting all geometry-affecting settings, and all boundary and (physically significant initial) conditions, so as to make better estimates of reference lengths, velocities and densities.

  2. By increasing horizontal-direction vertical-velocity coefficients in regions where un-balanced horizontal gradients of gravity are likely to provoke large vertical-velocity corrections.

  3. By detecting regions in which corrections exhibit periodicity, and applying appropriate damping.

  4. By examining the special features of body-fitted coordinates and of two-phase flow, and introducing such modifications to the DVELDPs as are appropriate.

  5. Allowing better for low-Reynolds-number effects.

9. The ideas underlying CONWIZ

No 'theory of convergence-promotion' has been invented; but the following ideas have provided guidance:

These are the thoughts which underly the strategies which CONWIZ currently employs; but the thinking is far from being completed. "


10. How to monitor convergence

Much use has been made, during the development of CONWIZ, of the maximum-absolute-correction mode of convergence monitoring.

This is much more informative than the longer-established 'spot-value' mode; for how can one know in advance which are the important 'monitoring spots'?

Moreover, not only have 'spot-values' fallen into disfavour, but the suspicion has grown that the equally long-established 'residual' plots may be misleading, especially towards the end of run.

It has become apparent that the computed sum of residuals may include a large contribution from cells for which the balance is already as good as the round-off error of the computer allows.

This practice has two ill-effects, namely:

  1. it causes a solution which has truly converged to appear to the user as though it has not; and
  2. it causes the calculation process to continue to produce never-diminishing corrections which have no more significance than 'noise'.

Some experience has been gained with a procedure for filtering out quantitatively-insignificant residuals, with very satisfying results (the sums of residuals do truly reduce to zero); but this has not yet been tested sufficiently for general release.

It should be remarked that watching the maximum absolute corrections is of especial value when one finds that some of them do not fall to acceptably low values. For this is a sign that something may be wrong with the problem set-up (or, of course, with PHOENICS!)

PHOENICS-3.6 has means of printing out ( when debug = T ) not only how big are the maximum absolute corrections for each variable, but also where they occur. Its use points out where the investigation of the problem can usefully begin.

It may be remarked that the CONWIZ project has valuably revived scrutiny of the calculation schemes employed by PHOENICS.


11. How to activate the new features

As already mentioned, setting CONWIZ = T activates CONWIZ; and there are ISG?? settings which govern graphical-monitor print-out. However, since numbers are less easy to remember than words (for developers no less than for users), more memorable keywords have been introduced.

For example, at the bottom of the q1 for the case-274 calculation are the lines shown here.

The keywords 'conprom', 'endpause', 'maxabs' and 'figure' are comparatively easy to remember. Two of them are the same as those used in the cham.ini file, which now however users need not bring into their working directories for editing

Since the provision of such aids to memory is something which any user can do for himself, it may be of interest to explain the mechanism, as follows:

  1. the new keyword has to be defined in the core input-library file 014.htm, wherein it will be seen that 'conprom', for example, is:

  2. the corresponding input-library file 056.htm has to be created, wherein the setting of CONWIZ is made.

    Similarly, library files 052.htm, 053.htm, 053.htmand 055.htm make corresponding settings.

    These examples illustrate how PHOENICS users who are willing to hand-edit Q1 files can create short-cuts for themselves.

    However, lest processing the files by way of the VR-Editor should wipe them out, they are best protected by informbegin and informend markers.


12. Future challenges for CONWIZ

The tasks which CONWIZ has been set in this lecture have been of a pure CFD character. It should not therefore be forgotten that PHOENICS is acquiring new capabilities related to solid-structure interactions.

For example, solid stresses and strains can be deduced from displacements, which PHOENICS has been taught to compute in the same manner in which it computes velocities. Yet it is highly improbable that the optimum convergence strategies will be the same for both.

Further, some solid objects may move relative to each other.

For example, a bat may collide with a slightly flexible ball, having dramatic effects on the air which is squeezed between them.

CONWIZ may have to rise to new heights of wizardry if, as is essential, the PHOENICS user is to be freed from worry about how to procure convergence.

Further, the introduction of the 'Complete PHOENICS Object' concept will make it possible for users to set up extremely complex problems with ease. CONWIZ will have to cope with all of them.

It may thus be concluded that CONWIZ has appeared just in time; for, without it, these new facilities might in practice prove impossible to use.

------ End of Lecture ------


back or contents