PHOTON USE
    x
    x1


    msg(  PLANT generated grid
    gr z m
    gr y m
    ENDUSE

  DISPLAY

    PLANT is used to create body-fittted-coordinate grids
    defined by formulae.
    
    Example: Epicycloidal pipe
  ENDDIS

TEXT( Epicycloidal pipe

    GROUP 6. Body-fitted coordinates or grid distortion
nx=44;ny=10;nz=10
bfc=t;dumpc(grid);readco(grid)

CSG1=PHI;CSG2=XYZ;lsweep=1;IDISPA=1
STORE(MARK)
NAMSAT=MOSG

   PLANTBEGIN
real(twopi,littler)
littler=1.0;twopi=2.0*3.14157
real(A,aa,l)
A=1.0;aa=0.25;l=0.75;RG(1)=TWOPI;RG(2)=A;RG(3)=aa;RG(4)=l
    XC= FLOAT(J-1)/FLOAT(NY)*   $
                ((RG(2)+RG(3))*COS(RG(1)*FLOAT(I-1)/FLOAT(NX))$
                -RG(4)*RG(3)*COS((RG(2)+RG(3))/RG(3)*$
                RG(1)*FLOAT(I-1)/FLOAT(NX)))
    YC= FLOAT(J-1)/FLOAT(NY)*   $
                ((RG(2)+RG(3))*SIN(RG(1)*FLOAT(I-1)/FLOAT(NX))$
                -RG(4)*RG(3)*SIN((RG(2)+RG(3))/RG(3)*$
                RG(1)*FLOAT(I-1)/FLOAT(NX)))
    ZC=20.*FLOAT(K-1)/FLOAT(NZ)
   PLANTEND

dmpstk=t
DISTIL=T
EX(MARK)=1.000E-10
 LIBREF=504
STOP