TEXT(YX SCALAR CONVECTION WITH RECIRCULATION TITLE mesg( PC486/50 time last reported as 2.5 min DISPLAY Numerical Schemes validation example: 2-d x-y, Cartesian, steady, elliptic simulation The problem considered is pure convection of scalar step in a prescribed recirculating velocity field. The flow geometry is a rectangular domain of 2 units length (X) and unit height (Y). The flow enters through the inlet in the range X=(-1,0), and then circulates clockwise through 180 degrees to exit in the range X=(0,1). At inlet, the scalar C=0 for X in the range (-1,-0.5) and C=1 in the range (0,1). Since physical diffusion is absent, this step change should be convected by the recirculating flow so as to appear as a step change at the outlet; thus, the exact solution is C=1 for X in the range (0,0.5) and C=0 for X in the range (0.5,1). The example compares the solution for 6 different linear schemes and 9 non-linear schemes for the discretisation of convection. NB: SATELLITE takes some time to process PIL commands ENDDIS This test case was devised by R.M.Smith and A.G.Hutton [1982] (Num.Heat Transfer, Vol.5, p439) so as to provide a searching test of numerical convection schemes, especially for schemes based on 1d considerations. The velocity field is prescribed as: U = 2*Y*(1-X*X) and V = -2*X*(1-Y*Y) with X in the range (-1,+1) and Y in the range (0,1). PHOTON USE p 0.20443E+04 0.15633E+04 CR vec z 1 sh;gr ou z 1 stream 2d z 1 0 1 10 redr msg streamlines and vectors msg pressto continue pause cl;con usol z 1 fi;.1;gr z 1 msg upwind differencing scheme msg press to continue pause cl;con qsol z 1 fi;.1;gr z 1 msg QUICK scheme msg press to continue pause cl;con bsol z 1 fi;.1;gr z 1 msg SUPERBEE scheme msg press to end pause END USE REAL(FLOLY,CIN,DTF) XULAST=2.0;YVLAST=1.;NX=20;NY=20 GROUP 3. X-direction grid specification GRDPWR(X,NX,XULAST,1.0) GROUP 4. Y-direction grid specification GRDPWR(Y,NY,YVLAST,1.0) GROUP 7. Variables stored, solved & named ** linear schemes assigned to scalars ** USOL = uds CSOL = cds QSOL = quick LSOL = linear upwind 3SOL = cubic upwind FSOL = fromm's scheme SOLVE(C1);NAME(C1)=USOL;SOLVE(C2);NAME(C2)=CSOL SOLVE(C3);NAME(C3)=QSOL;SOLVE(C4);NAME(C4)=LSOL SOLVE(C5);NAME(C5)=3SOL;SOLVE(C6);NAME(C6)=FSOL ** non-linear schemes assigned to scalars ** SSOL = SMART KSOL = KOREN MSOL = MINMOD VSOL = VAN ALDBDA BSOL = SUPERBEE HSOL = HQUICK NSOL = VAN LEER 1 (NOLL) ZSOL = VAN LEER 2 (ZHU) OSOL = OSPRE SOLVE(C7);NAME(C7)=SSOL;SOLVE(C8);NAME(C8)=KSOL SOLVE(C9);NAME(C9)=MSOL;SOLVE(C10);NAME(C10)=VSOL SOLVE(C11);NAME(C11)=BSOL;SOLVE(C12);NAME(C12)=HSOL SOLVE(C13);NAME(C13)=NSOL;SOLVE(C14);NAME(C14)=ZSOL SOLVE(C15);NAME(C15)=OSOL;STORE(U1,V1) GROUP 8. Terms (in differential equations) & devices TERMS(USOL,P,P,N,P,P,P);TERMS(CSOL,P,P,N,P,P,P) TERMS(QSOL,P,P,N,P,P,P);TERMS(LSOL,P,P,N,P,P,P) TERMS(3SOL,P,P,N,P,P,P);TERMS(FSOL,P,P,N,P,P,P) TERMS(SSOL,P,P,N,P,P,P);TERMS(KSOL,P,P,N,P,P,P) TERMS(MSOL,P,P,N,P,P,P);TERMS(VSOL,P,P,N,P,P,P) TERMS(BSOL,P,P,N,P,P,P);TERMS(HSOL,P,P,N,P,P,P) TERMS(NSOL,P,P,N,P,P,P);TERMS(ZSOL,P,P,N,P,P,P) TERMS(OSOL,P,P,N,P,P,P) ** Select numerical schemes for convection SCHEME(QUICK,QSOL);SCHEME(CDS,CSOL);SCHEME(LUS,LSOL) SCHEME(CUS,3SOL);SCHEME(FROMM,FSOL);SCHEME(SMART,SSOL) SCHEME(KOREN,KSOL);SCHEME(MINMOD,MSOL);SCHEME(VANALB,VSOL) SCHEME(SUPBEE,BSOL);SCHEME(HQUICK,HSOL);SCHEME(VANL1,NSOL) SCHEME(VANL2,ZSOL);SCHEME(OSPRE,OSOL) GROUP 11. Initialization of variable or porosity fields ARRAY(YG,REAL,NY);ARRAY(XG,REAL,NX) REAL(XU,XUT,XUT2,XGT,YV,UVEL,VVEL);INTEGER(II1,JJ1) XU=XFRAC(1);XG(1)=0.5*XU DO II=2,NX + II1=II-1 + XG(II)=0.5*(XFRAC(II)+XFRAC(II1)) ENDDO YV=YFRAC(1);YG(1)=0.5*YV DO JJ=2,NY + JJ1=JJ-1 + YG(JJ)=0.5*(YFRAC(JJ)+YFRAC(JJ1)) ENDDO DO II=1,NX + XUT=XFRAC(II)*XULAST-1.0;XUT2=XUT*XUT + XGT=XG(II)*XULAST-1.0 DO JJ=1,NY + YV=YFRAC(JJ);UVEL=2.*YG(JJ)*(1.-XUT2) + VVEL=-2.*XGT*(1.-YV*YV) + PATCH(INX:II:Y:JJ:,INIVAL,II,II,JJ,JJ,1,NZ,1,LSTEP) + COVAL(INX:II:Y:JJ:,U1,ONLYMS,UVEL) + COVAL(INX:II:Y:JJ:,V1,ONLYMS,VVEL) ENDDO ENDDO GROUP 13. Boundary conditions and special sources Patches for flow entry DO II=1,NX/2 + PATCH(INL:II:,SOUTH,II,II,1,1,1,NZ,1,LSTEP) + XUT=XG(II)*XULAST;XGT=XUT-1.0 + VVEL=-2.*XGT;FLOLY=RHO1*VVEL;CIN=0.0 IF(XUT.GE.0.5) THEN + CIN=1.0 ENDIF + COVAL(INL:II:,USOL,FLOLY,CIN);COVAL(INL:II:,CSOL,FLOLY,CIN) + COVAL(INL:II:,QSOL,FLOLY,CIN);COVAL(INL:II:,LSOL,FLOLY,CIN) + COVAL(INL:II:,3SOL,FLOLY,CIN);COVAL(INL:II:,FSOL,FLOLY,CIN) + COVAL(INL:II:,SSOL,FLOLY,CIN);COVAL(INL:II:,KSOL,FLOLY,CIN) + COVAL(INL:II:,MSOL,FLOLY,CIN);COVAL(INL:II:,VSOL,FLOLY,CIN) + COVAL(INL:II:,BSOL,FLOLY,CIN);COVAL(INL:II:,HSOL,FLOLY,CIN) + COVAL(INL:II:,NSOL,FLOLY,CIN);COVAL(INL:II:,ZSOL,FLOLY,CIN) + COVAL(INL:II:,OSOL,FLOLY,CIN) ENDDO GROUP 15. Termination of sweeps LSWEEP=250 GROUP 16. TERMINATION OF ITERATIONS GROUP 17. Under-relaxation devices DTF=0.1*YVLAST/FLOLY RELAX(SSOL,FALSDT,0.1*DTF);RELAX(KSOL,FALSDT,DTF) RELAX(BSOL,FALSDT,DTF) GROUP 19. Data communicated by satellite to GROUND GROUP 20. Preliminary print-out ECHO=F GROUP 21. Print-out of variables OUTPUT(U1,N,N,N,N,N,N);OUTPUT(V1,N,N,N,N,N,N) GROUP 22. Spot-value print-out IXMON=NX-3;IYMON=8;IZMON=1;TSTSWP=-1 ITABL=3;NPLT=10;TSTSWP=-1 GROUP 23. Field print-out and plot control GROUP 24. Dumps for restarts