AUTOPLOT USE
  file
  phi 5
 
  da 1
  p1 x 1 119
 
  da 1
  gasu x 1 119
 
  da 1
  r1   x 1 119
 
  screen
  pl 1 ; colour3 1 1
  msg pressure profile
  msg press  to continue
  pause
  screen
  pl 2 ; colour8 2 2
  msg gas velocity
  msg press  to continue
  pause
  screen
  pl 3  ;scale y 0 1;coloure 3 3
  msg gas volume fraction
  msg press e to END
  enduse
 
    GROUP 1. Run title
TEXT(CF=1.E7 RHO2=10. POUT=-.5     W870
TITLE
  DISPLAY
    NUMERICAL BENCHMARK PROBLEM 1.1:  CONVERGENT-DIVERGENT NOZZLE
    Two fluids flow through a convergent-divergent nozzle. The
    lighter one is a compressible gas; the second one, which is
    in much smaller volumetric concentration, is incompressible.
    The density ratio is such that the pressure gradients which
    accelerate the gas have less effect upon the motion of the
    heavier fluid; but the latter is nevertheless also
    accelerated by the drag exerted upon it by the gas.
 
    The task is to predict the distributions of pressure, volume
    fraction and velocity along the duct, under various
    conditions.
  ENDDIS
 
    GROUP 3. X-direction grid specification
XULAST=1.0;NX=120
REAL(XN);XN=120.0;XFRAC(1)=-XN;XFRAC(2)=1.0/XN
    GROUP 7. Variables stored, solved & named
    This is a two-phase problem.
ONEPHS=F
SOLVE(P1,U1,U2,R1,R2)
NAME(U1)=GASU;NAME(U2)=SOLU
STORE(EPOR,DEN1)
    GROUP 8. Terms (in differential equations) & devices
    The 4th-argument N's cut out the diffusion (viscous) terms
TERMS(GASU,Y,Y,N,Y,Y,Y);TERMS(SOLU,Y,Y,N,Y,N,Y)
TERMS(R1,Y,Y,N,Y,Y,Y);TERMS(R2,Y,Y,N,Y,N,Y)
    GROUP 9. Properties of the medium (or media)
ENUL=0.0
    The first phase is compressible. Its density obeys the law
    rho=(pressure)**1.0/gamma
RHO1=COMPRESS;DRH1DP=COMPRESS
    The reference pressure is 1.0, in the units chosen, and so is
    the density of the first phase. This makes the sound velocity
    sqrt(gamma). Gamma is taken as 1.0/0.714
PRESS0=1.0;RHO1A=1.0;RHO1B=0.714;RHO1C=0.0
    Second phase density
RHO2=10.0
    GROUP 10. Inter-phase-transfer processes and properties
    Interphase friction
    The (linear) interphase-friction factor is CFIPS*r1*r2*rho1.
    Here a large value is taken for CFIPS.
CFIPS=1.E7
    GROUP 11. Initialization of variable or porosity fields
FIINIT(GASU)=0.5;FIINIT(SOLU)=0.5;FIINIT(P1)=3.0;FIINIT(R1)=0.9
FIINIT(R2)=0.1;FIINIT(DEN1)=3.0
    The initial (and of course continuing) values of the
    porosities are specified here.
    Nozzle
FIINIT(EPOR)=1.0
iniadd=T
PATCH(CONVERGE,LINVLX,NX/4,NX,1,1,1,1,1,1)
COVAL(CONVERGE,EPOR,-2.0,0.0)
PATCH(DIVERGE,LINVLX,NX/2,NX,1,1,1,1,1,1)
COVAL(DIVERGE,EPOR,3.0,0.0)
    GROUP 13. Boundary conditions and special sources
    Inlet
INLET(INLET,WEST,1,1,1,1,1,1,1,1)
    The next statement introduces a flow rate of 1.5 kg/s
    of first-phase material
VALUE(INLET,P1,1.5)
    It has a velocity (i.e. momentum per unit mass) of 0.5 m/s
VALUE(INLET,GASU,0.5)
    The next statement introduces a flow of 0.5 kg/s
    of second-phase material
VALUE(INLET,P2,0.5)
    Its velocity is also 0.5 m/s
VALUE(INLET,SOLU,0.5)
    Outlet
    Fixed outlet pressure
PATCH(OUTLET,CELL,120,120,1,1,1,1,1,1)
COVAL(OUTLET,P1,1.E3,-0.5);COVAL(OUTLET,P2,1.E3*RHO2/RHO1A,-0.5)
COVAL(OUTLET,GASU,ONLYMS,0.0);COVAL(OUTLET,SOLU,ONLYMS,0.0)
    GROUP 15. Termination of sweeps
LSWEEP=200
    GROUP 16. Termination of iterations
RESREF(P1)=1.E-4;RESREF(GASU)=1.E-4;RESREF(SOLU)=1.E-4;
RESREF(R1)=1.E-5;RESREF(R2)=1.E-4
    GROUP 17. Under-relaxation devices
RELAX(GASU,FALSDT,1.0);RELAX(SOLU,FALSDT,1.0)
RELAX(R1,LINRLX,0.50);RELAX(R2,LINRLX,0.50)
    GROUP 21. Print-out of variables
OUTPUT(R1,N,N,N,N,N,N)
    GROUP 22. Spot-value print-out
TSTSWP=-1;IXMON=NX/2
    GROUP 23. Field print-out and plot control
IPLTF=3;IPLTL=LSWEEP;NPLT=1;NXPRIN=NX/20;ORSIZ=0.4
PATCH(LONGPLOT,PROFIL,1,NX,1,1,1,1,1,1)
PLOT(LONGPLOT,P1,0.0,0.0);PLOT(LONGPLOT,R2,0.0,0.0)
PLOT(LONGPLOT,GASU,-1.0,-1.0);PLOT(LONGPLOT,SOLU,-1.0,-1.0)
    GROUP 24. Dumps for restarts