talk=f;run(1,4)
    GROUP 1. Run title and other preliminaries
TEXT(Transfer objects; 2d convection; 1st run.
LIBREF=856
TITLE
  DISPLAY

  This example illustrates the use of In-Form transfer objects
  for a 2D convection-diffusion problem in the y-z plane.

  This case simulates flow in a channel.

  The inlet flow has a uniform structure.

  North and south walls are immobile and have uniform
  temperature. The source of a non-dimensional concentration
  is set in the first cell only.
  
  The solved area is divided into three parts.

  The solution in each part is made in a separate run.

                         !                 !
        /////////////////!// North Wall ///!///////////////////
        -----------------+-----------------+-------------------
       -->               !                 !                ->
       -->   1st run     !    2nd run      !    3rd run     -->
       -->C              !                 !                ->
        -----------------+-----------------+-------------------
        /////////////////!// South Wall ///!///////////////////
         ^ y             !                 !
         |-------> z-direction

  The 
  TROB1 transfer object at the high boundary is formed at the
  end of the first run by means of an '(export' In-Form statement.

  The second run reads the information at the low boundary from the
  
  TROB1 object by means of an '(import' In-Form statement and
  creates the 
  TROB2 transfer object at the high boundary.

  The third run reads the information at the low boundary from the
  
  TROB2 object.

  The fourth run simulates the flow in the whole channel without
  the partitioned-terrain technique for comparison with the previous
  three runs.

  The Q1 contains PHOTON USE commands
  ENDDIS
  PHOTON USE
  p
  phi1
  1 8 1



  vi -x
  msg picture is enlarged 8 times in y direction
  msg first run
  gr ou x 1
  msg contours of H1 with Pr = 1.5
  set con scale range on
  con h1 x 1 fi;0 1;0.0001;upause 2
  msg velocity vectors
  vec x 1
  upause 2
  con c1 x 1 fi;0 1;0.0001;upause 2
  p
  phi2
  1 8 1



  vi -x
  msg picture is enlarged 8 times in y direction
  msg second run
  gr ou x 1
  msg contours of H1 with Pr = 1.5
  set con scale range on
  con h1 x 1 fi;0 1;0.0001;upause 2
  msg velocity vectors
  vec x 1
  upause 2
  con c1 x 1 fi;0 1;0.0001;upause 2
  p
  phi3
  1 8 1



  vi -x
  msg picture is enlarged 8 times in y direction
  msg third run
  gr ou x 1
  msg contours of H1 with Pr = 1.5
  con h1 x 1 fi;0 1;0.0001;upause 2
  msg velocity vectors
  vec x 1
  upause 2
  con c1 x 1 fi;0 1;0.0001
  upause 2
  p
  phi4
  1 8 1



  vi -x
  msg picture is enlarged 8 times in y direction
  msg third run
  gr ou x 1
  msg contours of H1 with Pr = 1.5
  con h1 x 1 fi;0 1;0.0001;upause 2
  msg velocity vectors
  vec x 1
  upause 2
  con c1 x 1 fi;0 1;0.0001
  enduse

    First run
    ---------

  Problem data
REAL(WINL,VINL,HINL,WMOV,HMOV,POUT,PCOF)
WINL=0.1    ! Inlet X velocity
VINL=0.0    ! Inlet Y velocity
HINL=0.0    ! Inlet enthalpy
WMOV=0.0    ! Moving wall velocity
HMOV=1.0    ! Moving wall enthalpy
POUT=0.0    ! Outlet pressure
PCOF=10000. ! Outlet pressure coefficient
    GROUP 4. Y-direction grid specification
GRDPWR(Y,10,0.01,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,20,0.2,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1,H1,C1)
    GROUP 8. Terms (in differential equations) & devices
  ** De-activate the built-in source term
TERMS(H1,N,Y,Y,Y,Y,Y)
    GROUP 9. Properties of the medium (or media)
ENUL=1.E-5; PRNDTL(H1)=1.5
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=WINL
    GROUP 13. Boundary conditions and special sources
  
  Inlets
PATCH(IN,LOW,1,NX,1,NY,1,1,1,1)
(SOURCE of P1 at IN is coval(fixflu,rho1*WINL))
(SOURCE of W1 at IN is coval(onlyms,WINL))
(SOURCE of V1 at IN is coval(onlyms,VINL))
(SOURCE of H1 at IN is coval(onlyms,HINL))

PATCH(SOURCE,CELL,1,1,1,1,1,1,1,1)
COVAL(SOURCE,C1,FIXVAL,1)
  Walls
PATCH(SW,SWALL,1,NX,1,1,1,NZ,1,1)
(SOURCE of W1 at SW is coval(1.,WMOV))
(SOURCE of H1 at SW is coval(1.,HMOV))
PATCH(NW,NWALL,1,NX,NY,NY,1,NZ,1,1)
(SOURCE of W1 at NW is coval(1.,WMOV))
(SOURCE of H1 at NW is coval(1.,HMOV))
  Outlets
PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUT,P1,PCOF,POUT)

  INFORM13BEGIN
     ! creation export transfer object
