** Flow around cylinder ( 4 blocks). ************************************************************** PHOTON USE p ; ; ; ; ; msg Computational Domain: mgr 1 k 1 j 1 24 col 5 mgr 2 k 1 j 2 m col 8 mgr 3 k 1 j 1 10 i 1 8 col 12 mgr 4 k 1 j 1 10 i 2 m col 14 pause cl set vec av off msg Velocity Vectors: vec k 1 sh msg Press Any Key to Continue... pause cl msg Contours of Uc1-component: con uc1 k 1 fi;0.01 msg Press Any Key to Continue... pause cl msg Contours of p1 con p1 k 1 fi;0.01 msg Press Eto exit PHOTON ... ENDUSE DISPLAY This case concerns the prediction of laminar flow over a half cylinder. The default Reynolds Number is 40. The grid is composed of 4 blocks. Block 1 surrounding the cylinder has a polar topology, and is 'unnaturally' connected to the surrounding cartesian blocks. The Q1 contains PHOTON commands. ENDDIS REAL(RC,RD,AM,PX,PY,PI6,XFF,XLL,YD,UIN,REYNO) INTEGER(NI1,NI11,NI12,NI13,NJ1) INTEGER(NI2,NI21,NI22,NI23,NJ2) INTEGER(NI3,NJ3,NI4,NJ4) ** Problem definition: NZ =1 PI6=3.1415/6.0 UIN = 1.0; REYNO = 40.0 MESG(Enter Reyolds Number in the range 0.1 - 2000 (40) READVDU(REYNO,REAL,40) IF(REYNO.GT.2000) THEN + REYNO=2000 ELSE + IF(REYNO.LT..1) THEN + REYNO=0.1 + ENDIF ENDIF TEXT(Flow around a Cylinder at Re = :REYNO: TITLE RC= 1.0; RD= 6*RC; XFF= -RD-4*RC; XLL= RD+12*RC; YD= RD+4*RC RHO1=1.0; ENUL = 2*RC/REYNO ** 1st DOMAIN NI11= 10; NI12=NI11*2; NI13=NI11 NI1=NI11+NI12+NI13; NJ1=24 ** 2d DOMAIN NI21 = 8; NI22=NI12; NI23=40; NI2= NI21+NI22+NI23 NJ2 = 8 ** 3d DOMAIN NI3 = NI21; NJ3 = NI11 ** 4th DOMAIN NI4 = NI23; NJ4 = NI13 GROUP 6. Body-fitted coordinates or grid distortion BFC= T AM = 1.0/SQRT(2.0) ** Make 1st block GSET(P,P1,-RC,0.0,0.0); GSET(P,P2,RC,0.0,0.0) GSET(P,P6,-RD,0.0,0.0); GSET(P,P3,RD,0.0,0.0) GSET(P,P5,-RD*AM,RD*AM,0.0) GSET(P,P4, RD*AM,RD*AM,0.0) GSET(P,P7, XFF,0.0,0.0); GSET(P, P8, XFF, YD,0.0) GSET(P,P9, XLL,0.0,0.0); GSET(P,P10, XLL, YD,0.0) GSET(P,P11,-RD*AM,YD,0.0) GSET(P,P12, RD*AM,YD,0.0) GSET(P,P13,XFF,RD*AM,0.0) GSET(P,P14,XLL,RD*AM,0.0) GSET(L,L12,P1,P2,NI1 ,ARC,0.0,RC,0.0) PX = RD*COS(PI6); PY = RD*SIN(PI6) GSET(L,L34,P3,P4,NI13,ARC, PX,PY,0.0) GSET(L,L45,P4,P5,NI12,ARC,0.0,RD,0.0) GSET(L,L56,P5,P6,NI11,ARC,-PX,PY,0.0) GSET(L,L23,P2,P3,NJ1 ,1.5) GSET(L,L16,P1,P6,NJ1 ,1.5) GSET(L,A35,P13,P5 ,NI21,1.0); GSET(L,A38,P13,P8 ,NJ2 ,1.0) GSET(L,A44,P4 ,P14,NI23,1.0); GSET(L,A40,P14,P10,NJ2 ,1.0) GSET(L,A81,P8 ,P11,NI21,1.0); GSET(L,A12,P11,P12,NI22,1.0) GSET(L,A20,P12,P10,NI23,1.0) GSET(L,L76,P7 ,P6 ,NI3 ,1.0); GSET(L,A73,P7 ,P13,NJ3 ,1.0) GSET(L,L39,P3 ,P9 ,NI4 ,1.0); GSET(L,A94,P9 ,P14,NJ4 ,1.0) GSET(D,NI1,NJ1+1,NZ,RC,RC,1.0) GSET(F,F1,P1,-,P2,-,P3,P4.P5,P6,-) GSET(M,F1,+I+J,1,1,1) GSET(C,K:NZ+1:,F,K1,1,NX,1,NY,+,0.0,0.0,0.1,INC,1.0) DUMPC(MBGR1) ** Make 2nd block GSET(D,NI2,NJ2+1,NZ,RC,RC,1.0) GSET(F,F2,P13,P5.P4,P14,-,P10,P12.P11,P8,-) GSET(M,F2,+I+J,1,2,1) GSET(C,K:NZ+1:,F,K1,1,NX,1,NY,+,0.0,0.0,0.1,INC,1.0) DUMPC(MBGR2) ** Make 3rd block GSET(D,NI3+1,NJ3+1,NZ,RC,RC,1.0) GSET(F,F3,P7,-,P6,-,P5,-,P13,-) GSET(M,F3,+I+J,1,1,1) GSET(C,K:NZ+1:,F,K1,1,NX,1,NY,+,0.0,0.0,0.1,INC,1.0) DUMPC(MBGR3) ** Make 4th block GSET(D,NI4+1,NJ4+1,NZ,RC,RC,1.0) GSET(F,F4,P3,-,P9,-,P14,-,P4,-) GSET(M,F4,+I+J,2,1,1) GSET(C,K:NZ+1:,F,K1,1,NX,1,NY,+,0.0,0.0,0.1,INC,1.0) DUMPC(MBGR4) ** Assemble blocks: NUMBLK= 4; READCO(MBGR+) MESG(Show grid? (N/y) READVDU(ANS,CHAR,N) IF(:ANS:.EQ.Y) THEN GCLEAR; GVIEW(Z); GGRID(Z,1,1,NI1+1,1,NJ1+1,4,0) GGRID(Z,1,NI1+2,NI1+2+NI2,2,NJ2+2,6,0) GGRID(Z,1,NI1+2+NI2+1,NI1+2+NI2+1+NI3,1,NJ3+1,9,0) GGRID(Z,1,NI1+NI2+NI3+6,NI1+NI2+NI3+NI4+6,1,NJ4+1,13,0) GDRAW ENDIF ** Links. ** North of 1 to South of 2 MPATCH(1,MBL1,NORTH,NI11+1,NI11+NI12,NJ1,NJ1,1,NZ,1,LSTEP) MPATCH(2,MBL2,SOUTH,NI21+1,NI21+NI22, 2, 2,1,NZ,1,LSTEP) ** North of 3 to South of 2 MPATCH(3,MBL3 ,NORTH,1, NI3,NJ3,NJ3,1,NZ,1,LSTEP) MPATCH(2,MBL2a,SOUTH,1,NI21, 2, 2,1,NZ,1,LSTEP) ** North of 4 to South of 2 MPATCH(4,MBL4 ,NORTH, 2, NX,NJ4,NJ4,1,NZ,1,LSTEP) MPATCH(2,MBL2b,SOUTH,NI21+NI22+1, NX, 2, 2,1,NZ,1,LSTEP) ** East of 3 to North of 1 MPATCH(3,MBL3A,EAST ,NI3, NI3, 1,NJ3,1,NZ,1,LSTEP) MPATCH(1,MBL1A,NORTH, 1,NI11,NJ1,NJ1,1,NZ,1,LSTEP) ** The next command sets the orientation of 1 relative to 3. The default is NEH to SWL. Here: N-S of 3 aligns with E-W of 1 E-W of 3 aligns with S-N of 1 H-L of 3 aligns with H-L of 1 SPEDAT sends last column ^ to show alignment SPEDAT(SET,GCV,MBL1A,C,WNL) ** West of 4 to North of 1 MPATCH(4,MBL4A ,WEST , 2, 2, 1,NJ4,1,NZ,1,LSTEP) MPATCH(1,MBL1B,NORTH ,NI11+NI12+1, NX,NJ1,NJ1,1,NZ,1,LSTEP) ** The next command sets the orientation of 1 relative to 4. The default is NEH to SWL. Here: N-S of 4 aligns with W-E of 1 E-W of 4 aligns with N-S of 1 H-L of 4 aligns with H-L of 1 ^ SPEDAT(SET,GCV,MBL1B,C,ESL) GROUP 7. Variables stored, solved & named SOLVE(U1,V1,P1) STORE(PRPS) GROUP 8. Terms in differential equations & devices GROUP 13. Boundary conditions and special sources ** INLET MPATCH(2,INL1,WEST,1,1,2,NY,1,NZ,1,LSTEP) COVAL(INL1, P1,FIXFLU,RHO1*UIN) COVAL(INL1,U1,ONLYMS,UIN); COVAL(INL1,V1,ONLYMS,0.0) MPATCH(3,INL2,WEST,1,1,1,NJ3,1,NZ,1,LSTEP) COVAL(INL2,P1,FIXFLU,RHO1*UIN) COVAL(INL2,U1,ONLYMS,UIN); COVAL(INL2,V1,ONLYMS,0.0) ** WALL MPATCH(1,WS,SWALL,1,NX,1,1,1,NZ,1,LSTEP) COVAL(WS,U1,1.0,0.0); COVAL(WS,V1,1.0,0.0) ** OUTLET MPATCH(2,OUT1,NORTH,1,NI2,NY,NY,1,NZ,1,LSTEP) COVAL(OUT1, P1,1.0E5,0.0) MPATCH(2,OUT2,EAST,NX,NX,2,NY,1,NZ,1,LSTEP) COVAL(OUT2, P1,1.0E5,0.0) MPATCH(4,OUT3,EAST,NX,NX,1,NJ4,1,NZ,1,LSTEP) COVAL(OUT3, P1,1.0E5,0.0) GROUP 15. Termination of sweeps LSWEEP= 350; TSTSWP= -1 FIINIT(U1) = 1.0 FIINIT(V1) = 0.0 GROUP 16. Termination of iterations GROUP 17. Under-relaxation devices GROUP 19. Data communicated by satellite to GROUND GCV= T; LSG9=T GROUP 21. Print-out of variables GROUP 22. Spot-value print-out IXMON= NI21/2+1; IYMON= NJ2/2+1; IZMON= 1