Phoenics Input Language: PIL - PowerPoint PPT Presentation

About This Presentation
Title:

Phoenics Input Language: PIL

Description:

Phoenics Input Language: PIL The PIL language was developed during the first stages of PHOENICS development. In that time there were no graphics interface and the ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 42
Provided by: Euge145
Category:

less

Transcript and Presenter's Notes

Title: Phoenics Input Language: PIL


1
Phoenics Input Language PIL
  • The PIL language was developed during the first
    stages of PHOENICS development.
  • In that time there were no graphics interface and
    the user had to communicate with the Main program
    by means of a Q1 file written in PIL.
  • The PIL is quite similar to FORTRAN and is the Q1
    input language.
  • Despite of the graphics interface development,
    the PIL is still today largely used because it
    still can do tasks not possible in VR interface
    for instance.
  • For experienced users it is faster to modify Q1
    rather than go to VR interface.
  • At last, it is the most powerfull tool to design
    your own development.

2
Q1 and RESULT Files
  • The q1 is the input file. One may written a q1
    using VR or typing from the key board the PIL
    statements.
  • A balanced use of the two editors is very
    convenient.
  • The result file is also written in PIL and echoes
    all the q1 statements.
  • Most of the times the q1 statements are functions
    which, by their turn, became multiple arguments
    in RESULT file.
  • We will see some examples in the following slides.