PATCH(PAT1,HIGH,1,NX,1,NY,NZ,NZ,1,1)
(EXPORT in TROB1 at PAT1)
  INFORM13END
 
    GROUP 15. Termination of sweeps
LSWEEP=200
    GROUP 22. Spot-value print-out
IYMON=NY/2; IZMON=10; TSTSWP=-1
distil=t
EX(P1)=1.163E-02
EX(W1)=1.000E-01
EX(V1)=3.414E-04
EX(H1)=5.432E-01
EX(C1)=1.484E-01
NSAVE=PHI1
LSG57=T
STOP

    Second run
    ----------

TEXT(Transfer objects; 2d convection; 2nd run.
  Problem data
REAL(WINL,VINL,HINL,WMOV,HMOV,POUT,PCOF)
WINL=0.1    ! Inlet X velocity
VINL=0.0    ! Inlet Y velocity
HINL=0.0    ! Inlet enthalpy
WMOV=0.0    ! Moving wall velocity
HMOV=1.0    ! Moving wall enthalpy
POUT=0.0    ! Outlet pressure
PCOF=10000. ! Outlet pressure coefficient
GRDPWR(Y,10,0.01,1.0)
GRDPWR(Z,20,0.2,1.0)
SOLVE(P1,V1,W1,H1,C1)
TERMS(H1,N,Y,Y,Y,Y,Y)
ENUL=1.E-5; PRNDTL(H1)=1.5
  Walls
PATCH(SW,SWALL,1,NX,1,1,1,NZ,1,1)
(SOURCE of W1 at SW is coval(1.,WMOV))
(SOURCE of H1 at SW is coval(1.,HMOV))
PATCH(NW,NWALL,1,NX,NY,NY,1,NZ,1,1)
(SOURCE of W1 at NW is coval(1.,WMOV))
(SOURCE of H1 at NW is coval(1.,HMOV))
  Outlets
PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUT,P1,PCOF,POUT)

  INFORM13BEGIN
     ! Reading import transfer object
PATCH(PAT1,LOW,1,NX,1,NY,1,1,1,1)
(IMPORT from TROB1 at PAT1)

    ! creation export transfer object
PATCH(PAT2,HIGH,1,NX,1,NY,NZ,NZ,1,1)
(EXPORT in TROB2 at PAT2)
  INFORM13END

LSWEEP=200
IYMON=NY/2; IXMON=10; TSTSWP=-1
distil=t
EX(P1)=1.131E-02
EX(W1)=1.000E-01
EX(V1)=3.341E-05
EX(H1)=8.346E-01
EX(C1)=1.405E-01
NSAVE=PHI2
LSG57=T
STOP

    Third run
    ---------

