PHOTON USE
    x
    x1


    msg(  PLANT generated grid
    up x
    gr y m
    gr ou z 1
    gr ou z m
    ENDUSE

  DISPLAY

    PLANT is used to create body-fittted-coordinate grids
    defined by formulae.
    

    Example: 3D helically coiled pipe
  ENDDIS


TEXT( 3D helically coiled pipe

    GROUP 6. Body-fitted coordinates or grid distortion
real(twopi,littler)
littler=.25;twopi=2.0*3.14157
nx=8;ny=6;nz=140
bfc=t
dumpc(grid);readco(grid)
store(mark)
CSG1=PHI;CSG2=XYZ;lsweep=1;idispa=1
NAMSAT=MOSG

   PLANTBEGIN
real(twopi,littler)
littler=.25;twopi=2.0*3.14157
    XC=:LITTLER:*FLOAT(J-1)/FLOAT(NY)*   $
                COS(:TWOPI:*FLOAT(I-1)/FLOAT(NX))+$
                1.*COS(4.75*6.28314*FLOAT(K-1)/FLOAT(NZ))
    YC=:LITTLER:*FLOAT(J-1)/FLOAT(NY)*   $
                SIN(:TWOPI:*FLOAT(I-1)/FLOAT(NX))+$
                1.*SIN(4.75*6.2831*FLOAT(K-1)/FLOAT(NZ))
    ZC= 0.0*6.2831*FLOAT(K-1)/FLOAT(NZ)+$
                5.5*FLOAT(K-1)/FLOAT(NZ)
   PLANTEND

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