PHOTON USE
  p
  p1
 
 
  vi 1 1 1;rot y ang 30
  gr ou x 1
  gr ou y 1
  gr ou z 1
  gr ou x m
  gr ou y m
  gr ou z m
  msg  Drilling diagonal tube in a cube
  msg  Please wait .....
  surf mark x 0.99
  msg  Hit Enter to continue
  pause
  p
  p2
 
 
  msg  Drilling the cone in a cube
  con mark z 20 x 21 40 y 1 m fil;.01
  con mark x 20 y 1 m z 21 40 fil;.01
  msg  Please wait .....
  surf mark x 0.99
  msg  Hit Enter to continue
  pause
  p
  p3
 
 
  msg  Drilling the spherical chamber
  con mark z 20 x 21 40 y 1 m fil;.01
  con mark x 20 y 1 m z 21 40 fil;.01
  msg  Please wait .....
  surf mark x 0.99
  msg  Hit Enter to continue
  pause
  p
  p4
 
 
 
  msg Drilling the junction
  con mark z m x 1 20 fil;.01
  con mark x 20 y 1 m x 1 m fil;.01
  con mark y m x 1 20 z 1 m fil;.01
  msg  Please wait .....
  surf mark y 0.99
  msg  Hit E to finish
  ENDUSE
  >>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>
 
  DISPLAY
    This input demonstrates the "drilling-milling" technique
    available  in  PLANT  to generate marker distribution to
    fit the complex shapes on cartesian  grids.  The  method
    rests  on  PLANT  ability  to  handle  virtually  "live"
    mathematical  expressions  as  the  arguments   of   its
    functions.
 
    All cases  of the file are wholly focused on calculation
    of marker disributions.  Therefore, no other actions are
    supported by input data.
 
    Four different  cases,  in which the one spherical drill
    bit is used to get different  shapes,  are  arranged  as
    unsteady  problem:  at  each  time moment the new marker
    distribution  is  PLANTed  calculated  and  dumped  into
    specified file to be viewed by PHOTON commands supplied
  ENDDIS
 
    PLANT information :
     * Data input groups used: 11, 19
     * Ground groups planted : 11, 19-6
     * Headings used  : INIT??, SC06??
     * Functions used : SPHERE
     * Commands used  : IF, REGION
 
  <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<<
    GROUP 1. Run title and other preliminaries
TEXT( DRILling BOX: CARTES =T
STEADY=F
GRDPWR(T,4,4.,1.0)
    GROUP 3. X-direction grid specification
GRDPWR(X,40,20.,1.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,40,20.,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,40,20.,1.0)
    GROUP 7. Variables stored, solved & named
STORE(MARK)
    GROUP 11. Initialization of variable or porosity fields
iniadd=f
 
NAMSAT=MOSG
FIINIT(MARK)=1.0


      PLANTBEGIN 
    1.  Drilling the tube in a cube
PATCH(INI1,INIVAL,1,NX,1,NY,1,NZ,1,1)
   VAL=SPHERE(0.,XG2D,XG2D,XG2D,2.5)
INIT (INI1,MARK,0.,GRND)
  >>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>
    In above  settings the coordinates of SPHERE vary with X
    direction coordinate.  For uniform  grid  it  makes  the
    SPHERE function to "drill" the circular diagonal pipe of
    2.5 diameter in a cube.  Each cell of the pipe  has  the
    marker MARK=0.0.
  <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<<
    2.  Drilling the cone
   MARK=1.
  IF(ISTEP.EQ.2.AND.LSWEEP.EQ.1)
   MARK=SPHERE(0.,10.,YG2D,10.,0.25*(-YG2D+20.))
  IF(ISTEP.EQ.2.AND.LSWEEP.EQ.1)
  >>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>
    The centre  of SPHERE "drill bit" goes verticall upwards
    along the line of X=10 and Z=10. The "drill" diameter is
    linearly  diminished.  It  results  in conical step-wise
    fitting.
  <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<<
    3.  Drilling spherical chamber
   MARK=1.
  IF(ISTEP.EQ.3.AND.LSWEEP.EQ.1)
   MARK=SPHERE(0.,10.,10.,10.,8.)
  IF(ISTEP.EQ.3.AND.LSWEEP.EQ.1)
   MARK=SPHERE(0.,XG2D,16.,10.,2.)
  REGION(1,20,1,NY,1,NZ,3,3) /LSWEEP.EQ.1
   MARK=SPHERE(0.,XG2D,4.,10.,2.)
  REGION(21,NX,1,NY,1,NZ,3,3) /LSWEEP.EQ.1
  >>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>
    The SPHEREs are used to "drill"  two  cylindrical  pipes
    joining  tangentially the spherical chamber at its upper
    and lower poles.
  <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<<
    4. Drilling the junction
   MARK=1.
  IF(ISTEP.EQ.4.AND.LSWEEP.EQ.1)
   MARK=SPHERE(0.,10.,5.,ZGNZ,3.)
  REGION(1,NX,1,NY,10,NZ,4,4) /LSWEEP.EQ.1
   MARK=SPHERE(0.,10.,15.,ZGNZ,3.)
  REGION(1,NX,1,NY,10,NZ,4,4) /LSWEEP.EQ.1
   MARK=SPHERE(0.,10.,YV2D,10.,3.)
  REGION(1,NX,10,30,1,NZ,4,4) /LSWEEP.EQ.1
  >>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>
    Just three above statements are needed to "drill"  in  a
    cube  two parallel cylinders joined the vertical pipe of
    the same diameter.
  <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<<
   PLANTEND
 
    GROUP 15. Termination of sweeps
LSWEEP=1
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 23. Print-out & plot control
idispa=1;csg1=p
dmpstk=t
  The next statement is needed, for version 3.3, to ensure that the
  mark-setting sequences are entered for the later time steps.
DISTIL=T
EX(MARK)=8.742E-01
 LIBREF=602
STOP