PHOTON USE
    x
    x1


    msg(  PLANT generated grid
    rot z ang 30
    gr y m
    gr z 1
    gr z m
    ENDUSE

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

    Example: 3D S-shaped circular pipe
  ENDDIS


TEXT( 3D S-shaped circular pipe

    GROUP 6. Body-fitted coordinates or grid distortion
real(length,twopi,littler)
length=10.0;littler=1.0;twopi=2.0*3.14157
nx=8;ny=6;nz=10
bfc=t
dumpc(grid);readco(grid)
CSG1=PHI;CSG2=XYZ;lsweep=1;IDISPA=1
STORE(MARK)
NAMSAT=MOSG

   PLANTBEGIN
real(length,twopi,littler)
length=10.0;littler=1.0;twopi=2.0*3.14157
nx=8;ny=6;nz=10
    XC=SIN(:LENGTH:*FLOAT(K-1)/FLOAT(NZ))+$
               :LITTLER:*FLOAT(J-1)/FLOAT(NY)* $
               COS(:TWOPI:*FLOAT(I-1)/FLOAT(NX))
    YC=SIN(:LENGTH:*FLOAT(K-1)/FLOAT(NZ))+$
               :LITTLER:*FLOAT(J-1)/FLOAT(NY)* $
               SIN(:TWOPI:*FLOAT(I-1)/FLOAT(NX))
    ZC=:LENGTH:*FLOAT(K-1)/FLOAT(NZ)
   PLANTEND

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