#cls
text(In-Form Equivalent Of PLANT Case Z104
title
libref=704
  DISPLAY
  
  This In-Form case does what Z104 does, but without fortran coding
  or re-compilation, namely solves a 2D unsteady diffusion problem
  and compares the result with the exact solution.

  The initial conditions, boundary conditons and source terms are
  such as to ensure that the analytical solution  is:
                   C1 = X + Y + T ,
    where X and Y are cartesian coordinates and T is time.

  First, case z104 is loaded.
  Then NAMSAT = NONE is set, in order to deactivate PLANT entries.

  It uses the In-Form statements:
      INITIAL and SOURCE.

  The Q1 contains PHOTON USE commands
  ENDDIS  
  PHOTON USE
  p;;;;;
 
  con c1 z 1 fi;0.1
  msg             Numerical solution  contours
  msg  Press Enter to continue
  pause;cl
  con exac z 1 fi;0.1
  msg             Exact solution  contours
  msg  Press Enter to continue
  pause;cl
  con errr z 1 fi;0.1
  msg               Error contours. Press e to END
  ENDUSE

load(z104)
  
     ** The next line de-activates PLANT **
   INFORM13BEGIN
namsat=none
ERROR=SKIP
INIT(INIT,C1,0.,0.)
INIT(INIT,EXAC,0.,0.)
COVAL(WEST,C1,0.,0.)
COVAL(EAST,C1,0.,0.)
COVAL(SOUTH,C1,0.,0.)
COVAL(NORTH,C1,0.,0.)
   INFORM13END

     ** The following settings have been chosen as being
        preferable to those of z104, in respect of convergence
        and printout.                                         **
LSWEEP=5  
  
     ** In-Form formulae which are equivalent to the
        PLANT formulae of z104                      **
  INFORM11BEGIN
PATCH(IINIT,INIVAL,1,NX,1,NY,1,NZ,1,1)
(INITIAL of C1 at IINIT IS XG+YG)
(INITIAL of EXAC at IINIT IS XG+YG+TLAST)
  INFORM11END
                     
  INFORM13BEGIN      
PATCH(IWEST,WWALL,1,1,1,NY,1,NZ,1,LSTEP)
(SOURCE of C1 at IWEST IS (TIM+YG-C1)*2./DXG with line)

PATCH(IEAST,EWALL,NX,NX,1,NY,1,NZ,1,LSTEP)
(SOURCE of C1 at IEAST IS (TIM+1.0+YG-C1)*2./DXG with line)
 
PATCH(ISOUTH,SWALL,1,NX,1,1,1,NZ,1,LSTEP)
(SOURCE of C1 at ISOUTH IS (TIM+XG-C1)*2./DYG with line)
 
PATCH(INORTH,NWALL,1,NX,NY,NY,1,NZ,1,LSTEP)
(SOURCE of C1 at INORTH IS (TIM+1.0+XG-C1)*2./DYG with line)
 
PATCH(IERROR,CELL,1,NX,1,NY,1,NZ,1,LSTEP)
(SOURCE of ERRR at IERROR IS TIM+XG+YG-C1 WITH FIXVAL)
  INFORM13END
DISTIL=T
EX(C1)=2.000E+00; EX(EXAC)=2.000E+00; EX(ERRR)=9.861E-03
STOP