3
Schematic of the three main blocks of PHOENICS
NotePad PIL / FORTRAN
MENU v 2.0
Virtual Reality v 3.0
VR VIEWER
PÓS PROCESSAMENTO Apresentação Resultados
PRÉ PROCESSAMENTODefinição Problema
MAIN simulação
4
Data input in PHOENICS is organized in 25
groups. GROUP 1 - Title
Preliminaries GROUPS 2 thru 6 - Transience
grid specification GROUPS 7 and 8 - Solver
options and controls GROUP 9 -
Properties GROUP 10 - Interphase
transport coefficients GROUP 11 -
Initialization and porosities GROUP 12
- Coefficients of convection and
diffusion GROUP 13 - Source and
boundary conditions GROUP 14 -
Parabolic runs GROUPS 15 thru 18 - Convergence
controls GROUP 19 - Calls to
ground GROUP 20 thru 25 - Print outs
monitoring controls
5
CASE STUDY 1D TRANSIENT CONDUCTION IN A
FIN (LE3 ex. 1)
We are going to get acquainted with the PHOENICS
Groups and PIL Language by inspecting the echoed
groups in Q1 and RESULT files from this case
study.
6
GROUP 1 Run titles and other preliminaries PHOENIC
S is arranged so as to make it possible to set up
and execute a series of computer runs, a facility
that is often exploited when 'parametric studies'
are required. Each run then needs to be
identified by a number and it is usually
convenient to give each run its own title. GROUP
1 is the place for such labeling operations.
Declarations such as REAL(...), CHAR(....),
ARRAY(....,...), for variables which they user
intends to use, are also best made here. However,
so long as the declaration statement s appear in
the Q1 file ABOVE the point of their first use,
they can appear in any group.
7
GROUP 2 Transience time-step specification PHOEN
ICS can simulate both steady-state and transient
phenomena. For the former, no entry is required
in GROUP 2 otherwise, data items relating to
time dependence must be supplied here.
8
GROUPS 3, 4 and 5 x-, y- and z-direction grid
specifications PHOENICS can represent phenomena
in 1, 2 or 3 space dimensions. Provision is
therefore made for setting up 'grids' in three
directions, designated x, y and z and each is
dealt with separately. x, y and z are all
distances in the standard settings, measured in
meters however, x may be caused, by setting
XCYCLET, to represent an angular coordinate and
similar changes can be effected, with more
difficulty, for y and z.
9
GROUP 6 Body-fitted coordinates or grid
distortion BFCT, if body-fitted coordinates are
required, is set here. If it is, further commands
such as GSET(....) usually follow, for specifying
the grid.
10
GROUP 7 Variables stored, solved and
named PHOENICS has been set up so that it can
solve differential equations for up to 50
dependent variables simultaneously with especial
ease but more can also be dealt with. What
variables are to be solved is settled in GROUP 7
also, to some extent, HOW they are to be solved.
If variables are to be given storage space but
not actually solved, as is often convenient for
important auxiliary variables, this information
is also conveyed here.
11
GROUP 8 Terms (in differential equations) and
devices The typical differential equation which
PHOENICS solves has terms corresponding to
transient, convection, diffusion and source-sink
effects but not all the variables of a given
problem exhibit all the effects. GROUP 8 allows
distinctions to be made between the variables in
these respects. This facility can also be
exploited as an economy measure, when some
effects which are present are so small as to be
negligible for then they can be omitted
entirely, with consequent saving of computation
time. Should users wish to intervene, through
GROUND, in the procedures for setting up and
solving the flow-simulating equations, they can
do so by setting certain 'switches' in GROUP 8 of
SATELLITE, and then providing corresponding
coding sequences in GROUP 8 of GROUND.
12
GROUP 9 Properties of the medium (or media) It
is necessary to inform PHOENICS about the
physical properties of the medium in which the
flow to be simulated actually occurs and, since
the computer code is equipped for the simulation
of two-phase (ie two-interpenetrating-media)
phenomena, two sets of property data may require
to be specified. The properties in question may
be thermodynamic (eg density), transport (eg
viscosity), or inter-phase (eg saturation
enthalpy). GROUP 9 is the place for such data
items.
13
GROUP 10 Interphase-transfer processes and
properties A special group, number 10, has been
set aside for those property- data items which
relate to the interactions between phases which
are both present in the same location and at the
same time. The interactions may involve heat
transfer, mass transfer and momentum transfer
and information may also need to be supplied
about the thermodynamic-equilibrium and
chemical-kinetic natures of the interactions.
14
GROUP 11 Initialization of variable or porosity
fields When PHOENICS is solving a problem
involving time-dependence, the problem
specification usually starts with a statement
about what values of all the dependent variables
pertain, to all the points in the space in
question, at the first instant to be considered.
These 'initial values' can be supplied among the
data items of GROUP 11. Even in problems of
steady-state character, because PHOENICS proceeds
in an iterative manner, initial values must be
supplied. These are the 'first guesses', rather
than problem-specifying data and their values
should not ordinarily influence the final
solution. However, they are supplied in precisely
the same way as are the initial values of true
time-dependent phenomena. Among the variables
which may be initialized in this way are the
so-called 'porosities', which indicate what
fractions of the areas and volumes of the
computational cells are actually accessible to
the fluid. These are not ordinarily dependent
variables of differential equations but they may
be stored and handled within PHOENICS as though
they were.
15
GROUP 12 Convection and diffusion
adjustments The above-mentioned 'porosities'
limit the magnitudes of the relevant fluxes of
heat, mass and momentum uniformly in respect of
all dependent variables. However, it may be
useful sometimes to distinguish one variable from
another, as when, for example, a membrane is
introduced which is permeable to heat and some
constituents of a mixture, but impermeable to
other constituents.
16
GROUP 13 Boundary conditions and special
sources What makes one flow phenomenon differ
from another is partly the properties of the
medium, partly the initial conditions and partly
the boundary conditions (which, despite their
name, may be located inside the flow domain).
PHOENICS is therefore supplied, in the sections
appropriate to data-input GROUP 13, with an
extensive set of procedures which permit the
relevant information to be supplied. All such
boundary and internal conditions are treated, in
PHOENICS, as sources and sinks therefore the
same data-input procedures are employed whenever
any source/sink information is to be transmitted.
GROUP 13 may thus also be used for representing
generation terms in a turbulence-energy equation,
or for introducing novel formulations for
chemical-reaction rates.
17
GROUP 14 Downstream pressure for
PARABT PHOENICS can simulate fluid-flow
phenomena of the kind known as 'parabolic', for
example the development of a boundary layer on an
airfoil. Some of these phenomena require, for
their complete simulation, the specification of
the way in which the fluid pressure varies with
downstream (ie z-direction) distance. GROUP 14
has been provided as the repository of
information of this kind.
18
GROUP 15 Termination of sweeps PHOENICS solves
its equations by guess-and-correct procedures,
which, provided that they are indeed converging,
cause the imbalances in the finite-domain
equations to become smaller and smaller. There
is no limit to the number of cycles of successive
adjustments that PHOENICS can perform but there
is a limit to how many are worth performing. It
is for the user to provide PHOENICS with
information about the latter limit and GROUP 15
is the place where this provision should be made.
19
GROUP 16 Termination of iterations There are
iterations of two main kinds in PHOENICS the
'outer iterations' or 'sweeps' , which are the
concern of GROUP 15 and the 'inner iterations',
for which the limiting information is supplied in
GROUP 16. The former are concerned with
eliminating imbalances deriving from the
non-linearities, while the latter are associated
with the fact that PHOENICS uses iterative
procedures for solving even the linear equations
which arise (in large numbers) at various points
in the solution procedure.
20
GROUP 17 Under-relaxation devices In order to
ensure convergence, iterative solution procedures
for non-linear sets may require the judicious
introduction of 'under- relaxation' practices.
For linear equations, on the other hand,
over-relaxation may cause convergence to be
attained more rapidly. PHOENICS possesses
several features which allow under- and over-
relaxation to be practised, and in a rather
discriminating way. GROUP 17 is the place at
which these devices are normally activated.
21
GROUP 18 Limits on variables or increments to
them During the course of a sequence of
outer-iteration cycles, values of dependent
variables may wander rather far from both their
initial values and from the values which are
finally found to satisfy all the equations, ie
from the solution. At times, this 'wandering' may
become excessive and, if no limits are placed on
it, the result may be that 'divergence' occurs
no solution of the equations is then arrived at.
The latter outcome can however often be
prevented if PHOENICS is informed about the upper
and lower limits, relevant to each dependent
variable separately, which the said variables
should not exceed. These limits may be set by the
user, possibly on physical grounds (which
preclude negative densities, for example), or
perhaps to express other insights or desires
which he possesses. GROUP 18 provides the
necessary opportunities.
22
GROUP 19 Data communicated by SATELLITE to
GROUND PHOENICS users can, if they wish, modify
or add to the GROUND sub- routines which are
attached to the EARTH module and spare variables
such as RSG's (Reals connecting Satellite and
Ground), LSG's (Logicals connecting Satellite and
Ground), ISG's (Integers...) and CSG's
(Characters ....) are provided to enable them to
transmit information from the SATELLITE to the
coding which they have introduced. These are
usually set in Group 19.
23
GROUPS 20 to 24 Preliminary-, variable-,
spot-value- and field- print-out plot control
and dumps for restarts Quite apart from the
ability to accept special print-out instructions
via arrangements made through GROUP 19, PHOENICS
possesses extensive controls for its
already-built-in print-out procedures. The
controls are distributed between the last five
data-input groups. GROUP 20 controls the extent
to which EARTH prints out data-input summaries
before execution begins. GROUP 21 accepts
information about the extent and frequency of the
print-out of dependent- variable fields, while
GROUP 22 does the same for the print-out of the
single-point values which are used for monitoring
the course of the solution process. GROUP 23 is
the repository of information about which types
of print-out are elicited for which stored
variable and, finally, GROUP 24 concerns that
special kind of information 'dump' which permits
continuation of an EARTH computation which has
been paused, either with or without changed
arrangements for print-out.
24
RESIDUAL AND NET SOURCES IN RESULT FILE
  • Whole-field residuals before solution
  • with resref values determined by EARTH
  • resfac 1.000000E-02
  • variable resref (res sum)/resref (res sum)
  • TEM1 4.625E-02 4.551E-05 2.105E-06
  • Nett source of TEM1 at patch named OB1
    (LOW ) 3.272568E-01
  • Nett source of TEM1 at patch named OC2
    (NORTH ) -2.624250E-01
  • pos. sum 3.272568E-01 neg. sum-2.624250E-01
  • nett sum 6.483176E-02