TEXT(Transfer objects; 2d convection; 3rd run.
  Problem data
REAL(WINL,VINL,HINL,WMOV,HMOV,POUT,PCOF)
WINL=0.1    ! Inlet X velocity
VINL=0.0    ! Inlet Y velocity
HINL=0.0    ! Inlet enthalpy
WMOV=0.0    ! Moving wall velocity
HMOV=1.0    ! Moving wall enthalpy
POUT=0.0    ! Outlet pressure
PCOF=10000. ! Outlet pressure coefficient
GRDPWR(Y,10,0.01,1.0)
GRDPWR(Z,20,0.2,1.0)
SOLVE(P1,V1,W1,H1,C1)
TERMS(H1,N,Y,Y,Y,Y,Y)
ENUL=1.E-5; PRNDTL(H1)=1.5
  Walls
PATCH(SW,SWALL,1,NX,1,1,1,NZ,1,1)
(SOURCE of W1 at SW is coval(1.,WMOV))
(SOURCE of H1 at SW is coval(1.,HMOV))
PATCH(NW,NWALL,1,NX,NY,NY,1,NZ,1,1)
(SOURCE of W1 at NW is coval(1.,WMOV))
(SOURCE of H1 at NW is coval(1.,HMOV))
  Outlets
PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUT,P1,PCOF,POUT)

  INFORM13BEGIN
    ! Reading import
PATCH(PAT1,LOW,1,NX,1,NY,1,1,1,1)
(IMPORT from TROB2 at PAT1)

PATCH(PAT2,HIGH,1,NX,1,NY,NZ,NZ,1,1)
(EXPORT in TROB3 at PAT2)
  INFORM13END

LSWEEP=200
IYMON=NY/2; IZMON=10; TSTSWP=-1
distil=t
EX(P1)=1.131E-02
EX(W1)=1.000E-01
EX(V1)=3.342E-05
EX(H1)=9.380E-01
EX(C1)=1.405E-01
NSAVE=PHI3
LSG57=T
STOP

    Fourth run
    ---------

TEXT(2d conv. without transfer ob. 4th run.
  Problem data
REAL(WINL,VINL,HINL,WMOV,HMOV,POUT,PCOF)
WINL=0.1    ! Inlet X velocity
VINL=0.0    ! Inlet Y velocity
HINL=0.0    ! Inlet enthalpy
WMOV=0.0    ! Moving wall velocity
HMOV=1.0    ! Moving wall enthalpy
POUT=0.0    ! Outlet pressure
PCOF=10000. ! Outlet pressure coefficient
GRDPWR(Y,10,0.01,1.0)
GRDPWR(Z,60,0.6,1.0)
SOLVE(P1,V1,W1,H1,C1)
TERMS(H1,N,Y,Y,Y,Y,Y)
ENUL=1.E-5; PRNDTL(H1)=1.5
FIINIT(W1)=WINL
  Inlets
PATCH(IN,LOW,1,NX,1,NY,1,1,1,1)
(SOURCE of P1 at IN is coval(fixflu,rho1*WINL))
(SOURCE of W1 at IN is coval(onlyms,WINL))
(SOURCE of V1 at IN is coval(onlyms,VINL))
(SOURCE of H1 at IN is coval(onlyms,HINL))

PATCH(SOURCE,CELL,1,1,1,1,1,1,1,1)
COVAL(SOURCE,C1,FIXVAL,1)
  Walls
PATCH(SW,SWALL,1,NX,1,1,1,NZ,1,1)
(SOURCE of W1 at SW is coval(1.,WMOV))
(SOURCE of H1 at SW is coval(1.,HMOV))
PATCH(NW,NWALL,1,NX,NY,NY,1,NZ,1,1)
(SOURCE of W1 at NW is coval(1.,WMOV))
(SOURCE of H1 at NW is coval(1.,HMOV))
  Outlets
PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUT,P1,PCOF,POUT)
 
LSWEEP=200
IYMON=NY/2; IZMON=10; TSTSWP=-1
distil=t
EX(P1)=3.477E-02
EX(W1)=1.000E-01
EX(V1)=1.144E-04
EX(H1)=7.716E-01
EX(C1)=1.432E-01
NSAVE=PHI4
LSG57=T
STOP