PHOTON USE
    x
    x1


    msg(  PLANT generated grid
    gr z 1
    ENDUSE

  DISPLAY

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

    Example: 2D zigzag channel
  ENDDIS


TEXT( 2D zigzag channel

    GROUP 6. Body-fitted coordinates or grid distortion
nx=150;ny=10;nz=1
bfc=t;lsweep=1;CSG1=PHI;CSG2=XYZ;IDISPA=1
store(mark)
dumpc(grid);readco(grid)
NAMSAT=MOSG

     PLANTBEGIN
    XC=12*1.5714/FLOAT(NX)*FLOAT(I-1)
    YC=1.5714-4/3.1428*$
               (COS(XC)+COS(3*XC)/9+COS(5*XC)/25+$
                COS(7*XC)/49+COS(9*XC)/81+$
                COS(11*XC)/121+COS(13*XC)/169)+$
                2.*FLOAT(J-1)/FLOAT(NY)
    ZC=1.*FLOAT(K-1)/FLOAT(NZ)
    PLANTEND
dmpstk=t
DISTIL=T
EX(MARK)=1.000E-10
 LIBREF=511
STOP