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 y-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 = 373 ************************************************************ GROUP 1. Run title and other preliminaries TEXT(MOFOR - In-Form: BOX linear motion 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 YVLAST=1.0 LSTEP=50 NY= 50 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,NY,YVLAST,1.0) GROUP 5. Z-direction grid specification GRDPWR(Z,1,2.0,1.0) GROUP 7. Variables stored, solved & named SOLVE(P1,V1,C1) STORE(OBID,PRPS) terms(c1,n,y,n,p,p,p) PATCH(INIC1,INIVAL,1,1,1,ny/5,1,1,1,1) COVAL(INIC1,C1,0.0,1.0) GROUP 13. Boundary conditions and special sources PATCH(RESIST,VOLUME,1,NX,1,NY,1,1,1,LSTEP) COVAL(RESIST,V1,RESCO,0.0) ** Inlet and outlet PATCH(INLET,CELL,1,1,1,1,1,NZ,1,LSTEP) COVAL(INLET,P1,INPCO,0.0) COVAL(INLET,C1,ONLYMS,1.0) PATCH(OUTLET,CELL,1,1,NY,NY,1,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(YCELL,TSTEP,TCELL,REALNY,REALNT,VEL) ! declaration of reals realny=ny realnt=lstep tstep=tlast/realnt ! size of time step ycell=yvlast/realny ! size of cell tcell=tstep*timefac ! time to traverse cell vel=ycell/tcell ! velocity of box motion CHAR(XPS,YPS,ZPS,VVEL) vvel=:vel: yps=0.15*yvlast + :vvel:*tim xps=0.0 zps=0.0 vvel (MOVOB of BOX is POS(:XPS:&:YPS:&:ZPS:&0&0&0)) INFORM13END INFORM7BEGIN STORE(SOV1,APV1,ANP1,RSV1,FLOY) (STORED OF SOV1 IS SORC(V1)) (STORED OF APV1 IS APCO(V1)) (STORED OF ANP1 IS ANCO(P1)) (STORED OF RSV1 IS RESI(V1)) (STORED OF FLOY IS RHO1*V1) 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(yplot:ii:,profil,1,1,1,ny-1,1,1,:ii:,:ii:) coval(yplot:ii:,p1,0.0,0.0) coval(yplot:ii:,v1,0.0,0.0) coval(yplot:ii:,rho1,0.8,1.2) coval(yplot:ii:,floy,0.0,0.0) coval(yplot:ii:,c1,0.0,2.0) enddo DISTIL=T EX(P1)=1.848E-02; EX(V1)=1.301E-01 EX(C1)=9.001E-01; EX(FLOY)=1.274E-01 EX(RSV1)=5.231E-06; EX(ANP1)=1.452E-01 EX(APV1)=2.697E-01; EX(SOV1)=2.482E-04 EX(RHO1)=9.996E-01 ************************************************************ GVIEW(P,1.000000E+00,0.000000E+00,0.000000E+00) GVIEW(UP,0.000000E+00,0.000000E+00,1.000000E+00) > DOM, SIZE, 2.000000E+00, 1.000000E+00, 1.000000E-01 > DOM, MONIT, 1.000000E+00, 2.550000E-01, 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, 2.000000E+00, 1.000000E-02, 1.000000E-01 > OBJ, GEOMETRY, default > OBJ, ROTATION24, 1 > OBJ, TYPE, CELLTYPE > OBJ, NAME, OUTLET > OBJ, POSITION, 0.000000E+00, 9.900000E-01, 0.000000E+00 > OBJ, SIZE, 2.000000E+00, 9.999990E-03, 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.000000E+00, 1.000000E-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