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 370, but use the x-direction instead of z. 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 = 372 ************************************************************ GROUP 1. Run title and other preliminaries TEXT(MOFOR - In-Form: BOX linear motion in X-dir save1begin Initial data of problem ----------------------- delaration of parameters REAL(BXSZFAC,TIMEFAC,COMPFAC,INPCO,OUTPCO,RESCO) ! delarations ! settings BXSZFAC=1.0 ! box size divided by cell size TIMEFAC=1.0 ! time to traverse a cell divided by time step COMPFAC=0.1 ! 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 XULAST=1.0 LSTEP=50 NX= 50 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,1,2.0,1.0) GROUP 5. Z-direction grid specification GRDPWR(Z,1,0.1,1.0) GROUP 7. Variables stored, solved & named SOLVE(P1,U1,C1) STORE(OBID,PRPS) terms(c1,n,y,n,p,p,p) PATCH(INIC1,INIVAL,1,nx/5,1,1,1,1,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,U1,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,NX,NX,1,NY,1,1,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(XCELL,TSTEP,TCELL,REALNX,REALNT,VEL) ! declaration of reals realnx=nx realnt=lstep tstep=tlast/realnt ! size of time step xcell=xulast/realnx ! size of cell tcell=tstep*timefac ! time to traverse cell vel=xcell/tcell ! velocity of box motion CHAR(XPS,YPS,ZPS,UVEL) uvel=:vel: xps=0.15*xulast + :uvel:*tim yps=0.0 zps=0.0 uvel (MOVOB of BOX is POS(:XPS:&:YPS:&:ZPS:&0&0&0)) INFORM13END INFORM7BEGIN STORE(SOU1,APU1,AEP1,RSU1,FLOX) (STORED OF SOU1 IS SORC(U1)) (STORED OF APU1 IS APCO(U1)) (STORED OF AEP1 IS AECO(P1)) (STORED OF RSU1 IS RESI(U1)) (STORED OF FLOX IS RHO1*U1) 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(xplot:ii:,profil,1,nx-1,1,1,1,1,:ii:,:ii:) coval(xplot:ii:,p1,0.0,0.0) coval(xplot:ii:,u1,0.0,0.0) coval(xplot:ii:,rho1,0.8,1.2) coval(xplot:ii:,flox,0.0,0.0) coval(xplot:ii:,c1,0.0,2.0) enddo DISTIL=T EX(P1)=1.829E-02; EX(U1)=1.301E-01 EX(C1)=9.001E-01; EX(FLOX)=1.274E-01 EX(RSU1)=5.231E-06; EX(AEP1)=1.452E-01 EX(APU1)=2.697E-01; EX(SOU1)=2.482E-04 EX(RHO1)=9.996E-01 ************************************************************ GVIEW(P,0.000000E+00,-1.000000E+00,0.000000E+00) GVIEW(UP,0.000000E+00,0.000000E+00,1.000000E+00) > DOM, SIZE, 1.000000E+00, 2.000000E+00, 1.000000E-01 > DOM, MONIT, 2.550000E-01, 1.000000E+00, 5.000000E-02 > DOM, SCALE, 1.000000E+00, 1.000000E+00, 1.000000E+00 > DOM, SNAPSIZE, 1.000000E-02 > OBJ, NAME, INLET > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 0.000000E+00 > OBJ, SIZE, 1.000000E-02, 2.000000E+00, 1.000000E-01 > OBJ, GEOMETRY, default > OBJ, ROTATION24, 1 > OBJ, TYPE, CELLTYPE > OBJ, NAME, OUTLET > OBJ, POSITION, 9.900000E-01, 0.000000E+00, 0.000000E+00 > OBJ, SIZE, 9.999990E-03, 2.000000E+00, 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, 1.000000E-02, 2.000000E+00, 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