TALK=T;RUN(1,1)
   PHOTON USE
   p
   phi



   up z
   mirror y
   msg Oil concentration
   con oil x 1 sh;int 300
   msg Press  to continue
   pause
   msg Temperature contours
   con tem1 x 1 fil;0.01
   msg Press  to continue
   pause
   msg Velocity vectors
   vec x 1 sh
   msg Press e to END
   ENDUSE
   DISPLAY
   This case simulates an oil tanker rupture. The purpose of this
   calculation is to show how a higher temperature in the layer
   near the sea surface affect the asending plume of the water-oil
   mixture.

   The buoyancy force is modelled as a linear function of both
   oil concentration and the temperature; and is set by In-Form.

   This calculation focuses on the top layer near the surface and
   the output from a separate parabolic calculation of the
   turbulent plume is used as guidance to the input at the lower su$
rface.
   The profiles of inflow velocity is therefore represented as a si$
ne curve.

   The results show that the presence of a warm-water layer near
   the sea surface causes the water-oil liquid to spread laterally,
   beneath the hot layer, perhaps never reaching the surface.

   ENDDIS
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 ************************************************************
 
 TEXT(Oil tanker rupture; warm-water layer eff)
 
 ************************************************************
 ************************************************************
 
 IRUNN = 1 ;LIBREF = 401
 ************************************************************
  Group 2. Time dependence
 STEADY = T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES = F
 NX = 1
 XULAST =1.0E-02
 XFRAC(1)=1.
 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NY = 40
 YVLAST =2000.
 YFRAC(1)=0.017288 ;YFRAC(2)=0.037057
 YFRAC(3)=0.057885 ;YFRAC(4)=0.079433
 YFRAC(5)=0.101532 ;YFRAC(6)=0.12408
 YFRAC(7)=0.147008 ;YFRAC(8)=0.170268
 YFRAC(9)=0.193821 ;YFRAC(10)=0.217638
 YFRAC(11)=0.241694 ;YFRAC(12)=0.26597
 YFRAC(13)=0.29045 ;YFRAC(14)=0.315119
 YFRAC(15)=0.339965 ;YFRAC(16)=0.364977
 YFRAC(17)=0.390147 ;YFRAC(18)=0.415464
 YFRAC(19)=0.440923 ;YFRAC(20)=0.466516
 YFRAC(21)=0.492238 ;YFRAC(22)=0.518083
 YFRAC(23)=0.544045 ;YFRAC(24)=0.57012
 YFRAC(25)=0.596304 ;YFRAC(26)=0.622594
 YFRAC(27)=0.648984 ;YFRAC(28)=0.675473
 YFRAC(29)=0.702056 ;YFRAC(30)=0.728731
 YFRAC(31)=0.755495 ;YFRAC(32)=0.782346
 YFRAC(33)=0.809281 ;YFRAC(34)=0.836298
 YFRAC(35)=0.863394 ;YFRAC(36)=0.890567
 YFRAC(37)=0.917817 ;YFRAC(38)=0.94514
 YFRAC(39)=0.972535 ;YFRAC(40)=1.
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 PARAB = F
 NZ = 40
 ZWLAST =1000.
 ZFRAC(1)=0.017288 ;ZFRAC(2)=0.037057
 ZFRAC(3)=0.057885 ;ZFRAC(4)=0.079433
 ZFRAC(5)=0.101532 ;ZFRAC(6)=0.12408
 ZFRAC(7)=0.147008 ;ZFRAC(8)=0.170268
 ZFRAC(9)=0.193821 ;ZFRAC(10)=0.217638
 ZFRAC(11)=0.241694 ;ZFRAC(12)=0.26597
 ZFRAC(13)=0.29045 ;ZFRAC(14)=0.315119
 ZFRAC(15)=0.339965 ;ZFRAC(16)=0.364977
 ZFRAC(17)=0.390147 ;ZFRAC(18)=0.415464
 ZFRAC(19)=0.440923 ;ZFRAC(20)=0.466516
 ZFRAC(21)=0.492238 ;ZFRAC(22)=0.518083
 ZFRAC(23)=0.544045 ;ZFRAC(24)=0.57012
 ZFRAC(25)=0.596304 ;ZFRAC(26)=0.622594
 ZFRAC(27)=0.648984 ;ZFRAC(28)=0.675473
 ZFRAC(29)=0.702056 ;ZFRAC(30)=0.728731
 ZFRAC(31)=0.755495 ;ZFRAC(32)=0.782346
 ZFRAC(33)=0.809281 ;ZFRAC(34)=0.836298
 ZFRAC(35)=0.863394 ;ZFRAC(36)=0.890567
 ZFRAC(37)=0.917817 ;ZFRAC(38)=0.94514
 ZFRAC(39)=0.972535 ;ZFRAC(40)=1.
 ************************************************************
  Group 6. Body-Fitted Coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS = T
 NAME(1)=P1 ;NAME(5)=V1
 NAME(7)=W1 ;NAME(12)=KE
 NAME(13)=EP ;NAME(145)=LOGO
 NAME(146)=REST ;NAME(147)=LEN1
 NAME(148)=ENUT ;NAME(149)=OIL
 NAME(150)=TEM1
    * Y in SOLUTN argument list denotes:
    * 1-stored 2-solved 3-whole-field
    * 4-point-by-point 5-explicit 6-harmonic averaging 
 SOLUTN(P1,Y,Y,Y,N,N,Y)
 SOLUTN(V1,Y,Y,Y,N,N,Y)
 SOLUTN(W1,Y,Y,Y,N,N,Y)
 SOLUTN(KE,Y,Y,N,N,N,N)
 SOLUTN(EP,Y,Y,N,N,N,N)
 SOLUTN(LOGO,Y,N,N,N,N,N)
 SOLUTN(REST,Y,Y,N,N,N,Y)
 SOLUTN(LEN1,Y,N,N,N,N,Y)
 SOLUTN(ENUT,Y,N,N,N,N,Y)
 SOLUTN(OIL,Y,Y,N,N,N,Y)
 SOLUTN(TEM1,Y,Y,Y,N,N,Y)
 VIST = 148
 LEN1 = 147
 ************************************************************
  Group 8. Terms & Devices
    * Y in TERMS argument list denotes:
    * 1-built-in source 2-convection 3-diffusion 4-transient
    * 5-first phase variable 6-interphase transport         
 TERMS(P1,Y,Y,Y,N,Y,Y)
 TERMS(V1,Y,Y,Y,Y,Y,Y)
 TERMS(W1,Y,Y,Y,Y,Y,Y)
 TERMS(KE,N,Y,Y,Y,Y,N)
 TERMS(EP,N,Y,Y,Y,Y,N)
 TERMS(REST,N,Y,N,Y,Y,Y)
 TERMS(OIL,N,Y,Y,Y,N,Y)
 TERMS(TEM1,N,Y,Y,Y,Y,Y)
 DIFCUT =0.5 ;ZDIFAC =1.
 GALA = F ;ADDDIF = F
 NEWENT = T
 ISOLX = -1 ;ISOLY = -1 ;ISOLZ = -1
 ************************************************************
  Group 9. Properties used if PRPS is not
  stored, and where PRPS = -1.0 if it is!
 RHO1 =1000. ;TMP1 =0.
 EL1 = GRND4
 TSURR =0. ;TEMP0 =0.
 PRESS0 =0.
 DVO1DT =0. ;DRH1DP =0.
 EMISS =0. ;SCATT =0.
 RADIA =0. ;RADIB =0.
 EL1A =0. ;EL1B =0.
 EL1C =0.
 ENUL =1.0E-06 ;ENUT = GRND3
 ENUTA =0. ;ENUTB =0.
 ENUTC =0.
 IENUTA = 0
 PRNDTL(V1)=1. ;PRNDTL(W1)=1.
 PRNDTL(KE)=1. ;PRNDTL(EP)=1.
 PRNDTL(OIL)=1. ;PRNDTL(TEM1)=1.
 PRT(V1)=1. ;PRT(W1)=1.
 PRT(KE)=1. ;PRT(EP)=1.314
 PRT(OIL)=1. ;PRT(TEM1)=1.
 CP1 =1. ;CP2 =1.
 ************************************************************
  Group 10.Inter-Phase Transfer Processes
 ************************************************************
  Group 11.Initial field variables (PHIs)
 FIINIT(P1)=1.0E-10 ;FIINIT(V1)=1.0E-10
 FIINIT(W1)=1.0E-10 ;FIINIT(KE)=1.0E-04
 FIINIT(EP)=1.64E-08 ;FIINIT(LOGO)=1.0E-10
 FIINIT(REST)=1.0E-10 ;FIINIT(LEN1)=1.0E-10
 FIINIT(ENUT)=1.0E-10 ;FIINIT(OIL)=1.0E-10
 FIINIT(TEM1)=1.0E-10
 
 PATCH(INI1 ,INIVAL, 1, 1, 1, 40, 1, 35, 1, 1)
 
 PATCH(INI2 ,INIVAL, 1, 1, 1, 40, 36, 40, 1, 1)
 INIADD = F
 FSWEEP = 1
 NAMFI =CHAM
 ************************************************************
  Group 12. Patchwise adjustment of terms
  Patches for this group are printed with those
  for Group 13.
  Their names begin either with GP12 or &
 ************************************************************
  Group 13. Boundary & Special Sources
 
 PATCH(KESOURCE,PHASEM, 0, 0, 0, 0, 0, 0, 1, 1)
 COVAL(KESOURCE,KE , GRND4 , GRND4 )
 COVAL(KESOURCE,EP , GRND4 , GRND4 )
 
 PATCH(ELAPSE ,PHASEM, 1, 1, 1, 40, 1, 40, 1, 1)
 COVAL(ELAPSE ,REST, FIXFLU ,1. )
 
 PATCH(UPPER ,PHASEM, 1, 1, 1, 40, 36, 40, 1, 1)
 COVAL(UPPER ,W1 ,In-Form:source - see Grp 19)
 
 PATCH(LOWER ,PHASEM, 1, 1, 1, 40, 1, 35, 1, 1)
 COVAL(LOWER ,W1 ,In-Form:source - see Grp 19)
 
 PATCH(LEAK ,LOW , 1, 1, 1, 12, 1, 1, 1, 1)
 COVAL(LEAK ,P1 ,In-Form:source - see Grp 19)
 COVAL(LEAK ,W1 ,In-Form:source - see Grp 19)
 COVAL(LEAK ,KE ,0. ,1.0E-04 )
 COVAL(LEAK ,EP ,0. ,1.0E-10 )
 COVAL(LEAK ,OIL ,0. ,1.0E-03 )
 COVAL(LEAK ,TEM1,0. ,4. )
 
 PATCH(BOTTOM ,CELL , 1, 1, 13, 40, 1, 1, 1, 1)
 COVAL(BOTTOM ,P1 ,1000. ,0. )
 COVAL(BOTTOM ,OIL ,0. ,0. )
 COVAL(BOTTOM ,TEM1,0. ,4. )
 
 PATCH(NORTH1 ,CELL , 1, 1, 40, 40, 1, 35, 1, 1)
 COVAL(NORTH1 ,P1 ,1000. ,0. )
 COVAL(NORTH1 ,TEM1,0. ,4. )
 
 PATCH(NORTH2 ,CELL , 1, 1, 40, 40, 36, 40, 1, 1)
 COVAL(NORTH2 ,P1 ,1000. ,0. )
 COVAL(NORTH2 ,TEM1,0. ,10. )
 XCYCLE = F
 EGWF = T
 WALLCO = GRND2
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP = 2000 ;ISWC1 = 1
 LITHYD = 1 ;LITFLX = 1 ;LITC = 1 ;ITHC1 = 1
 SELREF = T
 RESFAC =1.0E-04
 ************************************************************
  Group 16. Terminate Iterations
 LITER(P1)=20 ;LITER(V1)=10
 LITER(W1)=10 ;LITER(KE)=20
 LITER(EP)=20 ;LITER(REST)=20
 LITER(OIL)=20 ;LITER(TEM1)=20
 ENDIT(P1)=1.0E-03 ;ENDIT(V1)=1.0E-03
 ENDIT(W1)=1.0E-03 ;ENDIT(KE)=1.0E-03
 ENDIT(EP)=1.0E-03 ;ENDIT(REST)=1.0E-03
 ENDIT(OIL)=1.0E-03 ;ENDIT(TEM1)=1.0E-03
 ************************************************************
  Group 17. Relaxation
 RELAX(P1,LINRLX,0.2)
 RELAX(V1,FALSDT,0.1)
 RELAX(W1,FALSDT,0.1)
 RELAX(KE,LINRLX,0.5)
 RELAX(EP,LINRLX,0.5)
 RELAX(LOGO,LINRLX,1.)
 RELAX(REST,FALSDT,1.0E+09)
 RELAX(LEN1,LINRLX,1.)
 RELAX(ENUT,LINRLX,1.)
 RELAX(OIL,LINRLX,0.5)
 RELAX(TEM1,FALSDT,10.)
 KELIN = 0
 OVRRLX =0.
 EXPERT = F ;NNORSL = F
 ************************************************************
  Group 18. Limits
 VARMAX(P1)=1.0E+10 ;VARMIN(P1)=-1.0E+10
 VARMAX(V1)=1.0E+06 ;VARMIN(V1)=-1.0E+06
 VARMAX(W1)=1.0E+06 ;VARMIN(W1)=-1.0E+06
 VARMAX(KE)=1.0E+10 ;VARMIN(KE)=1.0E-10
 VARMAX(EP)=1.0E+10 ;VARMIN(EP)=1.0E-10
 VARMAX(LOGO)=1.0E+10 ;VARMIN(LOGO)=-1.0E+10
 VARMAX(REST)=1.0E+10 ;VARMIN(REST)=-1.0E+10
 VARMAX(LEN1)=1.0E+10 ;VARMIN(LEN1)=-1.0E+10
 VARMAX(ENUT)=1.0E+10 ;VARMIN(ENUT)=-1.0E+10
 VARMAX(OIL)=1.0E+10 ;VARMIN(OIL)=-1.0E+10
 VARMAX(TEM1)=1.0E+10 ;VARMIN(TEM1)=-1.0E+10
 ************************************************************
  Group 19. Data transmitted to GROUND
 GENK = T
 PARSOL = F
 ISG62 = 1
 SPEDAT(SET,INITIAL,TEM1!INI1,C,=4.0)
 SPEDAT(SET,INITIAL,TEM1!INI2,C,=10.0)
 SPEDAT(SET,SOURCE,W1!UPPER,C,=9.81*(OIL*0.03+1000.*1.E-4*(TEM1-10$)
 SPEDAT(SET,SOURCE,W1!UPPER,C,.)))
 SPEDAT(SET,SOURCE,W1!LOWER,C,=9.81*0.03*OIL)
 SPEDAT(SET,SOURCE,R1!LEAK,C,=1000*0.03*SIN((532-YG)/338.7)!FIXFLU)
 SPEDAT(SET,SOURCE,W1!LEAK,C,=0.03*SIN((532-YG)/338.7)!ONLYMS)
 SPEDAT(SET,STORED,LOGO,C,=LOG10(OIL)!ZSLFIN)
 ************************************************************
  Group 20. Preliminary Printout
 ************************************************************
  Group 21. Print-out of Variables
 INIFLD = F ;SUBWGR = F
    * Y in OUTPUT argument list denotes:
    * 1-field 2-correction-eq. monitor 3-selective dumping      
    * 4-whole-field residual 5-spot-value table 6-residual table
 OUTPUT(P1,Y,Y,Y,Y,Y,Y)
 OUTPUT(V1,Y,Y,Y,Y,Y,Y)
 OUTPUT(W1,Y,Y,Y,Y,Y,Y)
 OUTPUT(KE,Y,N,Y,Y,Y,Y)
 OUTPUT(EP,Y,N,Y,Y,Y,Y)
 OUTPUT(LOGO,Y,N,Y,N,N,N)
 OUTPUT(REST,Y,N,Y,Y,Y,Y)
 OUTPUT(LEN1,Y,N,Y,N,N,N)
 OUTPUT(ENUT,Y,N,Y,N,N,N)
 OUTPUT(OIL,Y,N,Y,Y,Y,Y)
 OUTPUT(TEM1,Y,Y,Y,Y,Y,Y)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON = 1 ;IYMON = 1 ;IZMON = 25
 NPRMON = 100000 ;NPRMNT = 1 ;TSTSWP = -1
 UWATCH = T ;USTEER = T
 HIGHLO = F
 ************************************************************
  Group 23.Field Print-Out & Plot Control
 NPRINT = 100000 ;NUMCLS = 5
 NYPRIN = -1 ;IYPRF = 1 ;IYPRL = 10000
 NZPRIN = -1 ;IZPRF = 1 ;IZPRL = 10000
 XZPR = F ;YZPR = F
 IPLTF = 1 ;IPLTL = -1 ;NPLT = -1
 ISWPRF = 1 ;ISWPRL = 100000
 ITABL = 3 ;IPROF = 1
 ABSIZ =0.5 ;ORSIZ =0.4
 NTZPRF = 1 ;NCOLPF = 50
 ICHR = 2 ;NCOLCO = 45 ;NROWCO = 20
   No PATCHes yet used for this Group
 ************************************************************
  Group 24. Dumps For Restarts
 SAVE = T ;NOWIPE = F
 NSAVE =CHAM
 IDISPA = 50 ;IDISPB = 0 ;IDISPC = 0
 CSG1    ='T'
STOP