There has long existed a PHOENICS module called PINTO which allows large fine-grid simulations to be performed in stages.
At the first stage, a coarse grid is used; then interpolation in the resulting phi file produces a second phi file corresponding to a finer grid.
This file is used as the re-start input to a second-stage calculation; of which the resulting phi-file is again subjected to interpolation and used for a third-stage re-start.
This process continues until the desired finest grid is attained; and the total time of calculation is, if the optimum number of stages is employed, significantly less than if the fine-grid calculation had been started from scratch.
The final converged solution is of course entirely unaffected by the coarseness of the earlier-stage solutions; but it is achieved more rapidly because the finest-grid operation has started from nearly-correct initial fields.
However the existing PINTO is unable to handle the large phi-files which are common in parallel computing.
Further, because PINTO was created well before the introduction of the PARSOL technique, it makes no provision for interpolating in the pbcl.dat file, which would be necessary if all the early-stage calculations were to be conducted with the current default setting: PARSOL=T, when facet-described objects are present.
It can be activated by issuing the DOS command:
runspin
SPINTO then looks for a file, Q1SPIN, containing its instructions, and then for a phi file, and someties for a q1 file, on which to carry them out.
These operations can be those of either refinement or coarsening, for reasons which will be explained below; and the result of SPINTO's speedily-conducted operations is a new phi-format file called NPHI.
Therefore if the user wants to split each cell of grid in X-direction into 2 parts then he should set command REFINE(X,2).
If the user does not want to refine, for example in the X-direction, then he should either use the command: REFINE(X,1) or omit the x-direction command entirely.
NOTE! The ORIGIN command should be used with REFINE commands only.
NOTE! Command SIZE should be used with REFINE commands only.
If the user does not want to coarsen, for example in X-direction, then he should either use the command: COARSE(X,1) or omit the x-direction command entirely.
NOTE! The COARSE command should be used with SAVEGRD commands only (see below).
NOTE! Command USEGRID should be single command besides command STOP (see below).
These commands allow users to test whether it is indeed better to use interpolation (which sometimes involves extrapolation also) or simply to place the average values of the coarse cell into each of the finer cells into which it is split.
Insufficient experience has been gathered so far to indicate which practice is the better one (if indeed such a general conclusion can be drawn).
NOTE! These commands should be used only in conjunction with REFINE commands.
SPINTO allows three methods of working.
Method 1.
If the user wishes to make runs with two levels of refinement, the refinement factor being two-fold in each direction, he should do the following:
Prepare the file q1spin, containing the next lines:
REFINE(X,2) REFINE(Y,2) REFINE(Z,2) STOP
Method 2.
If the user wishes to make the following sequence of operations:
REFINE(X,2) REFINE(Y,2) REFINE(Z,2) ORIGIN(0.1,0.1,0.1) SIZE(0.8,0.8,0.8) STOP
Method 2 has not been exemplified below; and indeed experience of using it is not yet extensive.
The underlying idea is that, in circumstances such as are represented by example 4.3 below, in which the region of interest is small in comparison with the whole domain, a coarse grid is quite sufficient for simulating the flow in regions remote from the body; consequently it is only the region which is close to the body which requires refinement.

