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 378, but use the xz-plane instead of xy.

  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.
  It places across all domain.
  The boundaries of the domain are open.
  The fluid is non-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.

  ENUL=1.0 for setting one-dimensional flow.
  
  PHOTON USE commands are included to assist display of results.
  ENDDIS
  photon use
  p
  p2;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p3;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p4;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p5;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p6;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p7;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p8;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p9;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p10;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  p
  p11;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p12;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p13;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p14;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p15;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p16;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p17;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p18;
 
  gr ou y 1
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p19;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  upause 2
  p
  p20;
 
  gr ou y 1
  set prop off
  ve y 1 sh
  surf obid y 0.1
  enduse

  ************************************************************
 IRUNN   =       1 ;LIBREF =     380
  ************************************************************
    GROUP 1. Run title and other preliminaries
TEXT(MOFOR/In-Form: diagonal motion in XZ
   save1begin
           Initial data of problem
           -----------------------
          delaration of parameters
REAL(BZSZFAC,BXSZFAC,ANGL,TIMEFAC,COMPFAC,PCO,RESCO) ! delaration
REAL(DMSIZE)                                         ! of parameters
                   ! settings
BZSZFAC=40.        ! box Z size divided by cell size      
BXSZFAC=1.0        ! box X size divided by cell size
ANGL=-45.          ! BOX rotation angle about Y axis
TIMEFAC=0.75       ! time to traverse a cell divided by time step
COMPFAC=0.0        ! compressibility factor
PCO=1.0            ! pressure coefficient
RESCO=0.0          ! resistance to flow coefficient
DMSIZE=1.0         ! domain size
   save1end
TLAST=10.0         ! PIL variables
ZWLAST=DMSIZE
XULAST=DMSIZE
LSTEP=20
NZ=40
NX=40
 
    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,0.1,1.0)
 
    GROUP 5. Z-direction grid specification
GRDPWR(Z,NZ,ZWLAST,1.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,W1,U1)
SOLUTN(P1,Y,Y,Y,N,N,Y)
SOLUTN(U1,Y,Y,Y,N,N,Y)
SOLUTN(W1,Y,Y,Y,N,N,Y)
STORE(OBID,PRPS)

    GROUP 9. Properties of the medium (or media)
ENUL=1.0
 
    GROUP 13. Boundary conditions and special sources
  ** Resistance
PATCH(RESIST,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(RESIST,W1,RESCO,0.0)
COVAL(RESIST,U1,RESCO,0.0)
 
  ** open boundaries
PATCH(low z,CELL,1,NX,1,1,1,1,1,LSTEP)
COVAL(low z,P1,PCO,0.0)
 
PATCH(high z,CELL,1,NX,1,1,NZ,NZ,1,LSTEP)
COVAL(high z,P1,PCO,0.0)
 
PATCH(low x,CELL,1,1,1,1,1,NZ,1,LSTEP)
COVAL(low x,P1,PCO,0.0)
 
PATCH(high x,CELL,NX,NX,1,1,1,NZ,1,LSTEP)
COVAL(high x,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(ZCELL,XCELL,TSTEP,TCELL,REALNZ,REALNX,REALNT,WVEL,UVEL)  ! declaration
                                                              ! of reals
realnz=nz; realnx=nx
realnt=lstep
tstep=tlast/realnt             ! size of time step
zcell=zwlast/realnz            ! Z size of cell
xcell=xulast/realnx            ! X size of cell
tcell=tstep*timefac            ! time to traverse cell
wvel=zcell/tcell               ! W1 velocity of box motion
uvel=xcell/tcell               ! U1 velocity of box motion
REAL(ZSIZE,XSIZE,RTMP,SINA,COSA)
CHAR(XPS,YPS,ZPS,VEL)
sina=sin(angl)
cosa=cos(angl)
zsize=zcell*bzszfac
xsize=xcell*bxszfac

vel=:wvel:
rtmp=-0.13*zwlast-0.5*zsize*cosa+0.5*xsize*sina
zps=:vel:*tim+(:rtmp:)

vel=:uvel:
rtmp=-0.13*xulast-0.5*zsize*sina-0.5*xsize*cosa
xps=:vel:*tim+(:rtmp:)

yps=.0

vel
zps
xps
 
(MOVOB of BOX is POS(:XPS:&:YPS:&:ZPS:&0&:ANGL:&0))

  INFORM13END
 
SPEDAT(SET,MOFOR,MOFFILE,C,NOTSET)
ISG62 = 0

    GROUP 15. Termination of sweeps
LSWEEP=150
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,1.0)
RELAX(U1,FALSDT,TCELL)
RELAX(W1,FALSDT,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=NZ/4+1
    GROUP 23. Print-out & plot control
TSTSWP=-1
IDISPA=1; CSG1=P
LIBREF=380
SELREF=T; RESFAC=1.E-2
NTPRIN=1
 
DISTIL=T
EX(P1)=3.187E-02; EX(W1)=6.623E-02; EX(U1)=6.612E-02
EX(RHO1)=1.000E+00
 ************************************************************

 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+00, 1.000000E-01, 1.000000E+00
> DOM,    MONIT,       2.625000E-01, 0.000000E+00, 1.250000E-02
> DOM,    SCALE,       1.000000E+00, 1.000000E+00, 1.000000E+00
> DOM,    SNAPSIZE,    1.000000E-02
 
> OBJ,    NAME,        LOWZ
> OBJ,    POSITION,    0.000000E+00, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        1.000000E+00, 1.000000E-01, 2.500000E-02
> OBJ,    GEOMETRY,    default
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        CELLTYPE
 
> OBJ,    NAME,        HIGHZ
> OBJ,    POSITION,    0.000000E+00, 0.000000E+00, 9.750000E-01
> OBJ,    SIZE,        1.000000E+00, 1.000000E-01, 2.499998E-02
> OBJ,    GEOMETRY,    default
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        CELLTYPE
 
> OBJ,    NAME,        LOWX
> OBJ,    POSITION,    0.000000E+00, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        2.500000E-02, 1.000000E-01, 1.000000E+00
> 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-01, 1.000000E+00
> 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.500000E-02, 1.000000E-01, 1.000000E+00
> OBJ,    GEOMETRY,    cube14
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        BLOCKAGE
> OBJ,    MATERIAL,    -1
> OBJ,    TIME_LIMITS,   ALWAYS_ACTIVE
lsg57=t
#maxabs
STOP