Presentation is loading. Please wait.

Presentation is loading. Please wait.

MULTLAB FEM-UNICAMP UNICAMP Extending the simulation capabilities of CFD codes The PHOENICS In-Form Facility Extending the simulation capabilities of CFD.

Similar presentations


Presentation on theme: "MULTLAB FEM-UNICAMP UNICAMP Extending the simulation capabilities of CFD codes The PHOENICS In-Form Facility Extending the simulation capabilities of CFD."— Presentation transcript:

1 MULTLAB FEM-UNICAMP UNICAMP Extending the simulation capabilities of CFD codes The PHOENICS In-Form Facility Extending the simulation capabilities of CFD codes The PHOENICS In-Form Facility by Brian Spalding & Nikolai Davits Extending the simulation capabilities of CFD codes The PHOENICS In-Form Facility

2 MULTLAB FEM-UNICAMP UNICAMP Summary In-Form is a recently-introduced feature which enables users of PHOENICS greatly to extend its capabilities, without the introduction of new coding. Users are enabled to express their requirements by way of easy-to-write formulae. These are read by the Input Module (Satellite), which transmits them to the Solver Module (EARTH); this then interprets them and performs the implied computations. Unlike PLANT, its predecessor in functionality, In-Form does not require use of a re-compilable version of PHOENICS.

3 MULTLAB FEM-UNICAMP UNICAMP User programming: Ground No CFD code can contain enough built-in modeling capability to satisfy all its users' needs. CHAM recognised this in 1981, and therefore provided its 'GROUND-programming' feature, with many examples for users to copy. To users benefit from user-programming facility they necessitate a strong knowledge about: the program structure and Fortran language. The 'GROUND-programming' free the user to set up what he needs but the burden is to get ‘reasonable’ trained on GROUND coding which may take a quite a time (over a year).

4 MULTLAB FEM-UNICAMP UNICAMP Automated Fortran writing Recognizing the specialized training required to GROUND programming… CHAM (and specifically its Moscow branch) developed PLANT.PLANT The feature writes perfect Fortran automatically, and automatically handles the compilation and re-building, without user intervention. Users are required only to express their requirements in terms of formulae, in accordance with prescribed rules; the rest is automatic. Of course, the time and expense involved in compilation and re-building have to be afforded.

5 MULTLAB FEM-UNICAMP UNICAMP INFORM: Doing without the Fortran (or C) In-Form carries the PLANT idea one stage further, by: eliminating the Fortran/C writing, eliminating the compilation, eliminating the executable-building, simplifying the syntax, and enlarging the functionality. In-Form provides the possibility of writing in the Q1 (data-input) file, formulae, or other statements, which dictate: material properties, initial values, sources and boundary conditions, output requirements, many other specifications. At present therefore, In-Form represents the ultimate in user-friendly CFD- code extensibility

6 MULTLAB FEM-UNICAMP UNICAMP The general idea: the use of character strings PHOENICS has long been able to transmit character strings from its input module (SATELLITE) to its equation-solver module (EARTH) by way of the SPEDAT(....,C,....) command. In-Form uses this facility for communicating the user's wishes to EARTH. The character strings comprise statements composed by the user in easy-to-understand form and placed in the Q1 file. SATELLITE turns these into SPEDAT statements, and writes their content to the EARDAT file for reading by EARTH. EARTH interprets the SPEDAT statements in terms of mathematical operations which it then executes. The creation of In-Form has therefore been achieved by enabling: 1) SATELLITE to turn user-written statements into SPEDATs; and 2) EARTH to undertake the operations which the SPEDAT statements imply.

