Encyclopaedia Index
 TALK=F;RUN( 1, 1)

TEXT( Library case Y604: Analytical BFC grids-2D sample-kit.

  >>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    PLANT information :
     * Data input groups used:  6
     * Ground groups planted : 19-2
     * Headings used  : MXYZ??
     * Functions used : None
     * Commands used  : IF
  <<<<<<<<<<<<<<<<<<<<<<<<<  Comment ends <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

    GROUP 2. Transience; time-step specification
STEADY=F
GRDPWR(T,3,3.,1.0)
    GROUP 6. Body-fitted coordinates or grid distortion
NX=150;NY=20;NZ=1
BFC=T

NAMSAT=MOSG

       1.   2D zigzag channel
            -----------------
REAL(PI,LENGTH,WIDTH)
   ** Pi number
PI=3.14159
   ** Channel length
LENGTH=6.*PI
   ** Channel width
WIDTH=2.*ZWLAST

    XC=:LENGTH:/FLOAT(NX)*FLOAT(I-1)
    YC=:PI:/2.-4/:PI:*(COS(XC)+COS(3*XC)/9+$
                                      COS(5*XC)/25+$
                         COS(7*XC)/49+COS(9*XC)/81+$
                    COS(11*XC)/121+COS(13*XC)/169)+$
                    :WIDTH:*FLOAT(J-1)/FLOAT(NY)
    ZC=ZWLAST*FLOAT(K-1)/FLOAT(NZ)
  IF(ISTEP.EQ.1.AND.ISWEEP.EQ.1)
  >>>>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    The above three statements contain rather lengthy algebraic
    formulae. All together they provide the calculation of cartesian
    coordinates for cell corners of the grid fitted the zig-zag channel
    of 2m width and 6pi length, as can be seen by PHOTON. The grid is
    uniform in both direction. The generation is made at the first sweep
    of the first time step.
  <<<<<<<<<<<<<<<<<<<<<<<<<  Comment ends <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

       2. 2D periodically broken channel
          -------------------------------
REAL(AA,ALFA,TWOPI)
TWOPI=2.*PI
  ** Shape factors
AA=0.75;ALFA=TWOPI/12

  XC=:LENGTH:/FLOAT(NX)*FLOAT(I-1)
  YC=8/:TWOPI:*:AA:/:ALFA:*(SIN(0.75)*SIN(XC)+$
                    SIN(3*2.*3.14159/12)* SIN(3*XC)/9+$
                    SIN(5*2.*3.14159/12)*SIN(5*XC)/25+$
                    SIN(7*2.*3.14159/12)*SIN(7*XC)/49+$
                    SIN(9*2.*3.14159/12)*SIN(9*XC)/81+$
                 SIN(11*2.*3.14159/12)*SIN(11*XC)/121+$
                 SIN(13*2.*3.14159/12)*SIN(13*XC)/169+$
                 SIN(15*2.*3.14159/12)*SIN(15*XC)/225+$
                 SIN(17*2.*3.14159/12)*SIN(17*XC)/289+$
                SIN(19*2.*3.14159/12)*SIN(19*XC)/361)+$
                2.*ZWLAST*FLOAT(J-1)/FLOAT(NY)
    ZC=ZWLAST*FLOAT(K-1)/FLOAT(NZ)
  IF(ISTEP.EQ.2.AND.ISWEEP.EQ.1)
  >>>>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    The above three statements perform the corresponding functions for
    the generation of the uniform grid fitted the periodically broken
    channel. It is made at  the first sweep of the second time step.
  <<<<<<<<<<<<<<<<<<<<<<<<<  Comment ends <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

       3. 2D corrugated channel
       ------------------------

    XC=:LENGTH:/FLOAT(NX)*FLOAT(I-1)
    YC=FLOAT(J-1)/FLOAT(NY)*(1/3.14159+$
                         0.5*SIN(XC-3.14159/2)-$
            2/3.14159*(COS(2*(XC-3.14159/2))/3+$
                      COS(4*(XC-3.14159/2))/15+$
                      COS(6*(XC-3.14159/2))/35+$
                      COS(8*(XC-3.14159/2))/63+$
                     COS(10*(XC-3.14159/2))/99+$
                  COS(12*(XC-3.14159/2))/143))+$
                  2.*ZWLAST*FLOAT(J-1)/FLOAT(NY)
    ZC=ZWLAST*FLOAT(K-1)/FLOAT(NZ)
  IF(ISTEP.EQ.3.AND.ISWEEP.EQ.1)
  >>>>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    At the first sweep of the third time step the generation of the last
    grid of the series is made governed by above formulae.
  <<<<<<<<<<<<<<<<<<<<<<<<<  Comment ends <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

LSWEEP=1;CSG1=PHI;CSG2=XYZ;IDISPA=1
STORE(MARK)
    PHOTON USE
    x;x1;;
    msg(  2D zigzag channel
    gr z 1
    pause
    x;x2;;
    msg(  2D periodically brocken channel
    gr z 1
    pause
    x;x3;;
    msg(  2D corrugated channel
    gr z 1
    ENDUSE
STOP