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

TEXT( Library case Y605: Analytical BFC grids-3D 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,4,4.,1.0)

    GROUP 6. Body-fitted coordinates or grid distortion
NX=25;NY=16;NZ=60
BFC=T

NAMSAT=MOSG

       1.   3D corrugated circular pipe
            ---------------------------

REAL(LENGTH,TWOPI,LITTLER)
LENGTH=10.0
LITTLER=1.0;TWOPI=2.0*3.14157
    XC=ABS(COS(:LENGTH:*FLOAT(K-1)/FLOAT(NZ)))+$
                        :LITTLER:*FLOAT(J-1)/FLOAT(NY)*$
                       COS(:TWOPI:*FLOAT(I-1)/FLOAT(NX))
    YC=ABS(COS(:LENGTH:*FLOAT(K-1)/FLOAT(NZ)))+$
                        :LITTLER:*FLOAT(J-1)/FLOAT(NY)*$
                       SIN(:TWOPI:*FLOAT(I-1)/FLOAT(NX))
    ZC=:LENGTH:*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 corrugated
    circular pipe of 1m diameter and 10m 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. 3D helically coiled pipe
          -------------------------
REAL(LITLER)
LITLER=0.25

    XC=:LITLER:*FLOAT(J-1)/FLOAT(NY)*$
           COS(:TWOPI:*FLOAT(I-1)/FLOAT(NX))+$
        COS(4.75*6.28314*FLOAT(K-1)/FLOAT(NZ))
    YC=:LITLER:*FLOAT(J-1)/FLOAT(NY)*$
           SIN(:TWOPI:*FLOAT(I-1)/FLOAT(NX))+$
         SIN(4.75*6.2831*FLOAT(K-1)/FLOAT(NZ))
    ZC= 5.5*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 helically coiled pipe
    of 0.25 m diameter. It is made at the first sweep of the second time
    step.
  <<<<<<<<<<<<<<<<<<<<<<<<<  Comment ends <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

       3. 3D snail-like chamber
          ---------------------

REAL(LITR)
LITR=1.0
RG(1)=TWOPI

    XC=:LITR:*FLOAT(J-1)/FLOAT(NY)*$
           (COS(RG(1)*FLOAT(I-1)/FLOAT(NX))+$
                 RG(1)*FLOAT(I-1)/FLOAT(NX)*$
             SIN(RG(1)*FLOAT(I-1)/FLOAT(NX)))
    YC=:LITR:*FLOAT(J-1)/FLOAT(NY)*$
           (SIN(RG(1)*FLOAT(I-1)/FLOAT(NX))-$
                 RG(1)*FLOAT(I-1)/FLOAT(NX)*$
             COS(RG(1)*FLOAT(I-1)/FLOAT(NX)))
    ZC=10.*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
    snail-like chamber is made governed by above formulae.
  <<<<<<<<<<<<<<<<<<<<<<<<<  Comment ends <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

        4. 3D eagloo hat
           -------------

    XC=:LITR:*FLOAT(J-1)/FLOAT(NY)*$
            COS(:TWOPI:*FLOAT(I-1)/FLOAT(NX))
    YC=:LITR:*FLOAT(J-1)/FLOAT(NY)*$
            SIN(:TWOPI:*FLOAT(I-1)/FLOAT(NX))
    ZC=:LITR:*FLOAT(K-1)/FLOAT(NZ)*$
                           0.5*(SIN(:TWOPI:*$
                     FLOAT(J-1)/FLOAT(NY))+1)
  IF(ISTEP.EQ.4.AND.ISWEEP.EQ.1)
  >>>>>>>>>>>>>>>>>>>>>>>> Comment begins >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    At the first sweep of the fourth time step the generation of the last
    grid of the series is made governed by above formulae.
  <<<<<<<<<<<<<<<<<<<<<<<<<  Comment ends <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

CSG1=PHI;CSG2=XYZ;LSWEEP=1;IDISPA=1
STORE(MARK)
    PHOTON USE
    x;x1;;
    rot z ang 90;gr y m;gr z 1;gr z m
    msg( 3D corrugated circular pipe
    pause
    x;x2;;
    up x;gr y m;gr ou z 1;gr ou z m
    msg( 3D helically coiled pipe
    pause
    x;x3;;
    msg( 3D snail-like chamber
    gr z 1;gr z m;gr y m;pause
    x;x4;;
    up z;gr z m;gr ou z 1;gr y m
    msg( 3D eagloo hat
    ENDUSE
STOP