25
CPU PERFORMANCE IN RESULT FILE

  • SATLIT RUN NUMBER 1 LIBRARY REF. 0
  • Run completed at 203406 on Tuesday, 12 April
    2005
  • MACHINE-CLOCK TIME OF RUN 3 SECONDS.
  • TIME/(VARIABLESCELLSTSTEPSSWEEPSITS)
    5.000E-04

26

Group 1. Run Title TEXT(LE3 - EX1
)
Group
2. Transience STEADYF Set overall time
and no. of steps RSET(U,0.000000E00,1.000000E03
,100) Modify regions
Groups
3, 4, 5 Grid Information NEXT Overall
number of cells, RSET(M,NX,NY,NZ,tolerance)
RSET(M,1,1,20) Set overall domain extent
xulast yvlast zwlast
name XSI 6.283190E00 YSI 5.000000E-03 ZSI
1.000000E-01 RSET(D,CHAM )
Cylindrical-polar grid CARTESF

Group 6. Body-Fitted coordinates


27
  • Group 24. Dumps For Restarts
    NEXT
  • NOWIPE T
  • IDISPA 10 IDISPB 1 IDISPC
    100
  • CSG1 'F'
  • GVIEW(P,-8.114650E-01,-6.012347E-02,-5.813001E-01
    )
  • GVIEW(UP,-5.798833E-01,-4.060527E-02,8.136870E-01
    )
  • gt DOM, SIZE, 6.283190E00,
    5.00E-03, 1.00E-01
  • gt DOM, MONIT, 3.141590E00, 2.50E-03,
    9.250E-02
  • gt DOM, SCALE, 1.00E00, 1.00E00,
    1.00E00
  • gt DOM, SNAPSIZE, 1.000E-02
  • gt DOM, RELAX, 5.000E-01

