TALK=T;RUN(1,1) PHOTON USE p;p1; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 1 sec msg Hit Enter to continue pause p;p2; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 2 sec msg Hit Enter to continue pause p;p3; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 3 sec msg Hit Enter to continue pause p;p4; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 4 sec msg Hit Enter to continue pause p;p5; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 5 sec msg Hit Enter to continue pause p;p6; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 6 sec msg Hit Enter to continue pause p;p7; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 7 sec msg Hit Enter to continue pause p;p8; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 8 sec msg Hit Enter to continue pause p;p9; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 9 sec msg Hit Enter to continue pause p;p10; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 10 sec msg Hit Enter to continue pause p;p11; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 11 sec msg Hit Enter to continue pause p;p12; con MARK z 1 fil;.001 gr ou z 1;set vec ref 35;vec z 1 msg Velocity vectors field at 12 sec msg Type E to end ENDUSE DISPLAY This run shows what happens around rectangular object suddenly sent in motion. It calculates the unsteady velocity distribution, generated by moving object, in a channel with orifice. The PLANT settings are virtually grid-free for they are introduced in terms of physical distances rather than cell extents ENDDIS. PLANTBEGIN * Set domain viscosityVISL=10.0 * Set large viscosity in object VISL=1.E5 REGION() 1 * Set large viscosity in orifice blocks VISL=1.E5 REGION() 2 The above settings introduce the viscous domain fluid and large artificial viscosities for solid blocks. The latter is essential for non-slip boundary conditions. By way of dummy REGION command with MARK value as parameter, PLANT is told to make the coding in grid-free manner, looking for the corresponding marker. <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<< ** Orifice initialization * Orifice LOWER block locations PATCH(LOWBLOK,INIVAL,1,NX,1,NY,1,NZ,1,LSTEP) VAL=2. INIT(LOWBLOK,MARK,0.0,GRND) PLACE(120.,240.,0.,48.) * Orifice UPPER block locations PATCH(UPBLOK,INIVAL,1,NX,1,NY,1,NZ,1,LSTEP) VAL=2. INIT(UPBLOK,MARK,0.0,GRND) PLACE(120.,240.,78.,126.) All orifice cells are marked by MARK=2. PLACE command overwrites the whole-domain extants of the PATCH by physical extents of the blocks. <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<< ** Set the object velocities RG(1)=30.0; RG(2)=0.0 PATCH(OBJVEL,CELL,1,NX,1,NY,1,NZ,1,LSTEP) CO = VELBC(1.,FIXVAL) VAL= VELBC(1.,RG(1)) COVAL(OBJVEL,U1,GRND,GRND) CO = VELBC(1.,FIXVAL) VAL= VELBC(1.,RG(2)) COVAL(OBJVEL,V1,GRND,GRND) Function VELBC is used to set the COefficients and VALues for all object cells . It fixes all lateral velocity components to zero and longitudinal ones to RG(1), which is the object velocity magnitude. The first function argument is set to object marker value. The second arguments are set equal to either FIXVAL for COefficients or object velocity components for VALues of momentum sources. <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<< ** Nulify velocities in orifice blocks PATCH(ORIVEL,CELL,1,NX,1,NY,1,NZ,1,LSTEP) CO = VELBC(2.,FIXVAL) VAL= VELBC(2.,0.0) COVAL(ORIVEL,U1,GRND,GRND) CO = VELBC(2.,FIXVAL) VAL= VELBC(2.,0.0) COVAL(ORIVEL,V1,GRND,GRND) Function VELBC fixes velocities normal to the faces of all orifice (1st argument is 2) cells to zero. <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<< ** Set the block positions at each time steps 1. Nulify MARK field first MARK =0. IF(ISWEEP.EQ.1) 2. Set lower orifice block MARK =2. PLACE(120.,240.,0.,48.) /ISWEEP.EQ.1 3. Set upper orifice block MARK =2. PLACE(120.,240.,78.,126.) /ISWEEP.EQ.1 4. Set the current object position MARK =XYBOX(1.0,RG(1)*(TIM-1.),48.,30.,30.,0.0,0.0) IF(ISWEEP.EQ.1) Above set of PLANT blocks is responsible for planting codings to distribute the markers for each time step at the start of the first sweep. It is done in four stages indicated. First three reproduce the location of stationary orifice and clean the domain space. At the fourth stage, the function XYBOX is used to calculate time varying re-location of unity object marker ( 1st argument) as a linear function of current time and object velocity ( 2nd argument expression). The next three arguments set the cartesian coordinate of south-west box corner and the sizes of its sides. The sixth and seventh arguments, representing rotation angles, are zeros here. <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<< PLANTEND ************************************************************ Group 1. Run Title and Number ************************************************************ ************************************************************ TEXT( Block passing through orifice ) ************************************************************ ************************************************************ IRUNN = 1 ;LIBREF = 618 ************************************************************ Group 2. Time dependence STEADY = F * Set overall time and no. of steps TFIRST =0. ;TLAST =12. FSTEP = 1 ;LSTEP = 12 TFRAC(1)=0.083333 ;TFRAC(2)=0.166667 TFRAC(3)=0.25 ;TFRAC(4)=0.333333 TFRAC(5)=0.416667 ;TFRAC(6)=0.5 TFRAC(7)=0.583333 ;TFRAC(8)=0.666667 TFRAC(9)=0.75 ;TFRAC(10)=0.833333 TFRAC(11)=0.916667 ;TFRAC(12)=1. ************************************************************ Group 3. X-Direction Grid Spacing CARTES = T NX = 60 XULAST =360. XFRAC(1)=0.016667 ;XFRAC(2)=0.033333 XFRAC(3)=0.05 ;XFRAC(4)=0.066667 XFRAC(5)=0.083333 ;XFRAC(6)=0.1 XFRAC(7)=0.116667 ;XFRAC(8)=0.133333 XFRAC(9)=0.15 ;XFRAC(10)=0.166667 XFRAC(11)=0.183333 ;XFRAC(12)=0.2 XFRAC(13)=0.216667 ;XFRAC(14)=0.233333 XFRAC(15)=0.25 ;XFRAC(16)=0.266667 XFRAC(17)=0.283333 ;XFRAC(18)=0.3 XFRAC(19)=0.316667 ;XFRAC(20)=0.333333 XFRAC(21)=0.35 ;XFRAC(22)=0.366667 XFRAC(23)=0.383333 ;XFRAC(24)=0.4 XFRAC(25)=0.416667 ;XFRAC(26)=0.433333 XFRAC(27)=0.45 ;XFRAC(28)=0.466667 XFRAC(29)=0.483333 ;XFRAC(30)=0.5 XFRAC(31)=0.516667 ;XFRAC(32)=0.533333 XFRAC(33)=0.55 ;XFRAC(34)=0.566667 XFRAC(35)=0.583333 ;XFRAC(36)=0.6 XFRAC(37)=0.616667 ;XFRAC(38)=0.633333 XFRAC(39)=0.65 ;XFRAC(40)=0.666667 XFRAC(41)=0.683333 ;XFRAC(42)=0.7 XFRAC(43)=0.716667 ;XFRAC(44)=0.733333 XFRAC(45)=0.75 ;XFRAC(46)=0.766667 XFRAC(47)=0.783333 ;XFRAC(48)=0.8 XFRAC(49)=0.816667 ;XFRAC(50)=0.833333 XFRAC(51)=0.85 ;XFRAC(52)=0.866667 XFRAC(53)=0.883333 ;XFRAC(54)=0.9 XFRAC(55)=0.916667 ;XFRAC(56)=0.933333 XFRAC(57)=0.95 ;XFRAC(58)=0.966667 XFRAC(59)=0.983333 ;XFRAC(60)=1. ************************************************************ Group 4. Y-Direction Grid Spacing NY = 21 YVLAST =126. YFRAC(1)=0.047619 ;YFRAC(2)=0.095238 YFRAC(3)=0.142857 ;YFRAC(4)=0.190476 YFRAC(5)=0.238095 ;YFRAC(6)=0.285714 YFRAC(7)=0.333333 ;YFRAC(8)=0.380952 YFRAC(9)=0.428571 ;YFRAC(10)=0.476191 YFRAC(11)=0.52381 ;YFRAC(12)=0.571429 YFRAC(13)=0.619048 ;YFRAC(14)=0.666667 YFRAC(15)=0.714286 ;YFRAC(16)=0.761905 YFRAC(17)=0.809524 ;YFRAC(18)=0.857143 YFRAC(19)=0.904762 ;YFRAC(20)=0.952381 YFRAC(21)=1. ************************************************************ Group 5. Z-Direction Grid Spacing PARAB = F NZ = 1 ZWLAST =1. ZFRAC(1)=1. ************************************************************ Group 6. Body-Fitted Coordinates ************************************************************ Group 7. Variables: STOREd,SOLVEd,NAMEd ONEPHS = T NAME(1)=P1 ;NAME(3)=U1 NAME(5)=V1 ;NAME(150)=MARK * 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,N,N,N,Y) SOLUTN(U1,Y,Y,N,N,N,Y) SOLUTN(V1,Y,Y,N,N,N,Y) SOLUTN(MARK,Y,N,N,N,N,Y) ************************************************************ 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) DIFCUT =0.5 ;ZDIFAC =1. GALA = F ;ADDDIF = F NEWENL = T ISOLX = -1 ;ISOLY = -1 ;ISOLZ = -1 ************************************************************ Group 9. Properties used if PRPS is not stored, and where PRPS = -1.0 if it is! RHO1 =1. ;TMP1 =0. ;EL1 =0. TSURR =0. ;TEMP0 =0. ;PRESS0 =0. DVO1DT =0. ;DRH1DP =0. EMISS =0. ;SCATT =0. RADIA =0. ;RADIB =0. ENUL = GRND ;ENUT =0. ENULA =0. ;ENULB =0. ;ENULC =0. ;ENULD =0. ENULE =0. ;ENULF =0. ;ENULG =0. IENULA = 0 ;IENULB = 0 PRNDTL(U1)=1. ;PRNDTL(V1)=1. PRT(U1)=1. ;PRT(V1)=1. CP1 =1. ;CP2 =1. ************************************************************ Group 10.Inter-Phase Transfer Processes ************************************************************ Group 11.Initial field variables (PHIs) FIINIT(P1)=0. ;FIINIT(U1)=0. FIINIT(V1)=0. ;FIINIT(MARK)=0. PATCH(LOWBLOK ,INIVAL, 21, 40, 1, 8, 1, 1, 1, 12) INIT(LOWBLOK ,MARK,0. , GRND ) PATCH(UPBLOK ,INIVAL, 21, 40, 14, 21, 1, 1, 1, 12) INIT(UPBLOK ,MARK,0. , GRND ) 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(INLW ,WEST , 1, 1, 1, 21, 1, 1, 1, 12) COVAL(INLW ,P1 ,1000. ,0. ) PATCH(OUTLE ,EAST , 60, 60, 1, 21, 1, 1, 1, 12) COVAL(OUTLE ,P1 ,1000. ,0. ) PATCH(OBJVEL ,CELL , 1, 60, 1, 21, 1, 1, 1, 12) COVAL(OBJVEL ,U1 , GRND , GRND ) COVAL(OBJVEL ,V1 , GRND , GRND ) PATCH(ORIVEL ,CELL , 1, 60, 1, 21, 1, 1, 1, 12) COVAL(ORIVEL ,U1 , GRND , GRND ) COVAL(ORIVEL ,V1 , GRND , GRND ) XCYCLE = F EGWF = T WALLCO = GRND2 ************************************************************ Group 14. Downstream Pressure For PARAB ************************************************************ Group 15. Terminate Sweeps LSWEEP = 50 ;ISWC1 = 1 LITHYD = 1 ;LITFLX = 1 ;LITC = 1 ;ITHC1 = 1 SELREF = T RESFAC =1.0E-02 ************************************************************ Group 16. Terminate Iterations LITER(P1)=20 ;LITER(U1)=10 LITER(V1)=10 ENDIT(P1)=1.0E-03 ;ENDIT(U1)=1.0E-03 ENDIT(V1)=1.0E-03 ************************************************************ Group 17. Relaxation RELAX(P1,LINRLX,0.25) RELAX(U1,FALSDT,0.1) RELAX(V1,FALSDT,0.1) RELAX(MARK,LINRLX,1.) OVRRLX =0. EXPERT = F ;NNORSL = F ************************************************************ Group 18. Limits VARMAX(P1)=1.0E+10 ;VARMIN(P1)=-1.0E+10 VARMAX(U1)=1.0E+06 ;VARMIN(U1)=-1.0E+06 VARMAX(V1)=1.0E+06 ;VARMIN(V1)=-1.0E+06 VARMAX(MARK)=1.0E+10 ;VARMIN(MARK)=-1.0E+10 ************************************************************ Group 19. Data transmitted to GROUND NAMSAT =MOSG PARSOL = F ISG62 = 1 SPEDAT(SET,GXMONI,TRANSIENT,L,F) SPEDAT(SET,GXMONI,PLOTALL,L,T) RG( 1) =30. ************************************************************ Group 20. Preliminary Printout DISTIL = T ;NULLPR = F NDST = 0 DSTTOL =1.0E-02 EX(P1)=82.709999 ;EX(U1)=6.576 EX(V1)=0.8536 ;EX(MARK)=0.5278 ************************************************************ 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,N,N,N) OUTPUT(V1,Y,N,Y,N,N,N) OUTPUT(MARK,Y,N,Y,N,N,N) ************************************************************ Group 22. Monitor Print-Out IXMON = 5 ;IYMON = 12 ;IZMON = 1 NPRMON = 50 ;NPRMNT = 1 ;TSTSWP = -1 UWATCH = T ;USTEER = T HIGHLO = F ************************************************************ Group 23.Field Print-Out & Plot Control NPRINT = 100000 ;NUMCLS = 5 NTPRIN = 100000 ;ISTPRF = 1 ;ISTPRL = 100000 NXPRIN = 1 ;IXPRF = 1 ;IXPRL = 10000 NYPRIN = 1 ;IYPRF = 1 ;IYPRL = 10000 IPLTF = 1 ;IPLTL = -1 ;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 No PATCHes yet used for this Group ************************************************************ Group 24. Dumps For Restarts SAVE = T ;NOWIPE = F NSAVE =CHAM IDISPA = 1 ;IDISPB = 0 ;IDISPC = 0 CSG1 ='P' STOP