by
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.
start lecture, abstract or contents
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.
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? next
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. next
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.
Just because of its novelty, CONWIZ has not yet been made the default mode of operation for existing cases. It is the default for cases set through the VR-Editor.
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.
Such decisions can also be made by way of mouse clicks on a menu panel.
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 and
conwiz
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. next
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 .
stan_100 and
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.
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:
standard and
conwiz
This time, the slower convergence of CONWIZ is more noticeable. However, it is
gratifying to observe that convergence has 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. next
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 if FIINIT(STEAM) ) about the expected volume fractions of steam and water in the generator.
The next two pictures show the relevant monitor plots:
standard and
conwiz
"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. next
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:
standard and
conwiz
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?
Also interesting is what happens when the rotation speed is increased tenfold. This is
shown by the next pair of plots:
stan_10 and
conw_10
Evidently, CONWIZ handles the change without difficulty; but the 'standard' settings no
longer procure convergence. next
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 picture provide some encouraging evidence in respect of library case i205:
standard and
conwiz
It appears that CONWIZ performs quite as well as the standard settings,
The main features of CONWIZ are as follows:
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.
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). next
Probably the best thing a user can do in order to help CONWIZ in cases of difficulty is
to use the new maximum-absolute-correction limitation, by placing in the Q1 file such
lines as:
SPEDAT(MAXINC,TEM1,R,10.0)
This limits the maximum correction of temperature at any point in a singe sweep to 10 degrees.
The user can also instruct CONWIZ to start from user-specified 'reference values' by way of the following commands:
SPEDAT(RLXFAC,REFVEL,R,user-set value)
SPEDAT(RLXFAC,REFLEN,R,user-set value)
SPEDAT(RLXFAC,REFTEMP,R,user-set value)
SPEDAT(RLXFAC,REFRHO,R,user-set value)
Further, if he or she is bold enough to use them, further spedats will set upper and lower limits, and relaxation factors, for the individual DVELDPs.
This is however not advised. 'Leave it to the wizard' is the better rule to follow.
There is much scope for CONWIZ to improve its performance, for example as follows:
No 'theory of convergence-promotion' has been invented; but the following ideas have provided guidance:
These are the thoughts which underlie the strategies which CONWIZ currently employs; but the thinking is far from being completed.
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:
next
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.
As already mentioned, setting CONWIZ = T activates CONWIZ; and there are PIL 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:
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.
next
, back or contentsThe 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