TALK=T;RUN(1,1) 756.htm

  When viewing via a browser. click
  here for
  explanation
 TALK=f;RUN( 1, 1)
#cls
TEXT(Mixing Caused By Rotating Paddle
TITLE 
LIBREF=756  
  DISPLAY
  
  This In-Form case uses the "IMAT" In-Form option for simulation
  a paddle-stirred reactor.
  
  The following statements make the vertical and horizontal
  velocities proportional to the corresponding distances from
  the paddle axis.

  (SOURCE of U1 at ALL is 1.E5*(VEL*(YIC-YG)-U1) with IMAT>=:PAD:!LINE)
  (SOURCE of V1 at ALL is 1.E5*(VEL*(XG-XIC)-V1) with IMAT>=:PAD:!LINE)

  These momentum sources are active only for cells having IMAT
  (the property index, as set by PRPS) values greater or equal
  to PAD, where PAD is given the value 100.0 .

  The next statement sets PRPS to the IMAT value of water
  throughout the domain; but the value is changed below for
  the cells ocupied by the paddle
       
  (STORED of PRPS is 67.)

  The Q1 contains PHOTON USE commands.
  ENDDIS  

    GROUP 1. Run title and other preliminaries
TEXT(Mixing caused by rotating paddle: 756
   INFORM1BEGIN
REAL(PAD); PAD  =100.            ! paddle cells material
REAL(PI);  PI=3.14159            ! Pythagoros's constant
REAL(VEL); VEL=PI/4.             ! Number of revolutions per second
REAL(XIC, YIC); XIC=10.; YIC=10. ! X, Y coordinates of centre
REAL(DENS); DENS=1000.           ! Density
REAL(VISC); VISC=0.01            ! Viscosity
   INFORM1END
 
    GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,8,8.,1.0)
 
    GROUP 3. X-direction grid specification
XULAST=20.;GRDPWR(X,40,XULAST,1.0)
 
    GROUP 4. Y-direction grid specification
YVLAST=20.;GRDPWR(Y,40,YVLAST,1.)
 
    GROUP 7. Variables stored, solved , named
SOLVE(P1,U1,V1,C1);STORE(PRPS)
 
    GROUP 9. Properties of the medium (or media)
  INFORM9BEGIN
RHO1=DENS; ENUL=VISC
(PROPERTY of RHO1 is DENS)
(PROPERTY VISL is VISC)
  ** water
FIINIT(PRPS)=67
  INFORM9END
    GROUP 11. Initialization of variable or porosity fields
INIADD=F
FIINIT(P1)=0.0;FIINIT(U1)=0.0
 
        ** Concentration initialization
  C1 equals 0 in the bottom half, 1 in the top
 
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,CELL,1,1,1,1,1,1,1,LSTEP)
COVAL(FIXPRESS,P1,1.e-5,0.0)
COVAL(FIXPRESS,U1,ONLYMS,0.0)
COVAL(FIXPRESS,V1,ONLYMS,0.0)
COVAL(FIXPRESS,C1,ONLYMS,SAME)
 
  
  ** paddle cell momentum sources for cartesian velocity components
 
      VEL is a constant defined above;
      so are YIC and XIC, the coordinates of the paddle axis.
 
      The following statements make the vertical and horizontal
      velocities proportional to the corresponding distances from
      the paddle axis.
 
      No account is taken of the fact that the "staggered-grid"
      causes velocity cells not to coincide with property-carrying
      cells.
 
      These momentum sources are active only for cells having IMAT
      (the property index, as set by PRPS) values greater or equal
      to PAD .
      
      ALL is the name of the whole-domain patch within which the
      sources are to be (conditionally) provided.
      
  INFORM13BEGIN 
PATCH(ALL,CELL,1,NX,1,NY,1,NZ,1,lSTEP)
(SOURCE of U1 at ALL is 1.E5*(VEL*(YIC-YG)-U1) with IMAT>=:PAD:!LINE)
(SOURCE of V1 at ALL is 1.E5*(VEL*(XG-XIC)-V1) with IMAT>=:PAD:!LINE)
  INFORM13END
  INFORM7BEGIN 
  ** Water
     The next statement sets PRPS to the IMAT value of water
     throughout the domain; but the value is changed below for
     the cells occupied by the paddle
(STORED of PRPS is 67.)
    
  ** paddle geometry
     Cells occupied by paddle material are marked by setting the
     value of PRPS in them to PAD.
 
   * time: 1 sec.
     At the start, the paddle is horizontal. The cells containing
     it can therefore all be covered by a single patch called
     TIME=1. 
     The = sign is here a character like any other; it is NOT an operator.
 
