PHOTON USE
  p;;;;
 
  view z
  msg exit smoke concentration according to single-fluid model
  con smos z m fi;0.001
  pause;con off;red
  msg exit smoke concentration according to multi-fluid model
  con smom z m fi;0.001;pause;con off;red;view x
 
  msg x-plane smoke concentration according to single-fluid model
  con smos x 1 fi;0.001;pause;con off;red
  msg x-plane smoke concentration according to multi-fluid model
  con smom x 1 fi;0.001;pause;con off;red
  msg x-plane mixture fraction avef according to multi-fluid model
  con avef x 1 fi;0.001;pause;con off;red
  msg x-plane mixture fraction mixf according to single-fluid model
  con mixf x 1 fi;0.001;pause;con off;red
  msg x-plane fluid-1 concentration according to multi-fluid model
  con f1 x 1 fi;0.001;pause;con off;red
  msg x-plane fluid-11 concentration according to multi-fluid model
  con f11 x 1 fi;0.001;pause;con off;red
  msg x-plane fluid-6 concentration according to multi-fluid model
  con f6 x 1 fi;0.001
  ENDUSE
  DISPLAY
  This simulation shows how the multi-fluid model of turbulence
  predicts a smoke-production pattern in a gas-turbine combustor
  which is different from, and probably more realistic than, that
  predicted by a conventional single-fluid model.
  
  It is explained and discussed extensively in a report which is
  published on CHAM's website www.cham.co.uk (Click on short-cuts,
  then MFM then 1998b).
 
  The geometry is that of library case 492, which is loaded first.
  Note the $ in #$492; it ensures that the above PHOTON USE 
  commands remain in the Q1 file, and therefore take priority over
  those which appear in case 493.
 
  The injected fuel-air composition, which is stoichiometric in
  case 492, is made twice stoichiometric here.
 
  To reduce computation time, it is best to answer N to the question
  about radiation.
  ENDDIS
  
#$492 
libref=600
SOLUTN(FUEL,P,N,P,P,P,P)
REAL(TSTOIC)

TMP1=GRND7;TMP2C=TMP2A
VINF=VINF/2.0  
FIINIT(FUEL)= FIINIT(FUEL)*2.0
FIINIT(MIXF)= FIINIT(MIXF)*2.0
FINF=FSTOI*2.0
HINF=CPFU*TFUEL + HFU * (FINF-FSTOI) /(1.0 - FSTOI)
TSTOIC = TOXID + (FSTOI/FINF) * HINF / CPAIR

INLET(FOIN,SOUTH,1,NX,NYIN,NYIN,NZIN,NZIN,1,1)
VALUE(FOIN,P1,RHOIN*VINF); VALUE(FOIN,V1,VINF)
VALUE(FOIN,H1,HINF); VALUE(FOIN,MIXF,FINF)
VALUE(FOIN,FUEL,(FINF-FSTOI)/(1.0-FSTOI))

TKEIN=2.5E-5*VINF*VINF;EPSIN=0.09*TKEIN**2/(9.59*ENUL)
VALUE(FOIN,KE,TKEIN);VALUE(FOIN,EP,EPSIN)
    *************************************** MFM data
 
#mfm
(stored var mixl is len1)  
(stored var rate is epke)
  
 
NFLR=1; NFLF= 11
  The population-defining attribute is "mixture fraction", ie mass
  of material derived from the inlet stream containing fuel (and
  oxidant) per unit mass of local mixture.
MFMMOD=SCRS
SPEDAT( MFM, FFUIN,  R, FINF )
SPEDAT( MFM, TAIRIN, R, TOXID )
SPEDAT( MFM, TFUIN , R, TFUEL)
SPEDAT( MFM, TSTOIC, R, TSTOIC)
SPEDAT( MFM, FACST , R, FSTOI)
SPEDAT( MFM, GASCON, R, 8314.)
SPEDAT( MFM, SPVLMX, R, 100.0)
SPEDAT( MFM, SPVLMN, R, 0.01 )
SPEDAT( MFM, SMOCON, R, 1.0)
SPEDAT( MFM, SMOEXP, R, 7.0  )
  SPEDAT( MFM, SMOEXP, R, 0.0  )
 
   the coupling constant: conmix
   conrea is set to zero, as not being relevant to this case
