Encyclopaedia Index


___________________________________________________________________ |Int High Tech| 0 | The Expert-System CFD code | | Forum BASEL | ---- | by | | 1992 | 12 | Brian Spalding, CHAM Ltd , UK | |_____________|_______|___________________________________________| | | | This file contains the text panels of a lecture | | delivered in 1992. | | | | Live demonstrations were conducted during the lecture, by | | means of PHOENICS running on a portable PC 486. | | | | Viewers who wish to run these for themselves can do so | | by way of library cases: 568, ...... | | | | or active demonstrations: ..... | | | | | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 1 | The Expert-System CFD code | | Forum BASEL | ---- | by | | 1992 | 12 | Brian Spalding, CHAM Ltd , UK | |_____________|_______|___________________________________________| | | | Contents | | | | * The message | | | | * The problem | | | | * Some partial solutions | | | | * Demonstrations | | | | * Conclusion | | | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 2 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | The main message | |_____________|_______|___________________________________________| | | | * Computational Fluid Dynamics Computer codes are | | being used by an ever-increasing number of specialists | | in OTHER subjects than CFD. | | | | * CFD-code vendors have therefore provided easy-to-use | | PRE-PROCESSORS for inputting GEOMETRICAL and PHYSICAL data| | and POST-PROCESSORS for viewing and interpreting results. | | | | * HOWEVER, the results of flow-simulation calculations are | | affected also by NUMERICAL INPUTS, which even specialists | | in CFD find it hard to choose optimally. | | | | * These must therefore be chosen by the code's EXPERT SYSTEM| | | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 3 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Some of the NUMERICAL INPUTS to CFD codes | |_____________|_______|___________________________________________| | | | Numerical inputs needed by CFD codes include:- | | | | * The grid: * type: structured, unstructured or multi-block | | * (if structured) cartesian, polar or body-fitting| | * fineness (how many nodes?) | | * non-uniformity (power-law? geometric progession?) | * Equations:* type: elliptic, parabolic or hyperbolic | | * terms: convection, diffusion, transient, sources| | * schemes: upwind, central, QUICK, hybrid,..... | | * solvers: iterative (which?), matrix-inversion...| | * Parameters* iteration-cut-off criteria (eg minimum residual)| | * over-relaxation parameters (for each variable) | | * under-relaxation devices (eg false time steps) | | * Initial guesses of field values for steady-state problems | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 4 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Why NUMERICAL INPUTS must be optimal | |_____________|_______|___________________________________________| | | | Numerical inputs affect: | | | | * WHETHER any result is obtained at all | | (the iterative solution procedure may DIVERGE) | | | | * THE ACCURACY of the result | | (coarse grids and slow convergence give POOR accuracy) | | | * THE COST of obtaining the result | | (fine grids and poorly-converging algorithms | | entail very LONG COMPUTER TIMES ) | | | | * THE SIZE of the computer which is needed | | (parabolic options use much less memory than elliptic)| |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 5 | The Expert-System CFD Code | | Forum BASEL | ---- | Some of the numerical inputs required | | 1992 | 12 | by the PHOENICS flow-simulation code | |_____________|_______|___________________________________________| | | | To run PHOENICS, it is necessary to specify, FOR EACH VARIABLE: | | | | DTFALS, the relaxation parameter; | | RESREF, the termination criterion based on "residuals"; | | LITER, the maximum number of iterations within the solver; | | ENDIT, the iteratio-termination or over-relaxation factor; | | ISOLX, ISOLY, ISOLZ, ISOLBK, the frequencies of employment of| | the available block-relaxation actions; | | VARMIN & VARMAX, the lower and upper cut=off values; | | and MANY MORE ||||| | | | | Also, there are parameters which govern the maximum number of | | cycles through loops encompassing all variables and slabs. | | ????? WHAT ARE THE BEST VALUES FOR A GIVEN CASE ????? | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 6 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Sources of advice on numerical-inputs | |_____________|_______|___________________________________________| | | | 1. Text-book theory. This is almost non-existent. What exists | | pertains to very simple (non-typical) cases| | | | 2. Code manuals. These are more suggestive than instructive.| | Code vendors condense their experience into| | guidance rules, not precise prescriptions | | | | 3. User experience Only users who work intensively on a narrow| | problem range accumulate enough enough | | | | 4. Data bases Past experience of all users could in | | principle be put into a data base, to be | | accessed at input time. Who knows of one? | | 5. Trial and error ....... | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 7 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 17 | Two kinds of trial and error method | |_____________|_______|___________________________________________| | | | 1. PRE-SELECTION AND REPETITION (the artillery method) | | | | Many runs are conducted, with different numerical-input | | data, systematically varied. | | | | The data combinations which maximise accuracy and economy | | are then adopted for further "production runs". | | | | Drawbacks: | | | | * The preliminary search can cost much computer- and | | man-time. | | | | * The adopted data sets may still not be best for all runs.| |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 8 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Two kinds of trial-and-error method | |_____________|_______|___________________________________________| | | | 2. "IN-FLIGHT" ADJUSTMENT (the automatic pilot) | | | | The computer-code is provided with an "expert-system" device | | which seeks the optimum set of numerical controls WHILE THE | | COMPUTATION IS IN PROGRESS. | | | | The search involves:- | | * systematically varying the inputs; | | * noting their efects on convergence speed; | | * "homing in" on the optimal set. | | | | Advantage: The method exploits the fact that the best data | | sets for the START of a calculation are often not | | the best for the MIDDLE and END stages. | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 9 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Examples of in-flight adjustment | |_____________|_______|___________________________________________| | | | Three examples of the use of the PHOENICS-EXPERT system | | will be presented:- | | | | 1. Adjustment of the over-relaxation factor in the solution | | of a steady-state HEAT-CONDUCTION problem. | | | | 2. The operation of the same device for calculating the | | potential-flow solution for flow around a MOVING TRUCK. | | | | 3. The correction of bad first choices of "false time steps" | | for velocities in a DRIVEN-CAVITY CALCULATION. | | | | The calculations will be performed "live" on a "notebook PC". | | | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 10 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Discussion | |_____________|_______|___________________________________________| | | | 1. The heat-conduction example. | | | | * EXPERT raised the over-relaxation factor to higher-than- | | expected values | | | | * A better solution was found (ie one with lower residuals) | | in a shorter computer time. | | | | | | 2. Potential flow around a moving truck | | | | * PHOENICS computes the velocity potential and its gradients.| | | | * EXPERT may help to get the solution more quickly. | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 11 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Discussion of the examples | |_____________|_______|___________________________________________| | | | 2. Potential flow around a moving truck | | | | * EXPERT has again brought economies. | | | | * For large problems, computer-time savings are substantial. | | | | | | 3. The driven-cavity flow | | | | * PHOENICS will solve the Navier-Stokes equations for the | | laminar, steady flow in a square box with a moving lid. | | | | * Non-linearity makes the optimal numerical-input parameters | | difficult to pre-select. Can EXPERT correct bad choices? | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 12 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Conclusions | |_____________|_______|___________________________________________| | | | * Some preliminary successes of the PHOENICS Expert System | | have been shown. | | | | * Many more could have been presented had time permitted. | | | | * The general conclusion is that the search procedures | | which are being employed for "in-flight" adjustment of | | numerical-input parameters are sound. | | | | * Experience has mainly been confined to "one-at-time" | | adjustment of parameters. | | | | * When many parameters may adjusted simultaneously, PRIORITY | | PRINCIPLES are required. These are now being developed. | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 15 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Encore 1. The principle employed | |_____________|_______|___________________________________________| | | | * Postulate that there exists a | rate .. | | convergence-rate-versus-parameter | . . | | curve as shown. | . . | | | . . | | * Vary the parameter systematically | . . | | so as to keep close to the value | . . | | which maximises the speed. | . . | | | . . | | * Store the information about the | . . . | | optimum parameter values for use | . | | in later similar calculations. | . | | | . | | * Introduce traps to prevent too- |_________________________| | large changes leading to divergence parameter ----> | |_________________________________________________________________|

___________________________________________________________________ |Int High Tech| 16 | The Expert-System CFD Code | | Forum BASEL | ---- | | | 1992 | 12 | Encore 2. A role for parallel computing? | |_____________|_______|___________________________________________| | | | * When multiple processors are available, it is posssible for | | each to perform a particular step in the calculation | | procedure with a different set of numerical-input values. | | | | * Each would achieve a different degree of success in reducing| | the residual errors. | | | | * The solution with the greatest reduction of errors, and the | | corresponding numerical-input values, would be adopted | | (for all processors) for the next step. | | | | * The numerical parameters have such an enormous effect on the| | economy/accuracy performance of computer codes, that the | | here-suggested use of parallelism may beat conventional use.| |_________________________________________________________________|