Method 3.
The third method is useful when the user wishes to be sure that his coarser grids exactly correspond to the finest grid after refinement.
It is especially useful when the grid is non-uniform, being made so, perhaps, to conform with the bounding boxes of VR-objects.
In this case he should make the next sequence of operations.
SAVEFINE STOP
COARSE(X,2) COARSE(Y,2) COARSE(Z,2) SAVEGRD(COARSE) STOP
USEGRID(FINE) STOP
It conducts a two-stage calculation with one coarse grid and one fine grid.
It is activated by the following command:
SPIN_LEV.BAT 2
Files FINE.grd, FINE.PBC, FINE.q1, COARSE.q1 and COARSE.grd will then be created.
It is necessary to copy COARSE.q1 to q1, edit it if it is necessary to change parameters of relaxation, run satellite and earth to achive converged solution.
Thereafter it is necessary:
@echo off if %1*==* goto MES if defined phoenics (set pho=%phoenics%) else set pho=\phoenics SET UTILS=%pho%\d_utils\d_windf\ if not exist PHI goto MES1 if not exist Q1 goto MES2 ECHO SAVEFINE > Q1SPIN ECHO STOP >>Q1SPIN call %UTILS%spin.bat if exist SPINTO_LOG.FINE del SPINTO_LOG.FINE ren SPINTO_LOG SPINTO_LOG.FINE if %1*==1* goto STOP if %1*==2* goto LEV2 if %1*==3* goto LEV3 if %1*==4* goto LEV4 :LEV2 ECHO COARSE(X,2) > Q1SPIN ECHO COARSE(Y,2) >>Q1SPIN ECHO COARSE(Z,2) >>Q1SPIN ECHO SAVEGRD(COARSE) >>Q1SPIN ECHO STOP >>Q1SPIN call %UTILS%spin.bat if exist SPINTO_LOG.1 del SPINTO_LOG.1 ren SPINTO_LOG SPINTO_LOG.1 goto STOP :LEV3 ECHO COARSE(X,2) > Q1SPIN ECHO COARSE(Y,2) >>Q1SPIN ECHO COARSE(Z,2) >>Q1SPIN ECHO SAVEGRD(COARSE_1) >>Q1SPIN ECHO STOP >>Q1SPIN call %UTILS%spin.bat if exist SPINTO_LOG.1 del SPINTO_LOG.1 ren SPINTO_LOG SPINTO_LOG.1 ECHO COARSE(X,4) > Q1SPIN ECHO COARSE(Y,4) >>Q1SPIN ECHO COARSE(Z,4) >>Q1SPIN ECHO SAVEGRD(COARSE_2) >>Q1SPIN ECHO STOP >>Q1SPIN call %UTILS%spin.bat if exist SPINTO_LOG.2 del SPINTO_LOG.2 ren SPINTO_LOG SPINTO_LOG.2 goto STOP :LEV4 ECHO COARSE(X,2) > Q1SPIN ECHO COARSE(Y,2) >>Q1SPIN ECHO COARSE(Z,2) >>Q1SPIN ECHO SAVEGRD(COARSE_1) >>Q1SPIN ECHO STOP >>Q1SPIN call %UTILS%spin.bat if exist SPINTO_LOG.1 del SPINTO_LOG.1 ren SPINTO_LOG SPINTO_LOG.1 ECHO COARSE(X,4) > Q1SPIN ECHO COARSE(Y,4) >>Q1SPIN ECHO COARSE(Z,4) >>Q1SPIN ECHO SAVEGRD(COARSE_2) >>Q1SPIN ECHO STOP >>Q1SPIN call %UTILS%spin.bat if exist SPINTO_LOG.2 del SPINTO_LOG.2 ren SPINTO_LOG SPINTO_LOG.2 ECHO COARSE(X,8) > Q1SPIN ECHO COARSE(Y,8) >>Q1SPIN ECHO COARSE(Z,8) >>Q1SPIN ECHO SAVEGRD(COARSE_3) >>Q1SPIN ECHO STOP >>Q1SPIN call %UTILS%spin.bat if exist SPINTO_LOG.3 del SPINTO_LOG.3 ren SPINTO_LOG SPINTO_LOG.3 goto STOP :MES echo Script SPIN_LEV.BAT should be run as echo SPIN_LEV.BAT [LEVEL] echo where [LEVEL] - integer count levels of coarsening without brackets echo if [LEVEL] = 1 then script create only fine grid without coarsening echo if [LEVEL] = 2 then script create fine grid and echo one Q1 with coarsen grid by 2 in each direction echo if [LEVEL] = 3 then script create fine grid and echo two Q1s with coarsen grid by 2 and 4 in each direction echo if [LEVEL] = 4 then script create fine grid and echo three Q1s with coarsen grid by 2, 4 and 8 in each direction echo [LEVEL] more than four is not allowed. If you need more levels, echo please, edit script. echo If you have problems with this script then be sure that line echo SET UTILS indicates to correct path on your PC and echo script spin.bat works properly. goto FIN :MES1 echo File PHI is absent in current directory. echo Please, place file PHI to current directory goto FIN :MES2 echo File Q1 is absent in current directory. echo Please, place file Q1 to current directory goto FIN :STOP if not exist PHI goto FIN if exist FINE.PHI del FINE.PHI ren PHI FINE.PHI if exist FINE.PBC del FINE.PBC ren PBCL.DAT FINE.PBC :FIN
If a long (400-sweep) run is made the graphical-monitor display of the convergence behaviour is as shown below:

Evidently, even after 400sweeps, with an associated computer time of 2283 seconds, the pressure field has not quite converged.
Its contours on the symmetry axis are shown below:

The script, which can be inspected by clicking here causes six 30-sweep runs to be performed as follows:
The symmetry plane pressure distribution is shown below:

It is very similar to that of the 2283-second run. The final graphical-monitor output was as follows:

Evidently small sweep-to-sweep changes in the maximum and minimum variables are still occurring; but it can be concluded that the SPINTO-aided run series has produced a solution which is very nearly as good as that of the 400-sweep non-SPINTO run in less than a quarter of the computer time.
Increasing each of NX, NY and NZ four-fold would improve the accuracy; but the computer time would increase by a much larger factor. Therefore the stage-by-stage coarsening allowed by PINTO may bring some advantage.
This has been investigated in the following manner:-

Here it is seen that the last-sweep maximum and minimum pressure in the domain are 1.29 and -0.575 respectively, and that their last sweep-to-sweep changes were 5.73E-3 and -2.89E-3 respectively.
To judge from the shapes of the red curves, convergence has not yet been reached; but it appears to be close.
The sweep-to-sweep variations of the velocity components are very small.

Here it is seen that the maximum and minimum pressures, namely 1.45 and -0.675 are significantly different from before, and that the final sweep-to-sweep variations are an order of magnitude greater.
It seem reasonable to conclude that the 40-sweep SPINTO-assisted run is of higher accuracy than the 80-sweep un-assisted run.
One may conclude that SPINTO assistance has provided a better solution in little more than half the computer time.

Of special interest is the flow in the immediate vicinity of the obstacle, shown in the following images:



Evidently PARSOL is active.
Many runs were made, both with SPINTO and without; and they showed convincingly that the use of SPINTO both increase the accuracy of the final calculation and significantly reduces the computer time needed to achieve it.
Sufficient proof is afforded by the following images, of which the first is the monitor screen of the fourth of four LSWEEP=50 runs, namely:

The graphical monitor is being used in the whole-domain-maximum-and-minimum mode.
The left-hand box shows that the maximum pressure (red curve), for example, has varied between 2.9E3 and 3.3E3 pascals during the run, and has become 2.97E3 at its end.It has not quite stopped varying; but its change in the last sweep was 2.53E-1 pascals, i.e. less that 0.01 % of the absolute value.
The right-hand box shows that the minimum pressure has also almost settled to an unchanging value, its latest change being even less than that of the maximum pressure.
Inspection of the curves and values pertaining to the other variables gives a similar impression of near-convergence.
The computer times of the four runs were: 2, 9, 36, and 184 seconds respectively. i.e. 231 in total.
Those results were achieved by the use of SPINTO. Now let us examine the final monitor displays of a 400-sweep run in which SPINTO was not used, shown below.

At first glance it might appear that the convergence is not bad; for the right-hand halves of the red curves appear to be nearly horizontal. However this is explained by the fact that the ranges (i.e. differences between 'low' and 'high') are much bigger than before.
Inspection of the corresponding last-change values show that the domain-minimum values of pressure are still changing at the rate of 1.96 pascal per sweep; and that the minimum pressure (-5.26E3) is still a long way from the -4.66E3 pascals shown in the previous calculation.
It is therefore justifiable to claim that the 50-sweep 'spintoed' run gave a better solution than the 400-sweep run which did not use SPINTO.
Moreover the computer time for the latter was 1723 second, i.e. more than 7 times that of the total of all four runs of the SPINTO-using calculation.
There are many variants which have not yet been tried.This document must therefore be regarded as a report on work in progress.
Information about the experiences of others who experiment with SPINTO will be gratefully received by the authors.