TALK=T;RUN( 1, 1)
 
  PHOTON USE
  p;parphi;;;;
 
  msg                        TURBULENT MIXING LAYER
  msg        Velocity vectors:
  vec x 1 sh
  pause; vec off;red
  msg        average mixl contours:
  con mixl x 1 fi;0.01;pause; con off;red
  msg        average f contours:
  con avef x 1 fi;0.01; pause; con off;red
  msg        root-mean-square fluctuation contours:
  con mnsq x 1 fi;0.01; pause; con off;red
  msg        f1 contours:
  con f1 x 1 fi;0.01; pause; con off;red
  msg        f5 contours:
  con f5 x 1 fi;0.01; pause; con off;red
  msg        f10 contours:
  con f10 x 1 fi;0.01; pause; con off;red
  msg        eddy-viscosity (enut) contours:
  con enut x 1 fi;0.01
  enduse
l(cls
  DISPLAY
 
  This mixing-layer model is created by first loading case 153,
  switching off the solution of temperature,
  and then introducing upstream and boundary conditions for the
  selected number fluids, of which fluid-1 forms the faster- and
  fluid-NFLF the  slower-moving stream.
 
 
 
  ENDDIS
  load turbulent axi-symmetrical-jet case 153, for which parab = t
#$153
solutn(len1,n,n,n,n,n,n)  ! len1 is not needed; mfm uses mixl
SOLUTN(TEMP,N,N,N,N,N,N)  ! switch off temperature solution
CARTES=T                  ! convert to plane flow
  
REAL(REALNY,REALNZ)       ! change dimensions and grid
NY=20; NZ=100
REALNY=NY; REALNZ=NZ
YVLAST  = 1.000E-01
YFRAC(1) = -REALNY ;YFRAC(2) =  1./REALNY
AZYV =100/REALNZ; AZRI= 0.000E+00; AZAL= 0.000E+00
ZWADD=5.0*YVLAST
 
COVAL(HIGHY, W1, 1.E6 ,0.0)  !fix w1 to zero at north boundary
 
  fix w1 to WJET at south boundary (formerly symmetry axis)
PATCH(SOUTH,SOUTH,1,1,1,1,1,NZ,1,1)
COVAL(SOUTH,W1,1.E6,WJET)
 
  fix v1 at mid-plane, so as to keep velocity profile within grid
PATCH(MIDPLANE,CELL,1,1,NY/2,NY/2,1,NZ,1,1)
COVAL(MIDPLANE,V1,FIXVAL,-0.015*WJET)
 
ECHO=T
 
  --------------------------  mfm section starts ---------------
#MFM
  set relevant constants
NFLR=1; NFLF= 10
MFMMOD=MNSQ; LENCON=0.05; VISCON=2.0; CONMIX=5.0 ! model & constants
  
  ! Click here to see what macro mfm1
  
  macro varset does
#mfm1
SPEDAT(MFM,POPMIN, R,0.0)      ! lower limit of PDA namely w1
SPEDAT(MFM,POPMAX, R,:WJET:)   ! upper limit of PDA

ENUT=GRND10 ! sets turbulent viscosity = viscon * rate * mixl**2
SOLVE(MIXL) ! solve transport equation for  length scale
PRT(MIXL)=0.1 ! give mixl low turbulent Prandtl to reduce gradients
FIINIT(MIXL)= 0.01*YVLAST
TEXT(:Nflf:-Fluid Model Of Mixing Layer; Conmix=:Conmix:
TITLE
  ---------------------------------------- upstream
COVAL(NOZZLE,F1,FIXVAL,1.0)
DO II = 1,NFLUIDS
 COVAL(HIGHY,F:II:,ONLYMS,0.0)
 COVAL(SOUTH,F:II:,ONLYMS,0.0)
 RELAX(F:II:,LINRLX,.25)
ENDDO
COVAL(HIGHY,F:NFLUIDS:,ONLYMS,1.0)
COVAL(SOUTH,P1,1.E6,0.0); COVAL(SOUTH,F1,ONLYMS,1.0)
 
PATCH($MNSQ,PHASEM,1,NX,1,NY,1,NZ,1,1)  ! provides length source
COVAL($MNSQ, MIXL, LENCON*WJET*1.0E-5, 1.E5) ! = LENCON * MNSQ
 
  ---------------------------------------- initial values
PATCH(START2,INIVAL,1,1,NY/2+1,NY,1,1,1,1)
COVAL(START2,F:NFLUIDS:,0.0,1.0)
PATCH(START1,INIVAL,1,1,1,NY/2,1,1,1,1)
COVAL(START1,F1,0.0,1.0)
  ------------------------------------------ plots
PATCH(MIDDLE,PROFIL,1,1,NY/2,NY/2,1,NZ,1,1)
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
COVAL(MIDDLE,F1,0.0,0.0); COVAL(MIDDLE,F4,0.0,0.0)
COVAL(MIDDLE,F7,0.0,0.0); COVAL(MIDDLE,F10,0.0,0.0)
 
PATCH(FINAL,PROFIL,1,1,1,NY,NZ,NZ,1,1)
COVAL(FINAL,W1,0.0,0.0); COVAL(FINAL,MNSQ,0.0,0.0)
COVAL(FINAL,MIXL,0.0,0.0); COVAL(FINAL,ENUT,0.0,0.0)
ORSIZ=ORSIZ/2
 
TSTSWP=-1; LITHYD=50; IYMON=NY/2; IZMON=1; RESFAC=1.E-3
      
 ! values expected in distilled output
 EX(P1  )=   1.456E-01; EX(V1  )=   1.954E-01; EX(W1  )=   4.127E+00
 EX(MIXL)=   1.786E-02; EX(F1  )=   1.460E-01; EX(F2  )=   3.967E-02
 EX(F3  )=   6.627E-02; EX(F4  )=   6.856E-02; EX(F5  )=   6.886E-02
 EX(F6  )=   7.454E-02; EX(F7  )=   8.606E-02; EX(F8  )=   1.106E-01
 EX(F9  )=   1.892E-01; EX(F10 )=   1.520E-01; EX(AVEF)=   5.774E-01
 EX(RATE)=   1.259E+02; EX(ENUT)=   2.702E-02; EX(MNSQ)=   6.848E-02
libref=300
distil=t                       ! elicits distilled output
STOP