#cls
text(Unsteady Mixing In Two Paddle-Stirred Reactor
title
libref=770
  
  DISPLAY
  
  This In-Form case set moving In-Form object for simulation
  two paddle-stirred reactor.

  The following In-Form formula describes rotated paddle:

  (INFOB at PATCH1 is BOX(:x0:-:dx1:-:dx2:,:y0:-:dy1:+:dy2:,0,$
  :side1:,:side2:,10,0,0,:ang:) with INFOB_1)
  
  The following In-Form formulae set fixed velocity inside paddle:

  (SOURCE of U1 at PATCH1 is :ANGVL:*(YG-:Y0:) with INFOB_1!FIXV)
  (SOURCE of V1 at PATCH1 is :ANGVL:*(:X0:-XG) with INFOB_1!FIXV)

  The following formulae defines MARK variable.
  MARK is used by PHOTON for marks of borders of a paddle.

  (STORED of MARK is 0.)
  (STORED of MARK at PATCH1 is 1 with INFOB_1)
  ENDDIS  

    GROUP 1. Run title and other preliminaries
TEXT( Unsteady mixing in two paddle-stirred reactor
    ** PI number
REAL(PI);  PI=3.14159
     ** Number of revolutions, 1/s.
REAL(ANGVL); ANGVL=4.*PI/1.
     ** X & Y coordinate of centre of impellor
REAL(X0, Y0); X0=0.5; Y0=0.5
     ** X & Y size of paddle of impellor
REAL(SIDE1, SIDE2); SIDE1=0.1; SIDE2=0.7
     ** X & Y half size of paddle of impellor
REAL(HSID1, HSID2); HSID1=SIDE1/2.; HSID2=SIDE2/2.
 
    GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,16,0.5,1.0)
 
    GROUP 3. X-direction grid specification
GRDPWR(X,40,1.0,1.0)
 
    GROUP 4. Y-direction grid specification
GRDPWR(Y,40,1.0,1.)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,C1);STORE(MARK)
 
    GROUP 9. Properties of the medium (or media)
RHO1=1000.; ENUL=.00001
    GROUP 11. Initialization of variable or porosity fields
INIADD=F
FIINIT(P1)=0.0;FIINIT(U1)=0.0
 
  ** Concentration initialization
PATCH(WC1,INIVAL,1,NX,1,NY/2,1,NZ,1,LSTEP)
INIT(WC1,C1,0.0,0.0)
PATCH(EC1,INIVAL,1,NX,1,NY/2+1,1,NZ,1,LSTEP)
INIT(EC1,C1,0.0,1.0)
 
    GROUP 13. Boundary conditions and special sources
  ** North wall
PATCH(WALLN,NWALL,1,NX,NY,NY,1,NZ,1,LSTEP)
COVAL(WALLN,U1,1.,0.0)
  ** South wall
PATCH(WALLS,SWALL,1,NX,1,1,1,NZ,1,LSTEP)
COVAL(WALLS,U1,1.,0.0)
  ** East wall
PATCH(WALLE,EWALL,NX,NX,1,NY,1,NZ,1,LSTEP)
COVAL(WALLE,V1,1.,0.0)
  ** West wall
PATCH(WALLW,WWALL,1,1,1,NY,1,NZ,1,LSTEP)
COVAL(WALLW,V1,1.,0.0)
  ** Pressure relief
PATCH(FIXPRESS,VOLUME,NX/2,NX/2,NY/2,NY/2,1,1,1,1)
COVAL(FIXPRESS,P1,FIXVAL,0.0)
COVAL(FIXPRESS,U1,ONLYMS,0.0)
COVAL(FIXPRESS,V1,ONLYMS,0.0)
COVAL(FIXPRESS,C1,ONLYMS,SAME)
 
(STORED of MARK is 0.)
 
  ** Impellor geometry
PATCH(PATCH1,CELL,1,NX,1,NY,1,NZ,1,LSTEP)
 
char(ang); ang=:ANGVL:*TIM
char(dx1,dx2,dy1,dy2)
dx1=:hsid2:*SIN(:ang:); dx2=:hsid1:*COS(:ang:)
dy1=:hsid2:*COS(:ang:); dy2=:hsid1:*SIN(:ang:)
 
(INFOB at PATCH1 is BOX(:x0:-:dx1:-:dx2:,:y0:-:dy1:+:dy2:,0,$
:side1:,:side2:,10,0,0,:ang:) with INFOB_1)
 
  ** Impellor cell cartesian components
(SOURCE of U1 at PATCH1 is :ANGVL:*(YG-:Y0:) with INFOB_1!FIXV)
(SOURCE of V1 at PATCH1 is :ANGVL:*(:X0:-XG) with INFOB_1!FIXV)
 
  *** Setting of MARK values into impellor
(STORED of MARK at PATCH1 is 1 with INFOB_1)
 
    GROUP 15. Termination of sweeps
LSWEEP=80
RELAX(P1,LINRLX,0.3)
RELAX(U1,FALSDT,100.0)
RELAX(V1,FALSDT,100.0)
 
    GROUP 22. Spot-value print-out
TSTSWP=-1;IXMON=NX/4; IYMON=NY/4
    GROUP 23. Print-out & plot control
idispa=1;csg1=p;selref=t;resfac=1.e-5
libref=770

DISTIL=T
EX(P1)=1.326E+06; EX(U1)=1.077E+00; EX(V1)=1.157E+00
EX(C1)=5.250E-01; EX(MARK)=7.000E-02

  PHOTON USE
  p
  p1;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.03 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p2;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.06 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p3;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.09 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p4;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.125 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p5;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.156 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p6;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.19 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p7;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.22 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p8;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.25 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p9;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.28 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p10;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.31 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p11;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.34 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p12;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.375 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p13;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.41 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p14;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.44 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p15;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.47 sec.
  msg Velocity vectors and concentration field
  upause 2
  p
  p16;
 
  set prop off
  con C1 z 1 fil;.001
  surf mark z .99
  ve z 1 sh
  msg Time = 0.5 sec.
  msg Velocity vectors and concentration field
  ENDUSE
STOP