Encyclopaedia Index

### Appendix - Q1 file for 5-fluid model

```
TALK=F;RUN( 1, 1);VDU=VGAMOUSE

The five-fluid model
------------------------
(a) Assumptions
---------------

* There are five fluids in the population, namely:
- A, which is pure red ,
- B, which is 3/4 (by mass) red and 1/4 blue,
- C, which is 1/2 (by mass) red and 1/2 blue,
- D, which is 1/4 (by mass) red and 3/4 blue, and
- E, which is fully blue;

* A and E can couple and split to form C;

* A and C can couple and split to form B;

* E and C can couple and split to form D;

* B and D can couple and split to form C;

(b) Coupling/splitting rates.
-----------------------------
This scheme may be expressed in terms of four reaction
modes, namely:

(1)  A + E -->  C
(2)  A + C -->  B
(3)  E + C -->  D
(4)  B + D -->  C

The coupling rate per unit volume between any two fluids is
equal to:

a constant, R,
times  the whole-population density
times  the epsilon/turbulence energy
times  the mass fraction of the first  fluid in the mixture
times  the mass fraction of the second fluid in the mixture

(c) Source/sink terms.
----------------------

If the whole-population density is equal to unity then :

*  Consumption of A

Sa = - const epke ( Me + Mc ) Ma

*  Production/consumption of B

Sb = const epke (2 Ma Mc - Md Mb)

*  Production/consumption of C

Sc = const epke ( 2 ( Ma Me + Mb Md ) - ( Ma + Me ) Mc)

*  Production/consumption of D

Sd = const epke ( 2 Me Mc - Mb Md )

*  Consumption of E

Se = - const epke ( Mc + Ma ) Me

GROUP 1. Run title and other preliminaries
TEXT(CONFINED JET FLOW: 5 FLUID MFM
REAL(HIN,GMIXL,CLEN,WIDTH,WIN1,WIN2,REYNO,WD2)
REAL(TKEIN1,EPIN1,TKEIN2,EPIN2)
INTEGER(NTBMON,IYJ);NTBMON=2;IYJ=3
REYNO=1.E6;WIDTH=0.3;HIN=1.
WIN1=10.;WIN2=2.0

GROUP 3. X-direction grid specification
CARTES=F;XULAST=0.1
GROUP 4. Y-direction grid specification
NY=15;WD2=0.5*WIDTH;GRDPWR(Y,NY,WD2,1.0)

GROUP 5. Z-direction grid specification
NZ=20;CLEN=20.*WD2;GRDPWR(Z,NZ,CLEN,2.0)

GROUP 7. Variables stored, solved & named
SOLVE(P1,W1,V1,H1,G);STORE(ENUT,LEN1,GEN1,EPKE,GENG)
SOLUTN(P1,Y,Y,Y,N,N,N)
SOLVE(A,BB,C,D,E)
TURMOD(KEMODL)

REAL(Rae,Rac,Rbd,Rec)
Rae  = 6.0 ; RG(1) = Rae
Rac  = 1.0 ; RG(2) = Rac
Rbd  = 1.0 ; RG(3) = Rbd
Rec  = 1.0 ; RG(4) = Rec

GROUP 8. Terms (in differential equations) & devices
TERMS(H1,N,Y,Y,Y,Y,Y)
TERMS(G,N,Y,Y,Y,Y,Y)
TERMS(A   ,N,Y,y,y,y,y)
TERMS(BB  ,N,Y,y,y,y,y)
TERMS(C   ,N,Y,y,y,y,y)
TERMS(D   ,N,Y,y,y,y,y)
TERMS(E   ,N,Y,y,y,y,y)

GROUP 9. Properties of the medium (or media)
RHO1=1.0;ENUL=WIN1*WIDTH/REYNO
PRT(H1)= 0.86;PRNDTL(H1)= 0.71
PRT(A) = 0.86;PRNDTL(A) = 0.71
PRT(BB)= 0.86;PRNDTL(BB)= 0.71
PRT(C) = 0.86;PRNDTL(C) = 0.71
PRT(D) = 0.86;PRNDTL(D) = 0.71
PRT(E) = 0.86;PRNDTL(E) = 0.71
PRT(G) = 0.7 ;PRNDTL(G) = 0.7
GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=0.5*(WIN1+WIN2);FIINIT(H1)=HIN;FIINIT(LEN1)=0.1*YVLAST
FIINIT(ENUT)=0.01*WIN1*YVLAST
** TKEIN = 0.25*WIN1*WIN1*FRIC where FRIC=0.018 AT REYNO=1.E5
TKEIN1=0.25*WIN1*WIN1*0.018
TKEIN2=0.25*WIN2*WIN2*0.018
FIINIT(KE)=0.5*(TKEIN1+TKEIN2)
** EPIN = 0.1643*KIN**1.5/LMIX where LMIX=0.045*WIDTH
GMIXL=0.011*WD2
EPIN2=TKEIN2**1.5/GMIXL*0.1643
EPIN1=TKEIN1**1.5/GMIXL*0.1643
FIINIT(EP)=0.5*(EPIN1+EPIN2)
FIINIT(P1)=1.3E-4
GROUP 13. Boundary conditions and special sources
** Inlet Boundaries
INLET(IN1,LOW,1,1,1,IYJ,1,1,1,1);VALUE(IN1,P1,WIN1)
VALUE(IN1,W1,WIN1)
VALUE(IN1,H1,1.0)
VALUE(IN1,A, 1.0) ; VALUE(IN1,BB,0.0)
VALUE(IN1,C, 0.0) ; VALUE(IN1,D, 0.0)
VALUE(IN1,E, 0.0)
VALUE(IN1,KE,TKEIN1);VALUE(IN1,EP,EPIN1)
VALUE(IN1,G, 0.0)

INLET(IN2,LOW,1,1,IYJ+1,NY,1,1,1,1);VALUE(IN2,P1,WIN2)
VALUE(IN2,W1,WIN2)
VALUE(IN2,H1,0.0)
VALUE(IN2,A, 0.0) ; VALUE(IN2,BB,0.0)
VALUE(IN2,C, 0.0) ; VALUE(IN2,D, 0.0)
VALUE(IN2,E, 1.0)
VALUE(IN2,KE,TKEIN2);VALUE(IN2,EP,EPIN2)
VALUE(IN2,G, 0.0)

**Outlet boundary
PATCH(OUTLET,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUTLET,P1,1.0e05,0.0)
COVAL(OUTLET,W1,ONLYMS,0.0);COVAL(OUTLET,V1,ONLYMS,0.0)
COVAL(OUTLET,KE,ONLYMS,0.0);COVAL(OUTLET,EP,ONLYMS,0.0)

**North-Wall boundary (generalised wall functions)
WALL (WFNN,NORTH,1,NX,NY,NY,1,NZ,1,1)

PATCH(SORG,VOLUME,1,NX,1,NY,1,NZ,1,1)
CO=2.0*:RHO1:*EPKE
VAL=GENG/(2.0*:RHO1:*EPKE+TINY)
COVAL(SORG,G  , GRND  ,GRND )

PATCH(MIX,PHASEM,1,NX,1,NY,1,NZ,1,1)
Sa = - ( Rae Me + Rac Mc ) Ma
CO=RG(1)*EPKE*(E+C)
COVAL(MIX,A  , GRND  ,0.0 )
Sb = 2 Rac Ma Mc - Rbd Md Mb
VAL=RG(1)*EPKE*(2.*A*C-D*BB)
COVAL(MIX,BB, FIXFLU,GRND)
Sc = 2 Rae Ma Me + 2 Rbd Mb Md - ( Rac Ma + Rec Me ) Mc
VAL= RG(1)*EPKE*2.*(A*E+BB*D)-\$
RG(1)*EPKE*(A+E)*C
COVAL(MIX,C  , FIXFLU  ,GRND )
Sd = 2 Rec Me Mc - Rbd Mb Md
VAL= RG(1)*EPKE*(2.0*E*C-BB*D)
COVAL(MIX,D,FIXFLU ,GRND)
Se = - ( Rec Mc + Rae Ma ) Me
CO=RG(1)*EPKE*(C+A)
COVAL(MIX,E, GRND,0.0)

GROUP 15. Termination of sweeps
LSWEEP=500;RESFAC=0.01

GROUP 16. Termination of iterations
LITHYD=10

GROUP 17. Under-relaxation devices
KELIN=3
RELAX(P1,LINRLX,0.25)
RELAX(V1,FALSDT,0.025)
RELAX(W1,FALSDT,0.025)
RELAX(KE,FALSDT,0.025)
RELAX(EP,FALSDT,0.025)
RELAX(G,FALSDT ,0.025)
relax(a,linrlx,0.15);relax(bb,linrlx,0.15)
relax(c,linrlx,0.15);relax(d,linrlx,0.15)
relax(e,linrlx,0.15)

VARMIN(A)   = 0.0; VARMAX(A)   =1.0
VARMIN(BB)  = 0.0; VARMAX(BB)  =1.0
VARMIN(C)   = 0.0; VARMAX(C)   =1.0
VARMIN(D)   = 0.0; VARMAX(D)   =1.0
VARMIN(E)   = 0.0; VARMAX(E)   =1.0

GROUP 19. Data communicated by SATELLITE to GROUND
STORE(CAV,MAS,GAV,GF)
FIINIT(GF)=0.0
CAV=1.*A+0.75*BB+0.5*C+0.25*D+0.0*E
MAS=A+BB+C+D+E
GAV=ABS(CAV-1.)*A+ABS(CAV-0.75)*BB+\$
ABS(CAV-0.5)*C+ABS(CAV-0.25)*D+CAV*E
GF=GAV/CAV
REGION(1,1,1,1,1,NZ)

STORE(DFZ,DFY,DFZH,DFYN)
FIINIT(DFZ) =0.0;FIINIT(DFY) =0.0
FIINIT(DFZH)=0.0;FIINIT(DFYN)=0.0

DFZ=((H1[,,+1]-H1)/DZGNZ)**2
REGION(1,NX,1,NY,1,NZ-1)
DFY=((H1[,+1,]-H1)/DYG2D)**2
REGION(1,1,1,NY-1,1,NZ)
DFZH=((H1-H1[,,-1])/DZGNZ[,,-1])**2
REGION(1,NX,1,NY,NZ,NZ)
DFYN=((H1-H1[,-1,])/DYG2D[,-1,])**2
REGION(1,NX,NY,NY,1,NZ)

GENG=2.8*:RHO1:*ENUT*(DFZ+DFY+DFZH+DFYN)
REGION(1,NX,1,NY,1,NZ)

STORE(GG,GGF)
FIINIT(GGF)=0.0
GG=SQRT(G)
REGION(1,NX,1,NY,1,NZ)
GGF=GG/CAV
REGION(1,1,1,1,1,NZ)

GROUP 21. Print-out of variables
WALPRN=T;OUTPUT(KE,Y,Y,Y,Y,Y,Y);OUTPUT(H1,Y,Y,Y,Y,Y,Y)

GROUP 22. Monitor print-out
IZMON=NZ-1;IYMON=NY-1;UWATCH=T

GROUP 23. Field print-out and plot control
NPLT=1;NZPRIN=1
NYPRIN=1;IYPRF=1;IYPRL=30
TSTSWP=-1
NAMSAT=MOSG
STOP

```