PHOTON USE
  p
  phi
 
 
 
  msg grid
  gr x 1;gr x m
  gr y 1;gr y m
  msg Press  to continue
  pause
  cl
  vi x
  up z
  scale
  cl
  msg 1st-phase (light phase) velocity vectors on plane ix=3
  set vec ref;0.1
  vec x 3 sh
  gr ou x 3
  msg Press  to continue
  pause
  cl
  msg 2nd-phase (dense phase) velocity vectors on plane ix=3
  set vec ref;0.004
  set vec comp
  - v2 w2
  vec x 3 sh
  gr ou x 3
  msg Press  to continue
  pause
  cl
  msg contour of pressure on plane ix=3
  con p1 x 3 fi;0.002
  gr ou x 3
  msg Press  to continue
  pause
  cl
  msg contour of 1st-phase (vapour) volume fraction on plane ix=3
  con gas x 3 fi;0.002
  gr ou x 3
  msg Press  to continue
  pause
  cl
  msg contour of shell-side vapour enthalpy on plane ix=3
  con 1sth x 3 fi;0.002
  gr ou x 3
  msg Press  to continue
  pause
  cl
  msg contour of shell-side liquid enthalpy on plane ix=3
  con 2ndh x 3 fi;0.002
  gr ou x 3
  msg Press  to continue
  pause
  cl
  msg contour of tube-side fluid enthalpy on plane ix=3
  con tubh x 3 fi;0.002
  gr ou x 3
  msg Press e to END
  enduse
 
L(W800)
    CASE W801 As for case W800 but with allowance for heat
           capacity of metal
    GROUP 1. Run title
TEXT(ALLOW FOR METAL CAPACITY :  W801
TITLE
 
    User-defined variables:
REAL(CAPM,COEF1O,COEF2O,COEFMO)
CAPM=0.1;COEFMO=CAPM/DELT
 
COEF12=COEF1*COEF2/(COEF1+COEF2+COEFMO)
COEF1O=COEF1*COEFMO/(COEF1+COEF2+COEFMO)
COEF2O=COEF2*COEFMO/(COEF1+COEF2+COEFMO)
 
    Arrange that metal temperature, named METL, occupies
    store with index 1 above TUBH and 2 above 2NDH.
 
SOLVE(C2);NAME(C2)=METL;TERMS(METL,N,N,N,Y,N,N)
FIINIT(1STH)=T1IN;FIINIT(METL)=0.5*(T1IN+T2IN)
COVAL(INLET1,METL,ONLYMS,SAME)
 
    Heat-exchange with tube fluid, throughout the exchanger.
PATCH(NEPLUS,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(NEPLUS,1STH,COEF12,LOCNE)
 
    Heat-exchange with shell fluid, throughout the exchanger.
PATCH(NEMINUS,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(NEMINUS,2NDH,COEF12,LOCNE)
 
    Connect shell liquid with old metal
PATCH(NEO2,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(NEO2,2NDH,COEF1O,LOCNE)
 
    Connect metal with shell liquid
PATCH(NEM2,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(NEM2,METL,COEF1O,LOCNE)
 
    Connect tube fluid with old metal
PATCH(NEO1,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(NEO1,TUBH,COEF2O,LOCNE)
 
    Connect metal with tube fluid
PATCH(NEM1,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(NEM1,METL,COEF2O,LOCNE)
 
    Transient for metal
COVAL(NEOLD,METL,CAPM/DELT,LOCNE)
 
RELAX(U1,FALSDT,1.E-3);RELAX(V1,FALSDT,1.E-3)
RELAX(W1,FALSDT,1.E-3)
 
LSWEEP=20
PLOT(TABMAP,METL,0.0,10.0)
PLOT(TABYEQ3,METL,0.0,10.0)
PLOT(PASS1,METL,T2IN,T1IN)
PLOT(PASS2,METL,T2IN,T1IN)
PLOT(PASS3,METL,T2IN,T1IN)
PLOT(PASS4,METL,T2IN,T1IN)
PLOT(PASS5,METL,T2IN,T1IN)
PLOT(TIMEPLOT,METL,T2IN,T1IN)