PHOTON USE
    x
    x1


    msg(  PLANT generated grid
    rot z ang 90
    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 corrugated circular pipe
  ENDDIS

TEXT( 3D corrugated circular pipe

    GROUP 6. Body-fitted coordinates or grid distortion
nx=25;ny=6;nz=20
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
    XC=ABS(COS(:LENGTH:*FLOAT(K-1)/FLOAT(NZ)))+$
               :LITTLER:*FLOAT(J-1)/FLOAT(NY)* $
               COS(:TWOPI:*FLOAT(I-1)/FLOAT(NX))
    YC=ABS(COS(: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=501
STOP