28

Group 7. Variables
STOREd,SOLVEd,NAMEd NEXT ONEPHS T
Non-default variable names NAME(148) PRPS
NAME(149) SPH1 NAME(150) TEM1 Solved
variables list SOLVE(TEM1) Stored
variables list STORE(SPH1,PRPS) Additional
solver options SOLUTN(TEM1,Y,Y,Y,N,N,Y)

Group 8. Terms Devices
NEXT TERMS
(TEM1,Y,Y,Y,Y,Y,Y)

29

Group 9. Properties NEXT
SETPRPS(1,
67) RHO1 9.982300E02 PRESS0
1.000000E05 TEMP0 2.730000E02 CP1
4.181800E03 ENUL 1.006000E-06 ENUT
0.000000E00 DVO1DT 1.180000E-04
PRNDTL(TEM1) -5.970000E-01
Group
10.Inter-Phase Transfer Processes

Group 11.Initialise Var/Porosity
Fields NEXT FIINIT(PRPS)
6.700000E01 FIINIT(SPH1) 4.730000E02
FIINIT(TEM1) 2.000000E01 No PATCHes used
for this Group INIADD F

Group 12. Convection and diffusion
adjustments No PATCHes used for this Group
30

Group 13. Boundary Special Sources
NEXT No PATCHes used for this
Group EGWF T
Group 14.
Downstream Pressure For PARAB
Group
15. Terminate Sweeps NEXT LSWEEP 1000
RESFAC 1.000000E-02
Group 16.
Terminate Iterations NEXT
Group
17. Relaxation NEXT
Group 18.
Limits NEXT
Group 19. EARTH
Calls To GROUND Station NEXT USEGRD T
USEGRX T ASAP T IDISPB 1
IDISPC 100 CSG1 'F'


