Encyclopaedia Index
Contents
- About PINTO
- What PINTO does
- What PINTO cannot do
- The interaction between PINTO and other PHOENICS programs
- About Q1PIN
- How to use PINTO
1. About PINTO
PINTO, the PHOENICS INTerpolation prOgram, is a stand-alone code of the
PHOENICS program that can be used to transfer the results calculated by
EARTH on to finer or coarser grids.
PINTO proceeds by interpolation on to the new grid the values of the
variables saved by EARTH in the PHI file for the old grid. These variables
are those for which the user requested, in the Q1 file, a solution
(through SOLVE) or the allocation of storage space (through STORE).
Thus, PINTO can be used to:
- Interpolate the results obtained for a coarse grid on a finer grid,
so atht these can be used as initial guesses for the computation
(PIL command RESTRT).
- Interpolate the results obtained for a grid on to one having a
different dimensionality, as initial guesses for the new computation.
- Interpolate the results obtained for a grid on to a finer grid, prior
to analysis through PHOTON or AUTOPLOT. This technique can be used to
increase the resolution of the plot (eg. A denser vector field in PHOTON).
- Interpolate the results obtained for a grid on to a coarser grid, prior
to analysis through PHOTON or AUTOPLOT. This 'thinning-out' of the
results will decrease the processing time needed by the graphics program,
and also the storage requirements.
PINTO takes its input from a special Q1 file (Q1PIN), which accepts a
subset of instructions of the PHOENICS Input Language (PIL) with some
extensions.
As an aid to the user, PINTO records its transaction with the command-file
Q1PIN in a log file (PINLOG), in which syntactical errors made in the
command statements are recorded. The coordinates of the new grid are also
written to this file, both for checking and for copying into the Q1 file
that will be used for the fine-grid calculation.
2. What PINTO does
- Interpolation: PINTO performs, according to the dimensionality of the
problem, a linear, bi-linear or tri-linear interpolation of the results
on the old grid on to the new grid. It is also equipped with an option
that allows the assignment of the value at the nearest point in the old
grid, without interpolation.
- Grid systems: PINTO can handle all the grid types available in PHOENICS
viz Cartesian, cylindrical polar and curvilinear (body-fitted) coordinates
in PHOENICS.
- Grid manipolation: PINTO provides simple commands for defining the grid
by doubling, trippling, quadrupling, etc the number of cells in each
direction. It also allows the repositioning of the origin, so that the
new grid can, for instance, surround the old grid. PINTO will also allow
the dimensionality of the new problem to differ from the dimensionality
of the old one.
- File handling: PINTO can handle both sequential and direct-access PHI-files;
and it can produce, as output, either type of file, regardless of the
input type. PINTO can therefore be used for file-type conversion.
3. What PINTO cannot do
- Interpolation between different types of grid. For instance, you cannot
use PINTO to interpolate results from a Cartesian grid on to a BFC grid.
- Generation of XYZ files for the new BFC grid; these have to be generated
by the user, through the Q1 file for the new problem.
- Although PINTO interpolates BFC grids, the interpolation scheme is a
simplified one, in that it assumes that the grid is a uniform one.
- Interpretation of some of PIL commands and special PATCH names in Q1 files.
For example, PINTO does not recognise semi-colon, ';' as continuation sign,
REGIONS and % sign in the PATCH command.
4. The interaction between PINTO and other PHOENICS programs
PINTO will normally be used in combination with other PHOENICS programs,
as follows:
- The user will have a Q1 file that performs a coarse-grid computation.
After running the SATELLITE and EARTH, a PHI file with the result for
the coarse grid will be generated.
- The user will then write a Q1PIN file for the interpolation of the
coarse-grid results into the fine grid. The Q1PIN file will have
settings to define the new grid and to control the format and name of
the output files.
- PINTO will then be run by entering the command runpin (or runpins for
Salford version). On execution, PINTO will read in the Q1PIN file and
will generate a PHI-like file with the new file values for the variables
on the refined grid. APINLOG file will also be generated, containing a
description of the new grid and any error message.
After a PINTO run, it is essential to inspect the PINLOG file for errors.
PINTO does not write any error messages to the screen, and the contents
of this is therefore the same for successful and erroneous runs.
- The new PHI file can then be used by the user in several ways:
- As the input file for the graphics program, PHOTON.
- As a restart file for a computation on the finer grid. In this case,
a Q1 file will have to provided by the user, describing the problem in the
same new grid; and the SATELLITE and EARTH will have to be run.
A flow chart of PINTO is provided below:
Q1
|
SATELLITE
|
EARDAT
|
PREFIX EARTH
| |
PINCON | Q1PIN PHI (or PHIDA)
| � | | |
---------------------------------------------
| PINTO |
---------------------------------------------
| �
NPHI (or NPHIDA) PINLOG
|
EARTH (or PHOTON)
5. About Q1PIN
Q1PIN, input file for PINTO, is similar in concept to the Q1 file used by
the SATELLITE, which the reader is assumed to be familiar with.
Q1PIN is divided into 3 groups, as follows:
Group 1: Grid specification
Group 2: Interpolation controls
Group 3: File handling
The set of commands used by PINTO comprises some PIL commands, and some
additional ones which are unique to PINTO. As in the PIL, the group
structure of PINTO has been conceived just as an aid-memory for the user:
PINTO commands do not need to be in the group they belong to.
Unlike the Q1 file, the Q1PIN file does not need to have a special first
line (TALK=T;RUN=1,1) of the Q1 file; but the end of the Q1PIN file must
be flagged with a STOP command.
Finally, PINTO commands must start in the first or second column of the file;
and all other lines are treated as comments.
PINTO language is much more limited than the PIL. Please refer to TR218
for what commands will be recognised by PINTO.
6. How to use PINTO
This section describes how to use PINTO to perform the file handling and the
grid interpolation.
1. File handling.
The steps in the execution of the file handling are:
- to activate runsat (or runsats for Slaford version) in order to load a
library case;
- to set Compress = off in the cham.ini file in the directory
\phoenics\d_allpro;
- to activate runear (or runears for Salford version); (it is assumed
that PHIDA=F in the prefix file );
- to prepare a Q1PIN file where LDA=T is set;
- to activate runpin (or runpins for Salford version) which will produce
a direct-access file, NPHIDA;
Similarly, a PHIDA file produced by EARTH, when PHIDA=T is set in prefix,
can be converted to a formatted sequential file, NPHI by modifying the
Q1PIN file and replacing LDA=T by LFS=T.
2. Grid interpolation.
The steps in the execution of the grid interpolation are: