Encyclopaedia Index

Back to main contents

13. Use of In-Form with parallel Phoenics

Contents of Section 13

  1. Relevant features of parallel Phoenics
  2. In-form statements which can be used
  3. In-Form statements which can not yet be used

13.1 Relevant features of parallel Phoenics

Parallel Phoenics works by decomposing the complete flow domain into several sub-domains, each of which is handled by a separate processor.

Internally, each sub-domain uses its own local indexing of cells, its own local values of NX,NY,NZ and its own local lists of patches and VR-Objects.

It is because of these features that special care must be taken in the writing of In-Form statements when PHOENICS is to operate in parallel mode.

The statements which present special difficulty are those which require one processor to have knowledge of data which until now have been known only to other processors.

A feature introduced with PHOENICS-2008 partly overcomes this difficulty. It ensures that selected items of information are made accessible to all processors.

Exploiting this new possibility requires some In-Form statements which are acceptable to sequential PHOENICS to be re-written so as to be accepted by parallel PHOENICS, as will be explained below.

13.2 In-form statements which can be used

Almost all statements and functions of In-Form work equally well with parallel and sequential (i.e. multi-processor and single-processor) PHOENICS.

In the descriptions which follow, the indices IX,IY,IZ, numbers of cells NX,NY,NZ and physical coordinates in {} operators are all in global space.

Among those which did not work prior to PHOENICS 2008 but now do so satisfactorily are the following:

  1. The variables IX, IY, IZ, NX, NY,NZ may be used in any STORED, SOURCE and STORE1 statements and IF-operators:
        (STORED TS is TEM1*VOL with if(IX.LT.NX/2.AND.IY.LT.NY/3)!SWPFIN)
  2. Operators {} in any STORE1 formulas:
        (MAKE of XPP1 is 0.01)
    
        (MAKE of XPP2 is 0.74)
    
        (MAKE of YPP1 is 0.338)
    
        (MAKE of YPP2 is 0.98)
    
        (MAKE of D_UU)
    
        (STORE1 D_UU is -100*(U1{XPP1,YPP1} - U1{XPP2,YPP2}) with SWPFIN)
    
        (print of U1_different is D_UU)
  3. Operators [] with fixed indexes in any STORE1 formulas:
       (MAKE of IXP1 is 1)
    
       (MAKE of IXP2 is 3*NX/4)
    
       (MAKE of IYP1 is NX/4)
    
       (MAKE of IYP2 is NY)
    
       (MAKE of D_PI)
    
       (STORE1 D_PI is -100*(P1[IXP1,IYP1,1] - P1[IXP2,IYP2,1]) with SWPFIN)
    
       (print of P1I_different is D_PI)

    Note that expressions involving the use of {} and [] can not be used directly in SOURCE, STORED, INITIAL or PROPERTY statements.

    However, the desired end can be achieved in two stages by the use of STORE1. For example, instead of:

        (STORED of TDIF is 100*(TEM1 - TEM1[NX/2,NY/2,1]))
    
        (SOURCE of TEM1 at SRAD is 0.1*(TEM1{0.56,0.45,0.8}-TEM1) with LINE)

    one can write:

        (MAKE of TSENSA)
    
        (MAKE of TSENSB)
    
        (STORE1 TSENSA is TEM1[NX/2,NY/2,1])
    
        (STORE1 TSENSB is TEM1{0.56,0.45,0.8})
    
        (STORED of TDIF is 100*(TEM1 - TSENSA))
    
        (SOURCE of TEM1 at SRAD is 0.1*(TSENSB-TEM1) with LINE)
  4. In STORE1-operators can be used SUM() in any appearances with any IF-operators and with any patches and VR-Objects:
       **** SUM() and IF with XYZ ***
    
       (MAKE of TSUMX is 0)
    
       (MAKE of VSUMX)
    
       (STORE1 TSUMX is SUM(TEM1*VOL) with if(XG.LT.0.8.AND.YG.LT.0.5)!SWPFIN)
    
       (STORE1 VSUMX is SUM(VOL) with if(XG.LT.0.8.AND.YG.LT.0.5)!SWPFIN)
    
       (STORE1 TSUMX is TSUMX/VSUMX!SWPFIN)
    
    
    
       ****  SUM() and IF with IX/IY/IZ ***
    
       (MAKE of TSUMI is 0)
    
       (MAKE of VSUMI)
    
       (STORE1 TSUMI is SUM(TEM1*VOL) with if(IX.LT.30.AND.IY.LT.20)!SWPFIN)
    
       (STORE1 VSUMI is SUM(VOL) with if(IX.LT.30.AND.IY.LT.20)!SWPFIN)
    
       (STORE1 TSUMI is TSUMI/VSUMI!SWPFIN)
    
       (print of TSUMI is TSUMI)
    
    
    
       ****  SUM() and VRObject ****
    
      (MAKE of TSUMP is 0)
    
      (MAKE of VSUMP)
    
      (STORE1 TSUMP at SENTEM is SUM(TEM1*VOL) with SWPFIN)
    
      (STORE1 VSUMP at SENTEM is SUM(VOL) with SWPFIN)
    
      (STORE1 TSUMP is TSUMP/VSUMP!SWPFIN)
    
    
  5. Operators [] with relative indexes (+-1 or +-2) in any formulas:
        PATCH(DPDX1,EAST,2,NX-1,1,NY,1,1,1,1)
    
        (SOURCE of UC1 at DPDX1 is (P1[-1]-P1[+1])/2.)
    
    
  6. EAST, WEST, NORTH, SOUTH, HIGH or LOW functions in any formulas:
        PATCH(DPDY1,NORTH,1,NX,2,NY-1,1,1,1,1)
    
        (SOURCE of VC1 at DPDY1 is (SOUTH(P1)-NORTH(P1))/2.)
    
    
  7. Print operators for scalar STORE1 variables:
      (MAKE UR)
    
      (STORE1 of UR at INOUT is SUM(AHIGH) with SWPFIN)
    
      (print urFIRST is ur)
    
    
    
      (MAKE UB)
    
      (STORE1 of UB at INOUT is SUM(W1*AHIGH)/UR with SWPFIN)
    
      (print ubLAST is ub)
    
    

    Variables are printed to the INFOROUT file (as in sequential mode).

  8. Print operators for STORE arrays , for example:
      patch(inout,cell,1,nx,1,ny,nz-3,nz-3,1,1)
    
      (print FLUX at inout is w1*ahigh)

    will not work in parallel mode.

    However, instead of this single operator, the following operators can be used:

      (stored of FLUX is w1*ahigh with IF(IZ.EQ.NZ-3))

    or

      (stored of FLUX at inout is w1*ahigh)
    
    

    In this case the FLUX array is printed in the Result file.

13.3 In-Form statements which can not yet be used

In the current version of In-Form it is impossible to use the following operators:

  1. Operators [] with relative indexes using offset value great 2;
  2. (INFOB or (MOVOB statements;
  3. SSUM function;
  4. SPHERE or BOX functions;
  5. POINT or LINE functions;
  6. INFOB flag.
  7. PRINT operators for user defined arrays.