GROUP 1. Run title and other preliminaries
TEXT(Injection In Channel By In-Form.
TITLE
  DISPLAY
   This example illustrates a use of In-Form for the introduction
   of input boundary conditions for TEM1 variable.

   As a problem is considered injection into a plane flow.

                                                           ! 
                                     !                     ! 
               \!/                  \!/   Wall            \!/
              /////////////////////////////////////////////////////
  Non-uniform -----------------------------------------------------
  specified   ->                                                ->
  mass-flux   -->                                               -->
  and         --->                                              --->
  velocity    - - - - - - - - - - -Symmetry plane - - - - - - - - -
               ^ y
               |-------> x-direction


  The inlet flow has a parabolic structure. Inflowing gas has
  TEMINL temperature. It is supposed that the specific heat of
  the inflowing material is the same as that in domain. In this
  case it is enough to specify the inlet temperature value only
  in a boundary condition. EARTH automatically multiplies the
  inflow temperature TEMINL by the specific heat which prevails
  in the cells into which the mass is flowing.

  The injection size on a wall is increased proportionally
  to its length. Injecting gas has TEMINJ temperature. It is
  supposed that injecting gas has the CPINJ specific heat
  distinguished from that inside the domain. In this case
  in the boundary condition it should multiply the injecting
  temperature value on the injecting specific heat and to use
  the special name of the PATCH command of which begins on 'NOCP'.

  The Q1 contains PHOTON USE commands
  ENDDIS
  PHOTON USE
  p
  phi
  1 8 1
 
  msg picture is enlarged 8 times in y direction
  gr ou z 1
  msg contours of TEM1
  con tem1 z 1 fi;0.001;upause 2
  msg velocity vectors
  vec z 1
  enduse

REAL(VELMAX,VELINJ,TEMINL,TEMINJ,CPINJ)
VELMAX=0.5   !   maximum of inlet velocity
VELINJ=0.1   !   maximum of injecting velocity
TEMINL=0.0   !   temperature of inlet gas
TEMINJ=1.0   !   temperature of injecting gas
CPINJ=5000.  !   specific heat of injecting gas

  GROUP 3. X-direction grid specification
GRDPWR(X,20,0.2,1.0)
 
    GROUP 4. Y-direction grid specification
GRDPWR(Y,20,0.01,1.0)
 
    GROUP 7. Variables stored, solved & named
  ** Solve three extra variables as temperatures with
     different Prandtl numbers.
SOLVE(P1,V1,U1,TEM1)
 
    GROUP 9. Properties of the medium (or media)
SETPRPS(1, 0)
 
    GROUP 13. Boundary conditions and special sources
  Inlet  !
PATCH(INL,WEST,1,1,1,NY,1,1,1,1)
(SOURCE of P1 at INL is RHO1*VELMAX*(1.-(YG/YVLAST)^2))
(SOURCE of U1 at INL is VELMAX*(1.-(YG/YVLAST)^2) with ONLYMS)
(SOURCE of V1 at INL is 0.0 with ONLYMS)
(SOURCE of TEM1 at INL is TEMINL with ONLYMS)

  Injection
PATCH(NOCPINJ,NORTH,1,NX,NY,NY,1,NZ,1,1)
(SOURCE of P1 at NOCPINJ is RHO1*VELINJ*XG/XULAST)
(SOURCE of V1 at NOCPINJ is -VELINJ*XG/XULAST with ONLYMS)
(SOURCE of TEM1 at NOCPINJ is TEMINJ*CPINJ with ONLYMS)
 
  Wall
PATCH(NW,NORTH,1,NX,NY,NY,1,NZ,1,1)
(SOURCE of U1 at NW is 0.0 with LAMWALL)

  Outlet 
PATCH(OUT,EAST,NX,NX,1,NY,1,NZ,1,1)
(SOURCE of P1 at OUT is 1000.*(0.-P1) with LINE)
 
    GROUP 15. Termination of sweeps
LSWEEP=50
SELREF=T; RESFAC=0.1
    GROUP 17. Under-relaxation devices
RELAX(U1,FALSDT,0.1); RELAX(V1,FALSDT,0.1)
    GROUP 22. Spot-value print-out
IYMON=19; IXMON=10; TSTSWP=-1

distil=t
EX(P1)=1.626E+00; EX(U1)=6.584E-01
EX(V1)=3.250E-02; EX(TEM1)=2.689E+00
#conprom
#maxabs
#endpause