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 y-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.
  
  PHOTON USE commands are included to assist display of results.
  ENDDIS
  photon use
  p
  parphi
  
  
  con v1 x 1 z 2 m fi;0.01
  pause
  con floy x 1  fi;0.01
  pause
  con obid x 1 fi;0.01
  pause
  con p1 x 1 z 2 m fi;0.01
  pause
  con anp1 x 1 fi ;0.01
  pause
  con apv1 x 1 fi;0.01
  pause
  enduse

  ************************************************************
 IRUNN   =       1 ;LIBREF =     371
  ************************************************************
    GROUP 1. Run title and other preliminaries
TEXT(MOFOR - In-Form: BOX linear motion in Y dir.
  save1begin
           Initial data of problem
           -----------------------
          delaration of parameters
REAL(BXSZFAC,TIMEFAC,COMPFAC,INPCO,OUTPCO,RESCO) ! delaration of parameters
                   ! 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
YVLAST=1.0
LSTEP=50
NY=100
 
    GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,lstep,TLAST,1.0)
 
    GROUP 3. X-direction grid specification
GRDPWR(X,1,2.0,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,V1)
STORE(OBID,PRPS)
 
    GROUP 13. Boundary conditions and special sources
PATCH(RESIST,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(RESIST,V1,RESCO,0.0)
 
  ** Inlet and outlet
PATCH(INLET,CELL,1,NX,1,1,1,1,1,LSTEP)
COVAL(INLET,P1,INPCO,0.0)
PATCH(OUTLET,CELL,1,NX,NY,NY,1,1,1,LSTEP)
COVAL(OUTLET,P1,OUTPCO,0.0)
 
  INFORM13BEGIN
store(rho1)
(property rho1 is 1.0+ :compfac:*p1)  ! density depends on pressure
(property drh1dp is :compfac:)
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;IXMON=NX/4+1;IYMON=NY/4+1;IZMON=NZ/2+1
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 23. Print-out & plot control
TSTSWP=-1
idispa=1
selref=t; resfac=1.e-2
NXPRIN=1;NYPRIN=1;NTPRIN=1
 
DISTIL=T
EX(P1)=2.807E+00; EX(V1)=6.666E-01
EX(FLOY)=6.598E-01; EX(RSV1)=7.599E-06
EX(ANP1)=1.535E-01; EX(APV1)=1.000E+03
EX(SOV1)=9.851E-04; EX(RHO1)=9.999E-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, 5.000000E-03, 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