31
  • Group 24. Dumps For Restarts NEXT
  • gt OBJ1, NAME, LOW
  • gt OBJ1, POSITION, 0.00E00, 0.00E00,
    0.00E00
  • gt OBJ1, SIZE, 6.283190E00, 5.00E-03,
    0.00E00
  • gt OBJ1, CLIPART, polcu2
  • gt OBJ1, ROTATION24, 1
  • gt OBJ1, TYPE, PLATE
  • gt OBJ1, SURF_TEMP, 0.00E00, 1.00E02
  • gt OBJ2, NAME, NORTH
  • gt OBJ2, POSITION, 0.00E00, 5.00E-03,
    0.00E00
  • gt OBJ2, SIZE, 6.283185E00, 0.00E00,
    1.00E-01
  • gt OBJ2, CLIPART, polcu2
  • gt OBJ2, ROTATION24, 1
  • gt OBJ2, TYPE, PLATE
  • gt OBJ2, LINR_HEAT, 1.075E01, 2.00E01
  • STOP

32
  • ARQUIVO RESULT
  • ECOA TODOS OS COMANDOS EMITIDOS DO Q1
  • ELE ESCREVE NUMA LINGUAGEM PIL BÁSICA
  • NOTE QUE OS COMANDOS DO Q1 SÃO
    RE-INTERPRETADOS PARA APARECER NO RESULT
  • DEVE-SE DESTACAR QUE ELES SÃO TOTALMENTE
    EQUIVALENTES.
  • SE VOCÊ UTILIZASSE OS COMANDOS ECOADOS NO RESULT
    NO Q1 O RESULTADO SERIA O MESMO
  • MUITAS VEZES OS COMANDOS DO Q1 SÃO MAIS
    CONVENIENTES POR SEREM MAIS COMPACTOS.

33

Group 2. Transience STEADY F
Set overall time and no. of steps TFIRST
0.000000E00 TLAST 1.000000E03 LSTEP
100 TFRAC ( 1) 1.000000E-02 TFRAC ( 2)
2.000000E-02 TFRAC ( 3) 3.000000E-02 TFRAC
( 4) 4.000000E-02 TFRAC ( 5)
5.000000E-02 TFRAC ( 6) 6.000000E-02 TFRAC
( 7) 7.000000E-02 TFRAC ( 8)
8.000001E-02 TFRAC ( 9) 9.000000E-02 TFRAC
( 10) 1.000000E-01 . . . TFRAC ( 93)
9.300001E-01 TFRAC ( 94) 9.400001E-01 TFRAC
( 95) 9.500000E-01 TFRAC ( 96)
9.600000E-01 TFRAC ( 97) 9.700000E-01 TFRAC
( 98) 9.800000E-01 TFRAC ( 99)
9.900001E-01 TFRAC (100) 1.000000E00


34
Group 3. X-Direction Grid Spacing
BACK CARTES F NX 1 XULAST
6.283190E00
Group 4. Y-Direction
Grid Spacing NY 1 YVLAST
5.000000E-03
Group 5. Z-Direction
Grid Spacing PARAB F NZ 20
ZWLAST 1.000000E-01 ZFRAC ( 1)
5.000000E-02 ZFRAC ( 2) 9.999999E-02 ZFRAC (
3) 1.500000E-01 ZFRAC ( 4)
2.000000E-01 . . . ZFRAC (17) 8.500000E-01
ZFRAC (18) 9.000000E-01 ZFRAC (19)
9.500000E-01 ZFRAC (20) 1.000000E00


35

Group 7. Variables
STOREd,SOLVEd,NAMEd BACK ONEPHS T
NAME(148) PRPS NAME(149) SPH1 NAME(150)
TEM1 Y in SOLUTN argument list denotes
1-stored 2-solved 3-whole-field
4-point-by-point 5-explicit 6-harmonic averaging
SOLUTN(PRPS,Y,N,N,N,N,Y) SOLUTN(SPH1,Y,N,N,N,N,
N) SOLUTN(TEM1,Y,Y,Y,N,N,Y) PRPS 148