7 MULTLAB FEM-UNICAMP UNICAMP Typical Q1 statements Here are some examples of statements which a user might include in his Q1 file, in order so set the first-phase density RHO1: 1.(PROPERTY RHO1 is 1000.) 2.(PROPERTY RHO1 is 1000. - 0.01*TEM1) 3.(PROPERTY RHO1 is P1/(287.0 * (TEM1+273.0) ) 4.(PROPERTY RHO1 is 1.1386E+03 + 1.0388E+00*T1 + 5.8115 E-04*T1$ ^2 - 6.7765E-07 * T1^3) P1 stands for pressure, TEM1 (or T1) stands for temperature, and $ means 'continue on the next line'.

8 MULTLAB FEM-UNICAMP UNICAMP The SPEDAT equivalents What the SATELLITE writes to Q1EAR file is the corresponding set of SPEDATS, namely: 1.SPEDAT(SET,PROPERTY,RHO1,C,=1000.) or 2.SPEDAT(SET,PROPERTY,RHO1,C,=1000.-0.01*TEM1) or 3.SPEDAT(SET,PROPERTY,RHO1,C,=P1/(287.0*(TEM1+273.0))) or 4.SPEDAT(SET,PROPERTY,RHO1,C,=1.1386E+03+1.0388E+00*T1+5.8115E- 04*T1$) SPEDAT(SET,PROPERTY,RHO1,C,^2-6.7765E-07*T1^3) These also appear in EARTH's RESULT file, when the variable ECHO has been set to T in the Q1. Users do not have to read them.

9 MULTLAB FEM-UNICAMP UNICAMP The EARDAT equivalents The corresponding lines in the EARDAT file are: 1.PROPERTY RHO1 C=1000. or 2.PROPERTY RHO1 C=1000.-0.01*TEM1 or 3. PROPERTY RHO1 C=P1/(8300.0*(TEM1+273.0)) or 4.PROPERTY RHO1 C=1.1386E+03+1.0388E+00*T1+5.8115E$ PROPERTY RHO1 C-04*T1^2-6.7765E-07*T1^3 These have evidently the same significance, although the locations of the $ differ somewhat, a detail which is immaterial to the user. There is no need for the user to read either the SPEDATS or the EARDAT equivalents; but it may sometimes be useful for him/her to check that they actually exist, should he/she fear to have made an error.

10 MULTLAB FEM-UNICAMP UNICAMP Available formulae The formulae which can be used in In-Form statements are extremely varied, as may be seen from the relevant entry in the PHOENICS Encyclopaedia, and in its appendices:relevant entry 1 Functions used in In-FormFunctions used in In-Form 2 The list of In-Form statementsThe list of In-Form statements 3 In-Form optionsIn-Form options A cursory glance is all that is appropriate in the present lecture.

11 MULTLAB FEM-UNICAMP UNICAMP The merits of In-Form The above presentation, although it has shown only a small fraction of the capabilities of In-Form, strongly suggests that In-Form provides PHOENICS users with an enormous increase in their ability to simulate never-before-investigated fluid-flow, heat-transfer and chemical-reaction phenomena. It can do everything which PLANT can do, and more; and moreover, –its syntax is closer to English and therefore easier to learn; and –it requires only the non-recompilable version of PHOENICS. It makes it unnecessary for users to learn about the (rather limited) property and other options signalled by the GRNDx pointers. Most of the long-familiar COVAL settings can also be replaced by the much-more-flexible (INITIAL and (SOURCE statements.

12 MULTLAB FEM-UNICAMP UNICAMP The 'down' side : computer time From the start, it was recognised that In-Form's necessity to parse character strings might impose a computer-time burden. Therefore a watch has been kept on computer-time differences between the In-Form and GROUND-coding methods of solving the same problem. Early results showed differences which varied between 'negligible' and 'a few percent'. Per-cent differences were smaller for large grids (especially 2D-XY ones) because then parsing time is much less than arithmetic-operation time. Recently some cases showing differences of some hundreds per cent have come to light. They are under investigation; and may have nothing to do with parsing time. Attention is also being given to a parse-once-and-store procedure which should eliminate this cause of computer-time increase.

13 MULTLAB FEM-UNICAMP UNICAMP Useful POLIS Entries Related to In-Form Introductory Lecture TR003: In-Form Tutorial: Inlet Boundary Layer Profile Tutorial: Time Dependent Heat Source Functions used in In-Form The list of In-Form statements In-Form options

14 MULTLAB FEM-UNICAMP UNICAMP The Class Structure The following sections the In-Form features are introduced by way of a series of workshops. They will handle with some selected In-Form capabilities due to the limited time during this regular course. It is expected though that this training will enable the beginner to get acquainted with In-Form and develop its own cases.

15 MULTLAB FEM-UNICAMP UNICAMP The Workshop Structures The In-Form features and command syntaxes will be introduced by a sequence of workshops. The workshop themes are structured on simple cases and the features are introduced in one to one basis to each case. The workshop sequence is: 1. Setting Material Properties 2. Using Auxiliary Variables 3. Setting Boundary Conditions 4. Setting Initials Values 5. Residuals and Imbalance Patches 6. Moving Objects


Download ppt "MULTLAB FEM-UNICAMP UNICAMP Extending the simulation capabilities of CFD codes The PHOENICS In-Form Facility Extending the simulation capabilities of CFD."

Similar presentations


Ads by Google