PATCH(TIME=1,CELL,6,35,20,21,1,NZ,1,1) 
(STORED of PRPS at TIME=1 is PAD)
 
   * time: 2 sec.
     At this time, the paddle is at 45 degrees therefore it covers
     22 cells, in each one of which the PRPS value has to be set.
DO II=1,22
PATCH(TIME=2:ii:,CELL,9+II,10+II,9+II,9+II,1,NZ,2,2)
(STORED of PRPS at TIME=2:ii: is PAD)
ENDDO
 
   * time: 3 sec.
   Here the paddle is vertical; therefore a single patch suffices; 
   and so on.
PATCH(TIME=3,CELL,20,21,6,35,1,NZ,3,3)
(STORED of PRPS at TIME=3 is PAD)
 
   * time: 4 sec.
DO II=1,22
PATCH(TIME=4:ii:,CELL,32-II,33-II,9+II,9+II,1,NZ,4,4)
(STORED of PRPS at TIME=4:ii: is PAD)
ENDDO
 
   * time: 5 sec.
PATCH(TIME=5,CELL,6,35,20,21,1,NZ,5,5)
(STORED of PRPS at TIME=5 is PAD)
 
   * time: 6 sec.
DO II=1,22
PATCH(TIME=6:ii:,CELL,9+II,10+II,9+II,9+II,1,NZ,6,6)
(STORED of PRPS at TIME=6:ii: is PAD)
ENDDO
 
   * time: 7 sec.
PATCH(TIME=7,CELL,20,21,6,35,1,NZ,7,7)
(STORED of PRPS at TIME=7 is PAD)
 
   * time: 8 sec.
DO II=1,22
PATCH(TIME=8:ii:,CELL,32-II,33-II,9+II,9+II,1,NZ,8,8)
(STORED of PRPS at TIME=8:ii: is PAD)
ENDDO
  INFORM7END
    GROUP 15. Termination of sweeps
LSWEEP=200
    GROUP 19. Data communicated by satellite to GROUND
SPEDAT(SET,MATERIAL, 100,L,T) 
    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-4;relax(p1,linrlx,0.5)
DISTIL=T
EX(P1)=4.768E+03; EX(U1)=1.666E+00
EX(V1)=1.619E+00; EX(C1)=5.250E-01
STORE(PRPS)
EX(PRPS)=6.791E+01 
  PHOTON USE
  p
  p1;
 
  set prop off
  con C1 z 1 fil;.001
  surf prps z 89.
  ve z 1
  msg Time = 1 sec.
  msg Velocity vectors and concentration field
  msg Hit Enter to continue
  *dump pica1
  pause
  p
  p2;
 
  set prop off
  con C1 z 1 fil;.001
  surf prps z 89.
  ve z 1
  msg Time = 2 sec.
  msg Velocity vectors and concentration field
  msg Hit Enter to continue
  *dump pica2
  pause
  p
  p3;
 
  set prop off
  con C1 z 1 fil;.001
  surf prps z 89.
  ve z 1
  msg Time = 3 sec.
  msg Velocity vectors and concentration field
  msg Hit Enter to continue
  *dump pica3
  pause
  p
  p4;
 
  set prop off
  con C1 z 1 fil;.001
  surf prps z 89.
  ve z 1
  msg Time = 4 sec.
  msg Velocity vectors and concentration field
  msg Hit Enter to continue
  *dump pica4
  pause
  p
  p5;
 
  set prop off
  con C1 z 1 fil;.001
  surf prps z 89.
  ve z 1
  msg Time = 5 sec.
  msg Velocity vectors and concentration field
  msg Hit Enter to continue
  *dump pica5
  pause
  p
  p6;
 
  set prop off
  con C1 z 1 fil;.001
  surf prps z 89.
  ve z 1
  msg Time = 6 sec.
  msg Velocity vectors and concentration field
  msg Hit Enter to continue
  *dump pica6
  pause
  p
  p7;
 
  set prop off
  con C1 z 1 fil;.001
  surf prps z 89.
  ve z 1
  msg Time = 7 sec.
  msg Velocity vectors and concentration field
  msg Hit Enter to continue
  *dump pica7
  pause
  p
  p8;
 
  set prop off
  con C1 z 1 fil;.001
  surf prps z 89.
  ve z 1
  msg Time = 8 sec.
  msg Velocity vectors and concentration field
  msg Hit Enter to finish
  *dump pica8
  ENDUSE
STOP