CONMIX=10.0; CONREA=0.0
conmix=5.0
TEXT(MFM; 3D Cmbstr; Conmix=:Conmix:
TITLE

#mfm1

FIINIT(RATE)=FIINIT(EP)/FIINIT(KE)
REAL(REALNFL,INIFL); REALNFL=:NFLUIDS:
INIFL=1./REALNFL
DO II = 1,NFLUIDS
 FIINIT(F:II:)=INIFL
 RELAX(F:II:,LINRLX,1.0)
 COVAL(OUTLET,F:II:,ONLYMS,SAME)
ENDDO
 
   ** Fuel/Oxidant inlet
COVAL(FOIN,F:NFLUIDS:,ONLYMS,1.0)
 
   ** Secondary oxidant inlet 1
COVAL(SOIN1,F1,ONLYMS,1.0)
 
   ** Secondary oxidant inlet 2
COVAL(SOIN2,F1,ONLYMS,1.0)
 
   ** Dilution inlet
COVAL(DILUIN,F1,ONLYMS,1.0)
 
SOLVE(SMOM,SMOS)
FIINIT(SMOM)=0.0; FIINIT(SMOS)=0.0
COVAL(OUTLET,SMOM,ONLYMS,SAME); COVAL(OUTLET,SMOS,ONLYMS,SAME)
  The patch called smoke activates the coding for smoke
  generation according to the single- and multi-fluid models
PATCH(SMOKE,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(SMOKE,SMOM,FIXFLU,GRND); COVAL(SMOKE,SMOS,FIXFLU,GRND)
STORE(TMPM,FRFM,OXDM,PRDM)
 
CHAR(NAMPROF)
DO II=1,NFLUIDS
 NAMPROF=PROF:II:
 PATCH(:NAMPROF:,PROFIL,1,1,1,NY,1,NZ,1,1)
 COVAL(:NAMPROF:,F:II:,0.0,0.0)
ENDDO
 
PATCH(MIDDLE,PROFIL,1,1,NY/2,NY/2,1,NZ,1,LSTEP)
COVAL(MIDDLE,AVEF,0.0,0.0); COVAL(MIDDLE,MNSQ,0.0,0.0)
COVAL(MIDDLE,ENUT,0.0,0.0)
 
OUTPUT(NPOR,N,N,N,N,N,N); OUTPUT(EPOR,N,N,N,N,N,N)
OUTPUT(HPOR,N,N,N,N,N,N); OUTPUT(VPOR,N,N,N,N,N,N)
 
TSTSWP=-1;UWATCH=T;USTEER=T;NYPRIN=1;RESFAC=1.E-3
ITABL=1
LSWEEP=500;nprint=lsweep
distil=t
store(prps))
EX(P1  )=   2.045E+02;EX(U1  )=   1.010E+00;EX(V1  )=   5.748E+00
EX(W1  )=   7.893E+00;EX(KE  )=   5.283E+01;EX(EP  )=   1.995E+04
EX(H1  )=   1.930E+06;EX(PRPS)=   9.385E-01;EX(PRDM)=   5.259E-01
EX(OXDM)=   4.056E-01;EX(FRFM)=   7.007E-03;EX(TMPM)=   1.266E+03
EX(SMOS)=   3.380E-06;EX(SMOM)=   7.983E-06;EX(F1  )=   7.249E-02
EX(F2  )=   1.613E-01;EX(F3  )=   2.186E-01;EX(F4  )=   1.438E-01
EX(F5  )=   7.713E-02;EX(F6  )=   4.748E-02;EX(F7  )=   3.901E-02
EX(F8  )=   5.254E-02;EX(F9  )=   5.453E-02;EX(F10 )=   2.652E-02
EX(F11 )=   4.501E-02;EX(MNSQ)=   3.369E-01;EX(AVEF)=   3.621E-02
EX(MIXL)=   0.000E+00;EX(RATE)=   2.905E+02;EX(EPKE)=   2.905E+02
EX(ENUT)=   1.362E-02;EX(RHO1)=   2.198E+00;EX(TMP1)=   1.121E+03
EX(PROD)=   4.996E-01;EX(OXID)=   4.337E-01;EX(FUEL)=   5.078E-03
EX(MIXF)=   3.247E-02
STOP