PHOTON USE AUTOPLOT file phi 5 da 1 p1 screen msg pressure profile pl 1 msg pressto continue pause cl da 1 1u 1 19 screen msg gas velocity pl 1 msg press to continue pause cl da 1 gas screen msg gas volume fraction pl 1 msg press to continue pause cl da 1 h2 screen msg liquid enthalpy pl 1 msg press e to END enduse GROUP 1. Run title and other preliminaries #cls TEXT(1D STEADY BOILING IN PIPE: W350 TITLE DISPLAY A liquid flows into the bottom of a vertical pipe at the saturation temperature. Heat is added in the upper half of the pipe,causing steam to be formed. There is a small amount of interphase friction. The treatment is one-dimensional. Despite the simplicity of its formulation, this is a difficult phenomenon to simulate. For cases of this type, a steady-state solution may not exist for all conditions; unstable or oscillatory boiling is often observed in reality. It is interesting to explore how sensitive the solution is to the various relaxation parameters, and see whether the same values are satisfactory also for different values of heat flux, density ratio, gravitational acceleration, interphase-friction law, etc ENDDIS #pause GROUP 3. X-direction grid specification GRDPWR(X,20,1.0,1.0) GROUP 7. Variables stored, solved & named ** Activate the solution of two phases ONEPHS=F;SOLVE(P1,U1,U2,R1,R2,H1,H2) ** Rename for profile-plot clarity.... NAME(U1)=1U;NAME(U2)=2U NAME(R1)=GAS;NAME(R2)=LIQ;STORE(MDOT) GROUP 8. Terms (in differential equations) & devices ** Cut off built-in sources and diffusion terms TERMS(H1,N,Y,N,Y,Y,Y);TERMS(H2,N,Y,N,Y,N,Y) TERMS(GAS,Y,Y,N,Y,Y,Y);TERMS(LIQ,Y,Y,N,Y,N,Y) TERMS(1U,Y,Y,N,Y,Y,Y);TERMS(2U,Y,Y,N,Y,N,Y) GROUP 9. Properties of the medium (or media) RHO1=1.0; RHO2=1000. GROUP 10. Inter-phase-transfer processes and properties ** Set constant inter-phase friction factor and activate the calculation of the inter-phase mass transfer by means of a heat balance between the two phases. Note that the minus sign is merely a signal to use the second-phase density, and to set the minimum first-phase volume fraction to RLOLIM in the friction-factor formula. CFIPS=-2500.0;CMDOT=HEATBL;RLOLIM=0.01 ** Set the inter-phase heat transfer coefficients CINT(H1)=1.E-2;CINT(H2)=1.E0 ** Set the values of the enthalpies at the interface PHINT(H1)=2.5E6;PHINT(H2)=4.0E5 GROUP 11. Initialization of variable or porosity fields FIINIT(GAS)=1.E-2;FIINIT(LIQ)=0.99;FIINIT(H1)=2.5E6 FIINIT(H2)=4.0E5;FIINIT(1U)=0.01;FIINIT(2U)=0.01 GROUP 13. Boundary conditions and special sources INLET(INLET,WEST,1,1,1,1,1,1,1,1) VALUE(INLET,P2,10.0);VALUE(INLET,2U,0.01) VALUE(INLET,H2,4.0E5) PATCH(OUTLET,CELL,NX,NX,1,1,1,1,1,1) COVAL(OUTLET,P1,FIXP*RHO1,0.0);COVAL(OUTLET,P2,FIXP*RHO2,0.0) COVAL(OUTLET,1U,ONLYMS,0.0);COVAL(OUTLET,2U,ONLYMS,0.0) COVAL(OUTLET,H1,ONLYMS,SAME);COVAL(OUTLET,H2,ONLYMS,SAME) PATCH(GRAVITY,PHASEM,1,NX,1,1,1,1,1,1) COVAL(GRAVITY,1U,FIXFLU,-9.81);COVAL(GRAVITY,2U,FIXFLU,-9.81) PATCH(HEATER,PHASEM,NX/4+1,NX,1,1,1,1,1,1) COVAL(HEATER,H2,FIXFLU,1.E5) GROUP 15. Termination of sweeps LSWEEP=200 GROUP 16. Termination of iterations RESREF(P1)=1.0E-05 RESREF(GAS)=1.E-4;RESREF(LIQ)=1.E-4 RESREF(H1)=1.E-4;RESREF(H2)=1.E-4 RESREF(1U)=1.E-4;RESREF(2U)=1.E-4 GROUP 17. Under-relaxation devices RELAX(1U,FALSDT,0.1);RELAX(2U,FALSDT,0.1) RELAX(GAS,LINRLX,0.1);RELAX(LIQ,LINRLX,0.1) RELAX(H1,FALSDT,1.);RELAX(H2,FALSDT,1.) GROUP 22. Spot-value print-out IXMON=NX/2;ITABL=2;NPLT=LSWEEP/20;TSTSWP=-1 GROUP 23. Field print-out and plot control OUTPUT(H1,N,N,N,Y,N,N);OUTPUT(H2,N,N,N,Y,N,N) OUTPUT(1U,N,N,N,Y,Y,Y);OUTPUT(2U,N,N,N,Y,Y,Y) OUTPUT(GAS,N,N,N,Y,Y,Y);OUTPUT(LIQ,N,N,N,Y,Y,Y) OUTPUT(P1,N,N,N,Y,Y,Y);OUTPUT(MDOT,N,N,N,N,N,N) NXPRIN=1;IPROF=3 PATCH(LONGPLOT,PROFIL,1,NX,1,1,1,1,1,1);ORSIZ=0.4 PLOT(LONGPLOT,LIQ,0.0,1.0);PLOT(LONGPLOT,1U,0.0,2.0) PLOT(LONGPLOT,2U,0.0,2.0);PLOT(LONGPLOT,MDOT,0.0,0.3)