```
CCM Test: Laminar/Turbulent swirling flow in a pipe with
linear expansion.
**************************************************************
DISPLAY
----------------------------------------------------------
This  case  concerns  axisymmetric incompressible laminar
(or  turbulent  LTURB=  T)  flow  in the pipe with linear
expansion.   The  flow  exhibits  recirculation  in   the
region on  the pipe  axis. That  kind of  flows is common
for gas burners.

The problem is  set in Y-Z  plane; the swirling  velocity
component UC1 is solved as scalar using special treatment
(LSG6= T). User can model the same problem as 3D  (NX>1),
however the speed of convergence, provided the problem is
truly axisymmetric, is rather slow.

User can switch from the default colocated  computational
algorithm (CCM)  to the  staggered one  (STAG) by setting
LCCM= F.
----------------------------------------------------------
ENDDIS
L(PAUSE
**************************************************************
BOOLEAN(LCCM,LUNIF,LTURB); LCCM= T; LTURB= F; LUNIF= LTURB
**************************************************************
PHOTON USE
p ; ; ; ; ;

msg Computational Domain:
gr i 1
msg Press Any Key to Continue...
pause
cl
set vec av off
msg Velocity Vectors:
vec i 1 sh
msg Press Any Key to Continue...
pause
cl
msg Contours of Pressure:
con p1 i 1 fi;0.005
msg Press E  to exit PHOTON ...
ENDUSE
**************************************************************
INTEGER(NZ1,NZ2,NZ3)
REAL(REYNO,WIN,HCH1,LST1,LST2,HCH2,LCHAN,WCR,DTHYD,DXX,UIN,UCR)
REAL(KEIN,EPIN)
GROUP 1. Run title and other preliminaries
** Problem definition:
IF(LTURB) THEN
+ WIN= 1.0;  UIN= 1.0*WIN;  LCHAN= 10.; NZ3= 24
+IF(LCCM) THEN
+ TEXT(CCM : Swirling flow; Lin-expan. (K-E).
+ELSE
+ TEXT(STAG: Swirling flow; Lin-expan. (K-E).
+ NONORT = T
+ENDIF
ELSE
+ WIN= 1.0;  UIN= 1.5*WIN;  LCHAN= 5.0; NZ3= 12
+IF(LCCM) THEN
+ TEXT(CCM : Swirling flow; Lin-expan. (Re=200).
+ELSE
+ TEXT(STAG: Swirling flow; Lin-expan. (Re=200).
+ NONORT = T
+ENDIF
ENDIF
HCH2= 0.5;  HCH1= 0.2;  LST1= 0.2;  LST2= 0.8;  DXX = 0.025
NZ1 = 4;    NZ2 = 10;   NZ  = NZ1+NZ2+NZ3
NY  = 12;   NX  = 1
GROUP 6. Body-fitted coordinates or grid distortion
BFC = T; GSET(D,NX,NY,NZ,HCH2/NY,HCH2,LCHAN)
GSET(P,P1,0.0,0.0 ,0.0      );  GSET(P,P2,0.0,0.0 ,LST1     )
GSET(P,P3,0.0,0.0 ,LST1+LST2);  GSET(P,P4,0.0,0.0 ,LCHAN    )
GSET(P,P5,0.0,HCH2,LCHAN    );  GSET(P,P6,0.0,HCH2,LST1+LST2)
GSET(P,P7,0.0,HCH1,LST1     );  GSET(P,P8,0.0,HCH1,0.0      )
GSET(L,L12,P1,P2,NZ1, 1.0);  GSET(L,L23,P2,P3,NZ2, 1.3)
GSET(L,L34,P3,P4,NZ3, 1.4);  GSET(L,L45,P4,P5,NY,  1.0)
GSET(L,L56,P5,P6,NZ3,-1.4);  GSET(L,L67,P6,P7,NZ2,-1.3)
GSET(L,L78,P7,P8,NZ1, 1.0);  GSET(L,L81,P8,P1,NY,  1.0)
GSET(F,F1,P1,P2.P3,P4,-,P5,P6.P7,P8,-); GSET(M,F1,+K+J,1,1,1)
GSET(C,I:NX+1:,F,I1,RZ,-DXX*NX,0.0,0.0,INC,1.0)
GVIEW(X); VIEW
GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1); SOLUTN(P1,Y,Y,Y,N,N,N)
IF(LCCM) THEN
+ NAME(C1)= UC1;  NAME(C2)= VC1;  NAME(C3)= WC1
+ SOLVE(UC1,VC1,WC1);      SOLUTN(UC1,Y,Y,Y,P,P,P)
+ SOLUTN(VC1,Y,Y,Y,P,P,P); SOLUTN(WC1,Y,Y,Y,P,P,P)
+  TERMS(WC1,N,Y,Y,P,P,P);  TERMS(VC1,N,Y,Y,P,P,P)
+  TERMS(W1, N,N,N,N,P,N);  TERMS(V1, N,N,N,N,P,N)
+IF(NX.GT.1) THEN
+ XCYCLE= T;  SOLVE(U1)
+ TERMS(UC1,N,Y,Y,P,P,P); TERMS(U1,N,N,N,N,P,N)
+ENDIF
ELSE
+ SOLVE(U1)
ENDIF
IF(LTURB) THEN
+ TURMOD(KEMODL)
+ SOLUTN(KE,Y,Y,Y,P,P,P); SOLUTN(EP,Y,Y,Y,P,P,P)
+ KEIN= (0.05*WIN)**2;  EPIN= 0.1643*KEIN**1.5/(0.09*HCH1)
+ ENUL= 1.544E-5;  FIINIT(KE)= KEIN;  FIINIT(EP)= EPIN
ELSE
+ REYNO= 200.0;  ENUL= WIN*HCH1/REYNO
ENDIF
GROUP 9. Properties of the medium (or media)
RHO1= 1.189
GROUP 11. Initialization of variable or porosity fields
GROUP 13. Boundary conditions and special sources
** Inlet.
DO II = 1,NY
+IF(LUNIF) THEN
+ WCR = WIN
+ELSE
+ WCR = WIN*(1.0-((2*II-1)/NY/2)**2)
+ENDIF
+ UCR = UIN*(2*II-1)/NY/2
+ INLET(INL:II:,LOW,1,NX,II,II,1,1,1,LSTEP)
+  VALUE(INL:II:,P1,WCR*RHO1)
+IF(LCCM) THEN
+  VALUE(INL:II:,UC1,UCR); VALUE(INL:II:,VC1,0.0)
+  VALUE(INL:II:,WC1,WCR)
+ELSE
+  VALUE(INL:II:,U1, UCR); VALUE(INL:II:,V1, 0.0)
+  VALUE(INL:II:,W1, WCR)
+ENDIF
+IF(LTURB) THEN
+  VALUE(INL:II:,KE,KEIN); VALUE(INL:II:,EP,EPIN)
+ENDIF
ENDDO
** Walls.
PATCH(WN,NWALL,1,NX,NY,NY,1,NZ,1,LSTEP)
** Outlet.
PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,LSTEP); COVAL(OUT,P1,1.E5,0.0)
IF(LTURB) THEN
+ COVAL( WN,KE, LOGLAW,LOGLAW); COVAL( WN,EP, LOGLAW,LOGLAW)
+ COVAL(OUT,KE,ONLYMS, SAME); COVAL(OUT,EP,ONLYMS, SAME)
+IF(LCCM) THEN
+ COVAL(WN,UC1,LOGLAW,0.0); COVAL(WN,VC1,LOGLAW,0.0)
+ COVAL(WN,WC1,LOGLAW,0.0)
+ELSE
+ COVAL(WN,U1,LOGLAW,0.0); COVAL(WN,W1,LOGLAW,0.0)
+ENDIF
ELSE
+IF(LCCM) THEN
+ COVAL(WN,UC1,1.0,0.0); COVAL(WN,VC1,1.0,0.0)
+ COVAL(WN,WC1,1.0,0.0)
+ELSE
+ COVAL(WN,U1, 1.0,0.0); COVAL(WN,W1, 1.0,0.0)
+ENDIF
ENDIF
GROUP 15. Termination of sweeps
LSWEEP = 500;  TSTSWP = -1;  SELREF= T;  RESFAC= 1.E-3
GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,0.5);  DTHYD = LCHAN/NZ/WIN
IF(LCCM) THEN
+ RELAX(UC1,FALSDT,DTHYD); RELAX(VC1,FALSDT,DTHYD)
+ RELAX(WC1,FALSDT,DTHYD); VARMIN(UC1)= 0.0
ELSE
+ RELAX(U1,FALSDT,DTHYD); RELAX(V1,FALSDT,DTHYD)
+ RELAX(W1,FALSDT,DTHYD); VARMIN(U1)= 0.0
ENDIF
IF(LTURB) THEN
+ LSWEEP= 1000; KELIN= 1; YPLS= T
+ RELAX(KE,FALSDT,DTHYD); RELAX(EP,FALSDT,DTHYD)
ENDIF
GROUP 19. Data communicated by satellite to GROUND
IF(LCCM) THEN
* LSG4= T activates nonorthogonality treatment in CCM
* LSG6= T activates special treatment of swirling
velocity component (UC1) for NX=1 cases.
+ CSG3= LCRU;  LSG4= T;  LSG6= T
ENDIF
GROUP 22. Spot-value print-out
IXMON= 1; IYMON= NY/2+1; IZMON= NZ/2+1
```