Note by dbs 10.09.06 This is safir example, and, if significantly different from others, should be added to them in the PLANT library. I am transferring it there as z763.htm z763
```

TALK=f;RUN( 1, 1)

sppnam=tundish

PHOTON USE
p

up z
con h1 x 1 z 1 16 fil;.001
con fs x 1 z 18 m fil;.001
gr ou x 1 z 1 16
gr ou x 1 z 18 m
msg SAFIR sub-model: Melting of descending solids
msg ---------------------------------------------
msg Mass fractions of liquid in upper domain:
msg blue - zero, red - unity
msg Temperature of gas in lower domain
pause;cl
set vec ref 0.05
vec x 1 z 18 m
set vec ref 100.
vec x 1 z 1 16 sh
gr ou x 1 z 1 16
gr ou x 1 z 18 m
msg   Solid velocities in upper domain
msg   and
msg   Gas velocities in lower domain
enduse
************************************************************
Group 1. Run Title
TEXT(Melting of solid flow)
************************************************************
Group 2. Transience
STEADY  =    T
************************************************************
Group 3. X-Direction Grid Spacing
CARTES  =    F
NX      =       1
XULAST  = 1.000E-01
************************************************************
Group 4. Y-Direction Grid Spacing
NY      =       5
YVLAST  = 8.000E+00
GRDPWR(Y,NY,YVLAST,1.)
************************************************************
Group 5. Z-Direction Grid Spacing
PARAB   =    F
NZ      =      33
ZWLAST  = 5.700E+01
GRDPWR(Z,NZ,ZWLAST,1.)
* Cylindrical-polar grid
CARTES=F
************************************************************
Group 6. Body-Fitted coordinates
* X-cyclic boundaries switched
************************************************************
Group 7. Variables: STOREd,SOLVEd,NAMEd
* Solved variables list
SOLVE(P1  ,V1  ,W1  ,H1  )
* Additional solver options
SOLUTN(P1  ,Y,Y,Y,N,N,Y)
SOLUTN(H1  ,Y,Y,Y,N,N,Y)

************************************************************
Group 8. Terms & Devices
TERMS (H1  ,N,Y,Y,Y,Y,Y)
DENPCO  =    T
************************************************************
Group 9. Properties
** Introduce the densities
REAL(DEN1L,DEN2L,DEN1U,DEN2U)
Gas
DEN1L=1.    ;  RG(1)=DEN1L
Solid
DEN1U=5000. ;  RG(2)=DEN1U
Fines
DEN2L=5000.  ;  RG(3)=DEN2L
Liqiud
DEN2U=7000. ;  RG(4)=DEN2U

STORE(DEN1)
RHO1=GRND
DEN1=RG(1)
REGION() 1
DEN1=RG(2)
REGION() 2
STORE(DEN2)
** Introduce the viscosities
VISL=1.e-05  for lower domain
VISL=1.0     for upper domain
STORE(VISL)
ENUL=GRND
VISL=1.e-05
REGION() 1
VISL=1.e-05
REGION() 2
************************************************************
Group 10.Inter-Phase Transfer Processes
************************************************************
Group 11.Initialise Var/Porosity Fields
INIADD  =    F
** The subdomains are isolated by one slab blockage
INTEGER(UPLOW)
UPLOW=17;IG(1)=UPLOW
STORE(HPOR,NPOR,VPOR)
PATCH(ISOLAT,INIVAL,1,1,1,NY,UPLOW,UPLOW,1,1)
INIT( ISOLAT,VPOR, 0.000E+00, 0.0)
INIT( ISOLAT,HPOR, 0.000E+00, 0.0)
INIT( ISOLAT,NPOR, 0.000E+00, 0.0)
PATCH(ISOL,INIVAL,1,1,1,NY,UPLOW-1,UPLOW-1,1,1)
INIT( ISOL,HPOR, 0.000E+00, 0.0)

** Mark the upper and lower domains
MARK=1 - lower domain
MARK=2 - upper domain
STORE(MARK)
PATCH(LOWMARK,INIVAL,1,1,1,NY,1,UPLOW-1,1,1)
INIT( LOWMARK,MARK, 0.000E+00, 1.)
PATCH(UPPMARK,INIVAL,1,1,1,NY,UPLOW+1,NZ,1,1)
INIT( UPPMARK,MARK, 0.000E+00, 2.)
**  Initalisations
STORE(HPOR,VPOR,NPOR)
Lower domain
PATCH(INILOW,INIVAL,1,1,1,NY,1,UPLOW-1,1,1)
*   Porosities
INIT( INILOW,VPOR, 0.000E+00, 0.25)
INIT( INILOW,HPOR, 0.000E+00, 0.25)
INIT( INILOW,NPOR, 0.000E+00, 0.25)
Upper domain
PATCH(INIUP,INIVAL,1,1,1,NY,UPLOW+1,NZ,1,1)
*   Porosities
INIT( INIUP,VPOR, 0.000E+00, 0.75)
INIT( INIUP,HPOR, 0.000E+00, 0.75)
INIT( INIUP,NPOR, 0.000E+00, 0.75)
************************************************************
Group 12. Convection and diffusion adjustments
No PATCHes used for this Group
************************************************************
Group 13. Boundary & Special Sources
**  Total gas inflow mass rate, kg/s
REAL(GIN);GIN=400.1
gin=0.0
**  Total fines inflow mass rate, kg/s
REAL(FIN);FIN=7.1
fin=0.0
**  Mass inflow rates of gas and fines
PATCH(GASINL   ,NORTH ,1,1,NY,NY,2,2,1,1)
COVAL(GASINL   ,P1   , FIXFLU, DEN1L*20.)
COVAL(GASINL   ,V1   , ONLYMS, -20.)
COVAL(GASINL   ,H1   , ONLYMS, 2800.)
**  Fix pressure gas and fines outlet
PATCH (TOPLOW     ,HIGH  ,1,1,1,NY,UPLOW-1,UPLOW-1,1,1)
COVAL (TOPLOW     ,P1  , DEN1L*FIXP, 0.000E+00)
**  Mass inflow rates of solid
PATCH(SOLINL   ,HIGH ,1,1,1,NY,NZ,NZ,1,1)
COVAL(SOLINL   ,P1   , FIXFLU,DEN1U*0.005)
COVAL(SOLINL   ,W1   , ONLYMS,-5.E-03)
COVAL(SOLINL   ,H1   , ONLYMS,300.)
**  Fix pressure solid outlet
PATCH (BOTUP     ,LOW  ,1,1,1,NY,UPLOW+1,UPLOW+1,1,1)
COVAL (BOTUP     ,P1  , DEN1U*FIXP, 0.000E+00)
**  Friction
PATCH (FRIC     ,VOLUME  ,1,1,1,NY,1,UPLOW-1,1,1)
COVAL (FRIC     ,V1  , 100., 0.000E+00)
COVAL (FRIC     ,W1  , 100., 0.000E+00)
**  Coke combustion Generated Heat source
STORE(CGH)
FIINIT(CGH)=950.
PATCH (SS002COK, VOLUME,1,NX,1,NY,1,NZ,1,1)
CO =FIXFLU
VAL=CGH/FIXFLU
COVAL (SS002COK ,H1  , GRND, GRND)
** 3D storage for Heat transfer
STORE(HTC)
FIINIT(HTC)=10.
**  Heat exchange between lower  and upper sub-domains
PATCH(SS001TEM,VOLUME,1,NX,1,NY,1,NZ,1,1)
CO =HTC
VAL=H1[,,+IG(1)]
COVAL(SS001TEM,H1,GRND,GRND)
**  Heat exchange between upper and lower sub-domains
PATCH(SS002TEM,VOLUME,1,NX,1,NY,1,NZ,1,1)
CO =HTC
VAL=H1[,,-IG(1)]
COVAL(SS002TEM,H1,GRND,GRND)
***********************************************************
Group 14. Downstream Pressure For PARAB
************************************************************
Group 15. Terminate Sweeps
LSWEEP  =     750
************************************************************
Group 16. Terminate Iterations
************************************************************
Group 17. Relaxation

RELAX(P1  ,LINRLX, 0.75)
RELAX(V1  ,FALSDT, 10.)
RELAX(W1  ,FALSDT, 10.)
RELAX(H1  ,FALSDT, 1000.)
************************************************************
Group 18. Limits
************************************************************
Group 19. EARTH Calls To GROUND Station
************************************************************
Group 20. Preliminary Printout
ECHO    =    T
************************************************************
Group 21. Print-out of Variables
************************************************************
Group 22. Monitor Print-Out
IXMON   =       1 ;IYMON  =       5 ;IZMON  =       6
NPRMNT  =       1
************************************************************
Group 23.Field Print-Out & Plot Control
YZPR    =    T
No PATCHes used for this Group
************************************************************
Group 24. Dumps For Restarts

==========================================
NAMSAT=MOSG
nyprin=1;nzprin=1
iymon=ny-1;izmon=nz-1
inifld=t
lsweep=300
nprint=1
REAL(TLIQ,TSOL,MIND)
MIND=1.
TLIQ=1750.;RG(50)=TLIQ
TSOL=1310.;RG(51)=TSOL
STORE(FS);FIINIT(FS)=0.0
FS=AMIN1(1.,AMAX1(((:TLIQ:-H1)\$
/(:TLIQ:-:TSOL:))**:MIND:,0.0))
REGION() 2
===========================================
TSTSWP=-1
STOP

```