Group 8. Terms Devices
BACK Y in TERMS
argument list denotes 1-built-in source
2-convection 3-diffusion 4-transient
5-first phase variable 6-interphase transport
TERMS (TEM1,Y,N,Y,Y,Y,N) DIFCUT
5.000000E-01 ZDIFAC 1.000000E00 GALA
F ADDDIF F ISOLX 0 ISOLY
0 ISOLZ 1

36

Group 9. Properties
BACK RHO1
9.982300E02 TMP1 0.000000E00 EL1
0.000000E00 TSURR 0.000000E00 TEMP0
2.730000E02 PRESS0 1.000000E05 DVO1DT
1.180000E-04 ENUL 1.006000E-06 ENUT
0.000000E00 PRNDTL(TEM1) -5.970000E-01 PRT
(TEM1) 1.000000E00 CP1 4.181800E03
CP2 4.181800E03
Group
10.Inter-Phase Transfer Processes


37

Group 11.Initialise Var/Porosity
Fields BACK FIINIT(PRPS)
6.700000E01 FIINIT(SPH1) 4.730000E02
FIINIT(TEM1) 2.000000E01 No PATCHes yet
used for this Group INIADD F FSWEEP
1 NAMFI CHAM
Group 12.
Patchwise adjustment of terms Patches for this
group are printed with those for Group 13.
Their names begin either with GP12 or
38

Group 13. Boundary Special Sources
BACK Parent VR object for
this patch is LOW PATCH(OB1
,LWALL , 1, 1, 1, 1, 1, 1, 1, 100)
COVAL(OB1 ,TEM1, 1.000000E00, 1.000000E02)
Parent VR object for this patch is NORTH
PATCH(OB2 ,NWALL , 1, 1, 1, 1,
1, 20, 1, 100) Parent VR object for this
patch is NORTH PATCH(OC2 ,NORTH ,
1, 1, 1, 1, 1, 20, 1, 100) COVAL(OC2
,TEM1, 1.075000E01, 2.000000E01) XCYCLE
F EGWF F
39

Group 14. Downstream Pressure For
PARAB
Group 15. Terminate Sweeps
BACK LSWEEP
1000 ISWC1 1 LITHYD 1 LITFLX
1 LITC 1 ITHC1 1 SELREF
T RESFAC 1.000000E-02
Group
16. Terminate Iterations BACK LITER (TEM1)
20 ENDIT (TEM1) 1.000000E-03

Group 17. Relaxation BACK
RELAX(PRPS,LINRLX, 1.000000E00)
RELAX(SPH1,LINRLX, 1.000000E00)
RELAX(TEM1,FALSDT, 1.000000E09) OVRRLX
0.000000E00 EXPERT F NNORSL F
40

Group 18. Limits BACK
VARMAX(PRPS) 1.000000E10 VARMIN(PRPS)
-1.000000E10 VARMAX(SPH1) 1.000000E10
VARMIN(SPH1) -1.000000E10 VARMAX(TEM1)
1.000000E10 VARMIN(TEM1) -1.000000E10

Group 19. EARTH Calls To GROUND
Station BACK USEGRD T USEGRX T
ASAP T IDISPB 1 IDISPC
100 CSG1 'F' SPEDAT(SET,DOMAIN,PHASE_1_MAT,I
,67) SPEDAT(SET,OBJNAM,OB1,C,LOW)
SPEDAT(SET,IGESTYPE,OB1,C,PLATE)
SPEDAT(SET,OBJNAM,OB2,C,NORTH)
SPEDAT(SET,IGESTYPE,OB2,C,PLATE)
SPEDAT(SET,OBJNAM,OC2,C,NORTH)
SPEDAT(SET,IGESTYPE,OC2,C,USER_DEFINED)
SPEDAT(SET,MATERIAL,67,L,T)
41
END
Write a Comment
User Comments (0)
About PowerShow.com