TALK=T;RUN(1,1) PHOTON USE p p10 up z gr z 1 gr out x 1 gr out x 4 vec x 1 sh vec x 3 sh msg Velocity vectors at time step=10 msg Press RETURN to continue pause cont h1 x 1 fil;0.001 cont h1 x 3 fil;0.001 msg Temperature contours at time step=10 msg Press RETURN to continue pause p p20 up z gr z 1 gr out x 1 gr out x 4 vec x 1 sh vec x 3 sh msg Velocity vectors at time step=20 msg Press RETURN to continue pause cont h1 x 1 fil;0.001 cont h1 x 3 fil;0.001 msg Temperature contours at time step=20 msg Press RETURN to continue pause p p30 up z gr z 1 gr out x 1 gr out x 4 vec x 1 sh vec x 3 sh msg Velocity vectors at time step=30 msg Press RETURN to continue pause cont h1 x 1 fil;0.001 cont h1 x 3 fil;0.001 msg Temperature contours at time step=30 msg Press RETURN to continue pause p p40 up z gr z 1 gr out x 1 gr out x 4 vec x 1 sh vec x 3 sh msg Velocity vectors at time step=40 msg Press RETURN to continue pause cont h1 x 1 fil;0.001 cont h1 x 3 fil;0.001 msg Temperature contours at time step=40 msg Press RETURN to continue pause p p50 up z gr z 1 gr out x 1 gr out x 4 vec x 1 sh vec x 3 sh msg Velocity vectors at time step=50 msg Press RETURN to continue pause cont h1 x 1 fil;0.001 cont h1 x 3 fil;0.001 msg Temperature contours at time step=50 msg Press e to END ENDUSE DISPLAY This example considers a two-stroke engine with loop scavenging. It is an unsteady three-dimensional flow with mixing of hot and cold streams and with time-varying domain boundaries. The exhaust and intake processes take place through ports in the lower part of the cylinder wall which are progressively uncovered by the descending piston. The exhaust port opens first and the cylinder pressure falls due to both outflow and cylinder volume change. The inlet cylinder pressure has fallen below the total pressure in the inlet port. The incoming cold gas displaces and partially mixes with the hot exhaust gas. The inlet port flow direction makes an angle of 30 deg. to both the radial and horizontal directions. A single expanding grid is used in the z-direction so that the cells representing the ports both expand and are uncovered. The patches representing the port cells are active over a range of time steps. ENDDIS ************************************************************ Group 1. Run Title and Number ************************************************************ ************************************************************ TEXT(Two Stroke Loop Scavenge Cycle 3D ) ************************************************************ ************************************************************ IRUNN = 1 ;LIBREF = 14 ************************************************************ Group 2. Time dependence STEADY = F * Set overall time and no. of steps TFIRST =-4.861111E-03 ;TLAST =2.083333E-03 FSTEP = 1 ;LSTEP = 50 Method of pairs used for grid setting. TFRAC(2)=0.02 ************************************************************ Group 3. X-Direction Grid Spacing CARTES = F NX = 4 XULAST =3.14159 XFRAC(1)=0.3 ;XFRAC(2)=0.5 XFRAC(3)=0.7 ;XFRAC(4)=1. ************************************************************ Group 4. Y-Direction Grid Spacing NY = 4 YVLAST =0.05 YFRAC(1)=0.5 ;YFRAC(2)=0.8 YFRAC(3)=0.95 ;YFRAC(4)=1. ************************************************************ Group 5. Z-Direction Grid Spacing PARAB = F NZ = 10 ZWLAST =0.1111 ZFRAC(1)=0.149059 ;ZFRAC(3)=0.420984 ZFRAC(5)=0.654202 ;ZFRAC(7)=0.841893 ZFRAC(9)=0.970624 ************************************************************ Group 6. Body-Fitted Coordinates ************************************************************ Group 7. Variables: STOREd,SOLVEd,NAMEd ONEPHS = T NAME(1)=P1 ;NAME(3)=U1 NAME(5)=V1 ;NAME(7)=W1 NAME(14)=H1 ;NAME(150)=RHO1 * Y in SOLUTN argument list denotes: * 1-stored 2-solved 3-whole-field * 4-point-by-point 5-explicit 6-harmonic averaging SOLUTN(P1,Y,Y,Y,N,N,N) SOLUTN(U1,Y,Y,N,N,N,Y) SOLUTN(V1,Y,Y,N,N,N,Y) SOLUTN(W1,Y,Y,N,N,N,Y) SOLUTN(H1,Y,Y,N,N,N,Y) SOLUTN(RHO1,Y,N,N,N,N,Y) DEN1 = 150 ************************************************************ Group 8. Terms & Devices * Y in TERMS argument list denotes: * 1-built-in source 2-convection 3-diffusion 4-transient * 5-first phase variable 6-interphase transport TERMS(P1,Y,Y,Y,N,Y,Y) TERMS(U1,Y,Y,Y,Y,Y,Y) TERMS(V1,Y,Y,Y,Y,Y,Y) TERMS(W1,Y,Y,Y,Y,Y,Y) TERMS(H1,Y,Y,Y,Y,Y,Y) DIFCUT =0.5 ;ZDIFAC =1. GALA = F ;ADDDIF = F NEWRH1 = T U1AD =0. ;V1AD =0. ;W1AD = ZMOVE HUNIT =1. ISOLX = -1 ;ISOLY = -1 ;ISOLZ = -1 ************************************************************ Group 9. Properties used if PRPS is not stored, and where PRPS = -1.0 if it is! RHO1 = GRND5 ;TMP1 = GRND2 ;EL1 =0. TSURR =0. ;TEMP0 =0. ;PRESS0 =0. DVO1DT =0. ;DRH1DP = GRND5 RHO1A =0. ;RHO1B =3.49162E-03 ;RHO1C =0. TMP1A =0. ;TMP1B =1.0E-03 ;TMP1C =0. TMP2A =0. ;TMP2B =0. ;TMP2C =0. EMISS =0. ;SCATT =0. RADIA =0. ;RADIB =0. ENUL =1.0E-05 ;ENUT =1.0E-03 PRNDTL(U1)=1. ;PRNDTL(V1)=1. PRNDTL(W1)=1. ;PRNDTL(H1)=1. PRT(U1)=1. ;PRT(V1)=1. PRT(W1)=1. ;PRT(H1)=1. CP1 =999.999939 ;CP2 =1. ************************************************************ Group 10.Inter-Phase Transfer Processes ************************************************************ Group 11.Initial field variables (PHIs) FIINIT(P1)=3.0E+05 ;FIINIT(U1)=1.0E-10 FIINIT(V1)=1.0E-10 ;FIINIT(W1)=1.0E-10 FIINIT(H1)=9.0E+05 ;FIINIT(RHO1)=1.0E-10 No PATCHes yet used for this Group INIADD = F FSWEEP = 1 NAMFI =CHAM ************************************************************ Group 12. Patchwise adjustment of terms Patches for this group are printed with those for Group 13. Their names begin either with GP12 or & ************************************************************ Group 13. Boundary & Special Sources PATCH(HEAD ,LWALL , 1, 4, 1, 4, 1, 1, 1, 50) COVAL(HEAD ,U1 , GRND2 ,0. ) COVAL(HEAD ,V1 , GRND2 ,0. ) PATCH(CYL ,NWALL , 1, 4, 4, 4, 1, 10, 1, 50) COVAL(CYL ,U1 , GRND2 ,0. ) COVAL(CYL ,W1 , GRND2 ,0. ) PATCH(PCR ,HWALL , 1, 4, 1, 4, 10, 10, 1, 50) COVAL(PCR ,U1 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,-140. ) COVAL(TRA2 ,W1 ,0. ,-80. ) COVAL(TRA2 ,H1 ,0. ,3.0E+05 ) PATCH(TRA3 ,NORTH , 3, 3, 4, 4, 8, 8, 17, 53) COVAL(TRA3 ,P1 ,-3.14 ,1.4E+05 ) COVAL(TRA3 ,U1 ,0. ,80. ) COVAL(TRA3 ,V1 ,0. ,-140. ) COVAL(TRA3 ,W1 ,0. ,-80. ) COVAL(TRA3 ,H1 ,0. ,3.0E+05 ) XCYCLE = F EGWF = T WALLCO = GRND2 ************************************************************ Group 14. Downstream Pressure For PARAB ************************************************************ Group 15. Terminate Sweeps LSWEEP = 10 ;ISWC1 = 1 LITHYD = 1 ;LITFLX = 1 ;LITC = 1 ;ITHC1 = 1 SELREF = T RESFAC =1.0E-05 ************************************************************ Group 16. Terminate Iterations LITER(P1)=10 ;LITER(U1)=1 LITER(V1)=1 ;LITER(W1)=1 LITER(H1)=5 ENDIT(P1)=1.0E-03 ;ENDIT(U1)=1.0E-03 ENDIT(V1)=1.0E-03 ;ENDIT(W1)=1.0E-03 ENDIT(H1)=1.0E-03 ************************************************************ Group 17. Relaxation RELAX(P1,LINRLX,1.) RELAX(U1,FALSDT,5.0E-03) RELAX(V1,FALSDT,5.0E-03) RELAX(W1,FALSDT,5.0E-03) RELAX(H1,FALSDT,1.0E+09) RELAX(RHO1,LINRLX,1.) OVRRLX =0. EXPERT = F ;NNORSL = F ************************************************************ Group 18. Limits VARMAX(P1)=1.0E+10 ;VARMIN(P1)=1.0E+04 VARMAX(U1)=1.0E+06 ;VARMIN(U1)=-1.0E+06 VARMAX(V1)=1.0E+06 ;VARMIN(V1)=-1.0E+06 VARMAX(W1)=1.0E+06 ;VARMIN(W1)=-1.0E+06 VARMAX(H1)=1.0E+10 ;VARMIN(H1)=-1.0E+10 VARMAX(RHO1)=1.0E+10 ;VARMIN(RHO1)=-1.0E+10 ************************************************************ Group 19. Data transmitted to GROUND PARSOL = F IZW1 = 10 AZW1 =251.327209 ;BZW1 =0.05 CZW1 =4. ;DZW1 =0. ISG62 = 1 SPEDAT(SET,GXMONI,TRANSIENT,L,F) SPEDAT(SET,GXMONI,PLOTALL,L,T) ************************************************************ Group 20. Preliminary Printout ************************************************************ Group 21. Print-out of Variables INIFLD = F ;SUBWGR = F * Y in OUTPUT argument list denotes: * 1-field 2-correction-eq. monitor 3-selective dumping * 4-whole-field residual 5-spot-value table 6-residual table OUTPUT(P1,Y,N,Y,Y,Y,Y) OUTPUT(U1,Y,N,Y,Y,Y,Y) OUTPUT(V1,Y,N,Y,Y,Y,Y) OUTPUT(W1,Y,N,Y,Y,Y,Y) OUTPUT(H1,Y,N,Y,Y,Y,Y) OUTPUT(RHO1,Y,N,Y,N,N,N) ************************************************************ Group 22. Monitor Print-Out IXMON = 2 ;IYMON = 3 ;IZMON = 8 NPRMON = 100 ;NPRMNT = 1 ;TSTSWP = -1 UWATCH = T ;USTEER = T HIGHLO = F ************************************************************ Group 23.Field Print-Out & Plot Control NPRINT = 10 ;NUMCLS = 5 NTPRIN = 5 ;ISTPRF = 1 ;ISTPRL = 100000 NXPRIN = -1 ;IXPRF = 1 ;IXPRL = 10000 NYPRIN = 0 ;IYPRF = 4 ;IYPRL = 4 NZPRIN = 2 ;IZPRF = 1 ;IZPRL = 10000 XZPR = T ;YZPR = F IPLTF = 1 ;IPLTL = 10 ;NPLT = -1 ISWPRF = 1 ;ISWPRL = 100000 ITABL = 3 ;IPROF = 1 ABSIZ =0.5 ;ORSIZ =0.4 NTZPRF = 1 ;NCOLPF = 50 ICHR = 2 ;NCOLCO = 45 ;NROWCO = 20 PATCH(RVEL ,PROFIL, 1, 4, 3, 3, 9, 9, 1, 50) PLOT(RVEL ,U1 ,0. ,0. ) PATCH(YZ ,CONTUR, 1, 1, 1, 4, 1, 10, 1, 50) PLOT(YZ ,H1 ,0. ,20. ) PATCH(TIMPLOT ,PROFIL, 1, 1, 3, 3, 9, 9, 1, 50) PLOT(TIMPLOT ,P1 ,0. ,0. ) PLOT(TIMPLOT ,H1 ,0. ,0. ) ************************************************************ Group 24. Dumps For Restarts SAVE = T ;NOWIPE = F NSAVE =CHAM IDISPA = 10 ;IDISPB = 0 ;IDISPC = 0 CSG1 ='P' STOP