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 This case is like 369, but use the z-direction instead of x. An InForm-made box object moves uniformly along a duct, the cross-section of which it wholly fills. The duct contains a porous medium causing resistance to flow The ends of the duct are partially open. The fluid is 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 duct. Line-printer profile plots are used for assisting interpretation ENDDIS ************************************************************ IRUNN = 1 ;LIBREF = 370 ************************************************************ GROUP 1. Run title and other preliminaries TEXT(MOFOR - In-Form: BOX linear motion in Z dir. save1begin Initial data of problem ----------------------- delaration of parameters REAL(BXSZFAC,TIMEFAC,COMPFAC,INPCO,OUTPCO,RESCO) ! delarations ! settings BXSZFAC=0.5 ! box size divided by cell size TIMEFAC=0.75 ! time to traverse a cell divided by time step COMPFAC=0.0001 ! compressibility factor INPCO=1.0 ! inlet pressure coefficient OUTPCO=1.0 ! outlet pressure coefficient RESCO=10.0 ! resistance to flow coefficient save1end TLAST=1.0 ! PIL variables ZWLAST=1.0 LSTEP=50 NZ= 100 GROUP 2. Transience; time-step specification STEADY=F;GRDPWR(T,LSTEP,TLAST,1.0) GROUP 3. X-direction grid specification GRDPWR(X,1,0.1,1.0) GROUP 4. Y-direction grid specification GRDPWR(Y,1,2.0,1.0) GROUP 5. Z-direction grid specification GRDPWR(Z,NZ,ZWLAST,1.0) GROUP 7. Variables stored, solved & named SOLVE(P1,W1,C1) STORE(OBID,PRPS) terms(c1,n,y,n,p,p,p) PATCH(INIC1,INIVAL,1,1,1,1,1,nz/5,1,1) COVAL(INIC1,C1,0.0,1.0) GROUP 13. Boundary conditions and special sources PATCH(RESIST,VOLUME,1,NX,1,1,1,NZ,1,LSTEP) COVAL(RESIST,W1,RESCO,0.0) ** Inlet and outlet PATCH(INLET,CELL,1,1,1,NY,1,1,1,LSTEP) COVAL(INLET,P1,INPCO,0.0) COVAL(INLET,C1,ONLYMS,1.0) PATCH(OUTLET,CELL,1,1,1,NY,NZ,NZ,1,LSTEP) COVAL(OUTLET,P1,OUTPCO,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:) relax(p1,linrlx,0.1) relax(rho1,linrlx,0.1) denpco=t ** Moving box REAL(ZCELL,TSTEP,TCELL,REALNZ,REALNT,VEL) ! declaration of reals realnz=nz realnt=lstep tstep=tlast/realnt ! size of time step zcell=zwlast/realnz ! size of cell tcell=tstep*timefac ! time to traverse cell vel=zcell/tcell ! velocity of box motion CHAR(XPS,YPS,ZPS,WVEL) wvel=:vel: zps=0.15*zwlast + :wvel:*tim yps=0.0 xps=0.0 wvel (MOVOB of BOX is POS(:XPS:&:YPS:&:ZPS:&0&0&0)) INFORM13END INFORM7BEGIN STORE(SOW1,APW1,AHP1,RSW1,FLOZ) (STORED OF SOW1 IS SORC(W1)) (STORED OF APW1 IS APCO(W1)) (STORED OF AHP1 IS AHCO(P1)) (STORED OF RSW1 IS RESI(W1)) (STORED OF FLOZ IS RHO1*W1) INFORM7END SPEDAT(SET,MOFOR,MOFFILE,C,NOTSET) GROUP 15. Termination of sweeps LSWEEP=60 GROUP 22. Spot-value print-out NPRMON=LSWEEP;IZMON=NZ/2 SPEDAT(SET,GXMONI,TRANSIENT,L,F) GROUP 23. Print-out & plot control TSTSWP=-1 selref=t; resfac=1.e-2 NXPRIN=1;NYPRIN=1;NTPRIN=10 ! line-printer profiles do ii=ntprin,lstep,ntprin patch(zplot:ii:,profil,1,1,1,1,1,nz-1,:ii:,:ii:) coval(zplot:ii:,p1,0.0,0.0) coval(zplot:ii:,w1,0.0,0.0) coval(zplot:ii:,rho1,0.8,1.2) coval(zplot:ii:,floz,0.0,0.0) coval(zplot:ii:,c1,0.0,2.0) enddo DISTIL=T EX(P1)=1.829E-02; EX(W1)=1.300E-01 EX(C1)=9.001E-01; EX(FLOZ)=2.128E-01 EX(RSW1)=6.341E-06; EX(AHP1)=1.449E-01 EX(APW1)=2.856E-01; EX(SOW1)=1.118E-04 EX(RHO1)=9.996E-01 ************************************************************ GVIEW(P,0.000000E+00,1.000000E+00,0.000000E+00) GVIEW(UP,1.000000E+00,0.000000E+00,0.000000E+00) > DOM, SIZE, 1.000000E-01, 2.000000E+00, 1.000000E+00 > DOM, MONIT, 5.000000E-02, 1.000000E+00, 0.000000E+00 > DOM, SCALE, 1.000000E+00, 1.000000E+00, 1.000000E+00 > DOM, SNAPSIZE, 1.000000E-02 > GRID, RSET_Z_1, 10, 1.000000E+00 > OBJ, NAME, INLET > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 0.000000E+00 > OBJ, SIZE, 1.000000E-01, 2.000000E+00, 2.000000E-02 > OBJ, GEOMETRY, default > OBJ, ROTATION24, 1 > OBJ, TYPE, CELLTYPE > OBJ, NAME, OUTLET > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 9.800000E-01 > OBJ, SIZE, 1.000000E-01, 2.000000E+00, 1.999998E-02 > 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, 1.000000E-01, 2.000000E+00, 5.000000E-03 > 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