photon use p;parphi;;;;; mesg horizontal direction (z) represents time gr y 1 msg first-phase volume-fraction contours con r1 y 1 fi;0.05;pause msg first-phase velocity contours con u1 y 1 fi;0.05;pause msg pressure contours con p1 y 1 fi;0.05 enduse GROUP 1. Run title and other preliminaries TEXT(fluids moving in opposite directions:423 TITLE DISPLAY The initial condition is that two fluids of equal density are moving at equal but opposite velocity within a duct of uniform cross-section; and each has a volume fraction of 0.5. Because the ends of the duct are closed, each fluid tends to accumulate at the end towards which it is moving. Fluid-to-fluid and fluid-to-wall friction are neglected. One consequence is the growth of an instability in the interface, exhibited by a reduction in the volume fraction of each fluid just ahead of the point at which it rises to unity. Instabilities of Kelvin-Helmholtz type are known to arise in such flows; but the one just mentioned is more likely to be a consequence of the fact that no provision has been made for the enhanced fluid-to-fluid momentum transfer which occurs at an abrupt chnage of vulume fraction, which is akin to a 'hydraulic jump'. A PHOTON USE file is provided for display purposes. ENDDIS GROUP 2. Transience; time-step specification STEADY=F;GRDPWR(T,60,1.5,1.0) GROUP 3. X-direction grid specification GRDPWR(X,30,0.5,1.0) GROUP 7. Variables stored, solved & named ONEPHS=F;SOLVE(P1,U1,U2,R1,R2) GROUP 8. Terms (in differential equations) & devices TERMS(R1,P,P,N,P,P,P);TERMS(R2,P,P,N,P,P,P) GROUP 9. Properties of the medium (or media) RHO1=1.0;RHO2=1.0;enul=0.0 GROUP 10. Inter-phase-transfer processes and properties CFIPS=0.0 GROUP 11. Initialization of variable or porosity fields FIINIT(U1)=1.0e-1;FIINIT(U2)=-1.0e-1;FIINIT(R1)=0.5;FIINIT(R2)=0.5 GROUP 13. Boundary conditions and special sources ** Relief valve PATCH(RELIEF,CELL,NX/2,NX/2,1,1,1,1,1,LSTEP) COVAL(RELIEF,P1,FIXP,0.0);COVAL(RELIEF,U1,ONLYMS,0.0) GROUP 15. Termination of sweeps LSWEEP=20 GROUP 16. Termination of iterations RESREF(P1)=1.E-05;RESREF(U1)=1.E-5;RESREF(U2)=1.E-5 GROUP 17. Under-relaxation devices VARMIN(R1)=1.E-10;VARMIN(R2)=1.E-10 SPEDAT(SET,GXMONI,TRANSIENT,L,F) GROUP 21. Print-out of variables OUTPUT(R1,Y,Y,Y,Y,Y,Y);OUTPUT(R2,Y,Y,Y,Y,Y,Y) GROUP 23. Field print-out and plot control PATCH(IXPLOT,PROFIL,1,NX,1,1,1,1,1,LSTEP);PLOT(IXPLOT,R1,0.0,1.0) IDISPA=lstep/15;TSTSWP=LSWEEP-1;UWATCH=T;ITABL=1