TALK=F;RUN( 1, 1) ************************************************************ Q1 created by VDI menu, Version 3.6, Date 01/04/04 CPVNAM=VDI;SPPNAM=Core ************************************************************ Echo DISPLAY / USE settings DISPLAY A wide thin box moves diagonally across a two-dimensional space at uniform velocity. A box is an InForm-made object. The domain contains a porous medium causing resistance to flow. The boundaries of the domain are open. The fluid is slightly compressible. Parameters are provided which enable the effects on convergence and accuracy to be noted of: * box size divided by cell size; * time to traverse a cell divided by time step; * the compressibility factor; * the resistance coefficient; * pressure-drop coefficients at the ends of the domain. PHOTON USE commands are included to assist display of results. ENDDIS photon use p p1; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p2; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p3; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p4; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p5; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p6; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p7; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p8; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p9; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p10; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p11; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p12; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p13; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p14; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p15; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p16; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p17; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p18; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p19; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 upause 1 p p20; gr ou z 1 set prop off ve z 1 sh surf obid z 0.1 enduse ************************************************************ IRUNN = 1 ;LIBREF = 375 ************************************************************ GROUP 1. Run title and other preliminaries TEXT(MOFOR/In-Form: diagonal motion in XY save1begin Initial data of problem ----------------------- delaration of parameters REAL(BXSZFAC,BYSZFAC,ANGL,TIMEFAC,COMPFAC,PCO,RESCO) ! delaration REAL(DMSIZE,PI) ! of parameters ! settings BXSZFAC=9.0 ! box X size divided by cell size BYSZFAC=1.0 ! box Y size divided by cell size ANGL=-45. ! BOX rotation angle about Z axis TIMEFAC=0.75 ! time to traverse a cell divided by time step COMPFAC=0.1 ! compressibility factor PCO=1.0 ! pressure coefficient RESCO=1.0 ! resistance to flow coefficient DMSIZE=1.0 ! domain size PI=3.14159 ! Pi number save1end TLAST=10.0 ! PIL variables XULAST=DMSIZE YVLAST=DMSIZE LSTEP=20 NX=40 NY=40 GROUP 1. Run title and other preliminaries GROUP 2. Transience; time-step specification STEADY=F;GRDPWR(T,LSTEP,TLAST,1.0) 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 5. Z-direction grid specification GRDPWR(Z,1,0.1,1.0) GROUP 7. Variables stored, solved & named SOLVE(P1,U1,V1) STORE(OBID,PRPS) GROUP 13. Boundary conditions and special sources ** Resistance PATCH(RESIST,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP) COVAL(RESIST,U1,RESCO,0.0) COVAL(RESIST,V1,RESCO,0.0) ** open boundaries PATCH(low x,CELL,1,1,1,NY,1,1,1,LSTEP) COVAL(low x,P1,PCO,0.0) PATCH(high x,CELL,NX,NX,1,NY,1,1,1,LSTEP) COVAL(high x,P1,PCO,0.0) PATCH(low y,CELL,1,NX,1,1,1,1,1,LSTEP) COVAL(low y,P1,PCO,0.0) PATCH(high y,CELL,1,NX,NY,NY,1,1,1,LSTEP) COVAL(high y,P1,PCO,0.0) ** The space within which box may move PATCH(IMOFOR,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP) INFORM13BEGIN store(rho1) (property rho1 is 1.0+ :compfac:*p1) ! density depends on pressure (property drh1dp is :compfac:) denpco=t ** Moving box REAL(XCELL,YCELL,TSTEP,TCELL,REALNX,REALNY,REALNT,UVEL,VVEL) ! declaration ! of reals realnx=nx; realny=ny realnt=lstep tstep=tlast/realnt ! size of time step xcell=xulast/realnx ! X size of cell ycell=yvlast/realny ! Y size of cell tcell=tstep*timefac ! time to traverse cell uvel=xcell/tcell ! U1 velocity of box motion vvel=ycell/tcell ! V1 velocity of box motion REAL(XSIZE,YSIZE,RTMP,SINA,COSA) CHAR(XPS,YPS,ZPS,VEL) real(ang); ang=pi*angl/180. sina=sin(ang) cosa=cos(ang) xsize=xcell*bxszfac ysize=ycell*byszfac vel=:uvel: rtmp=.1*xulast-0.5*xsize*cosa+0.5*ysize*sina xps=:vel:*tim+(:rtmp:) vel=:vvel: rtmp=.1*xulast-0.5*xsize*sina-0.5*ysize*cosa yps=:vel:*tim+(:rtmp:) zps=.0 vel xps yps (MOVOB of BOX is POS(:XPS:&:YPS:&:ZPS:&0&0&:ANGL:)) INFORM13END SPEDAT(SET,MOFOR,MOFFILE,C,NOTSET) ISG62 = 0 GROUP 15. Termination of sweeps LSWEEP=100 GROUP 17. Under-relaxation devices RELAX(P1,LINRLX,0.1) RELAX(V1,FALSDT,0.1*TCELL) RELAX(U1,FALSDT,0.1*TCELL) RELAX(RHO1,LINRLX,0.1) varmax(p1)=1.0 varmin(p1)=-1.0 varmin(rho1)=0.01 SPEDAT(SET,GXMONI,TRANSIENT,L,F) GROUP 22. Spot-value print-out NPRMON=LSWEEP;IXMON=NX/4+1;IYMON=NY/4+1 IZMON=-1 ! use negative value to cause graphics monitor ! to display maximum and minumum values GROUP 23. Print-out & plot control TSTSWP=-1 IDISPA=1; CSG1=P SELREF=T; RESFAC=1.E-2 NTPRIN=1 DISTIL=T EX(P1)=1.790E-03; EX(U1)=9.614E-03; EX(V1)=9.573E-03; EX(RHO1)=1.000E+00; EX(PRPS)=9.919E-01 ************************************************************ GVIEW(P,0.000000E+00,0.000000E+00,1.000000E+00) GVIEW(UP,0.000000E+00,1.000000E+00,0.000000E+00) > DOM, SIZE, 1.000000E+00, 1.000000E+00, 1.000000E-01 > DOM, MONIT, 1.250000E-02, 1.250000E-02, 5.000000E-02 > DOM, SCALE, 1.000000E+00, 1.000000E+00, 1.000000E+00 > DOM, SNAPSIZE, 1.000000E-02 > OBJ, NAME, LOWX > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 0.000000E+00 > OBJ, SIZE, 2.500000E-02, 1.000000E+00, 1.000000E-01 > OBJ, GEOMETRY, default > OBJ, ROTATION24, 1 > OBJ, TYPE, CELLTYPE > OBJ, NAME, HIGHX > OBJ, POSITION, 9.750000E-01, 0.000000E+00, 0.000000E+00 > OBJ, SIZE, 2.499998E-02, 1.000000E+00, 1.000000E-01 > OBJ, GEOMETRY, default > OBJ, ROTATION24, 1 > OBJ, TYPE, CELLTYPE > OBJ, NAME, LOWY > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 0.000000E+00 > OBJ, SIZE, 1.000000E+00, 2.500000E-02, 1.000000E-01 > OBJ, GEOMETRY, default > OBJ, ROTATION24, 1 > OBJ, TYPE, CELLTYPE > OBJ, NAME, HIGHY > OBJ, POSITION, 0.000000E+00, 9.750000E-01, 0.000000E+00 > OBJ, SIZE, 1.000000E+00, 2.499998E-02, 1.000000E-01 > OBJ, GEOMETRY, default > OBJ, ROTATION24, 1 > OBJ, TYPE, CELLTYPE > OBJ, NAME, BOX > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 0.000000E+00 > OBJ, SIZE, 2.250000E-01, 2.500000E-02, 1.000000E-01 > OBJ, GEOMETRY, cube14 > OBJ, ROTATION24, 1 > OBJ, TYPE, BLOCKAGE > OBJ, MATERIAL, 198,Solid with smooth-wall friction > OBJ, TIME_LIMITS, ALWAYS_ACTIVE lsg57=t #maxabs STOP