TALK=T;RUN(1,1) 720.htm

#cls
text(In-Form Equivalent Of PLANT Case Z120
title
libref=720
  
  DISPLAY
  
  This In-Form case does what Z120 does, but without fortran coding
  or re-compilation.
  
  First, case z120 is loaded. Then NAMSAT = NONE is set, to 
  deactivate PLANT; and the grid fineness is increased in order to
  make comparison with the exact solution more meaningful.

  It uses the In-Form functions:
      SOURCE and STORED, 
  the former having the 'with line' (i.e. linearisation) condition.

  The Q1 contains PHOTON USE commands
  ENDDIS  
  PHOTON USE
  p
 
 
 
  msg             Numerical solution  contours
  con C1 Z 1 fi;0.001
  msg  Press Enter to continue
  PAUSE
  CLEAR
  con EXAC Z 1 fi;0.001
  msg               Exact solution  contours
  msg Press e to END
  ENDUSE

load(z120) 
text(In-Form equivalent of PLANT case Z120
libref=720

  INFORM13BEGIN
    ** The next line de-activates PLANT **
namsat=none
CONWES=SKIP;DIFWES=SKIP;CONNOR=SKIP
DIFNOR=SKIP;DIFEAS=SKIP;DIFSOU=SKIP
  INFORM13END

     ** The following settings have been chosen as being
        preferable to those of z120, in respect of convergence
        and printout.                                         **            
LSWEEP=110
nx=100;ny=100
#unigrid
  RELAX(C1,FALSDT,5.E-3)
  
     ** In-Form formulae which are equivalent to the
        PLANT formulae of z120                      **
  INFORM13BEGIN
PATCH(iCONWES,WEST,1,1,1,NY,1,NZ,1,LSTEP)
(SOURCE of C1 at iCONWES is RHO1*1.41/2.*$
(EXP(-(:RG(1):)*YG)*SIN(:RG(2):*YG)-C1) with line)
 
PATCH(iDIFWES,WWALL,1,1,1,NY,1,NZ,1,LSTEP)
(SOURCE of C1 at iDIFWES is 2.*RHO1*ENUL*$
(EXP(-(:RG(1):)*YG)*SIN(:RG(2):*YG)-C1)/DXG with line)
 
PATCH(iCONNOR,NORTH,1,NX,NY,NY,1,NZ,1,LSTEP)
(SOURCE of C1 at iCONNOR is -RHO1*1.41/2.*$
(EXP(:RG(1):*(XG-1.))*SIN(:RG(2):*(1.+XG))-C1) with line)

PATCH(iDIFNOR,NWALL,1,NX,NY,NY,1,NZ,1,LSTEP)
(SOURCE of C1 at iDIFNOR is 2.*RHO1*ENUL*$
(EXP(:RG(1):*(XG-1.))*SIN(:RG(2):*(1.+XG))-C1)/DYG with line)
 
PATCH(iDIFEAS,EWALL,NX,NX,1,NY,1,NZ,1,LSTEP)
(SOURCE of C1 at iDIFEAS is 2.*RHO1*ENUL*$
(EXP(:RG(1):*(1.-YG))*SIN(:RG(2):*(1.+YG))-C1)/DXG with line)
 
PATCH(iDIFSOU,SWALL,1,NX,1,1,1,NZ,1,LSTEP)
(SOURCE of C1 at iDIFSOU is 2.*RHO1*ENUL*$
(EXP(:RG(1):*XG)*SIN(:RG(2):*XG)-C1)/DYG with line)
  INFORM13BEGIN
  INFORM7BEGIN
(STORED of EXAC is EXP(:RG(1):*(XG-YG))*SIN(:RG(2):*(XG+YG)))
  INFORM7END
DISTIL=T
EX(U1)=7.071E-01; EX(V1)=7.071E-01
EX(C1)=8.959E-01; EX(EXAC)=8.916E-01
STOP