TEXT(Longwell Bomb; X-Y Model          
TITLE
mesg(PC486/50 time last reported as appx. 45.sec
  DISPLAY
 
  SIMULATION OF THE LONGWELL BOMB
 
  2-dimensional (x-y), polar, steady, elliptic simulation
 
 
  This case simulates the experiment of Longwell, Frost and Weiss
  used to produce the 'ranking' of fuels for gas turbines. The
  apparatus is a refractory sphere, into the centre of which fuel
  and air are injected through many small holes. The exhaust
  products escape through fewer, larger holes in the shell. The
  gases, which are highly turbulent as a consequence of the high
  injection velocities, burne within the sphere.
 
  The apparatus approximates a fully-stirred, adiabatic, steady-flow
  reactor.
 
 
 
  enddis
 
  PHOTON USE
  p
  phi
 
 
 
  msg  Contours of reactedness. Press RETURN to see the grid.
  con rctd z 1 fi;0.01
  pause
  gr z 1
  msg Press RETURN to see the velocity vectors
  pause
  con off;gr off;red;gr ou z 1
  msg  Velocity vectors
  vec z 1 sh
  msg Press e to END
  enduse
 
       GROUP 1. Run title and other preliminaries
    GXCHSO is employed for this calculation (see group 13
    of GREX3).
                          x----->
real(u1in,rho1in,rctdin)
BOOLEAN(propag,sponig,stirred,longwell)
propag=f;sponig=f;stirred=f;longwell=f
 longwell=t
longwell
u1in=1.0;rho1in=1.0;rctdin=0.0
 u1in=u1in*100.0
 cartes=f
    GROUP 2. Transience; time-step specification
    GROUP 3. X-direction grid specification
GRDPWR(X,20,1.0,1.0)
    GROUP 4. Y-direction grid specification
grdpwr(y,10,1.0,1.0)
    GROUP 5. Z-direction grid specification
    GROUP 6. Body-fitted coordinates or grid distortion
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,H1)
 solve(v1)
 store(vpor,epor,npor)
NAME(H1)=RCTD
store(enul,tmp1,rho1)
    GROUP 8. Terms (in differential equations) & devices
  ** Cut out built-in enthalpy source (viscous dissipation)
TERMS(RCTD,N,Y,Y,Y,Y,Y)
    GROUP 9. Properties of the medium (or media)
TMP1=LINH;CP1=1.0
rho1=RECSCAL;rho1a=1.0/rho1in;rho1b=5.0
 enut=0.01*xulast*u1in
    GROUP 10. Inter-phase-transfer processes and properties
    GROUP 11. Initialization of variable or porosity fields
fiinit(u1)=u1in;fiinit(v1)=0.0;fiinit(rctd)=rctdin
fiinit(rctd)=0.9
    GROUP 12. Patchwise adjustment of terms in PDEs
    GROUP 13. Boundary conditions and special sources
   ** RCTD is held to unity at IX=NX
integer(nyout)
nyout=ny
   ** Inflow value of RCTD is specified at IX=1
integer(nyin)
nyin=ny
 mesg(Inlet velocity = :u1in: OK? (y/n)
 mesg(Remember: too high a velocity will blow the flame out !
 ans=y
 readvdu(ans,char,y)
 if(:ans:.eq.n) then
+ mesg( what value do you want ?
+ readvdu(u1in,real,u1in)
+ mesg(Inlet velocity has been set to :u1in:
 endif
 rinner=0.1*yvlast
 patch(iyeq1,south,1,nx/5,1,1,1,1,1,1)
 coval(iyeq1,p1,fixflu,u1in*rho1in)
 coval(iyeq1,u1,0.0,0.0)
 coval(iyeq1,v1,onlyms,u1in)
 patch(iyeqny,north,nx-nx/5,nx,ny,ny,1,1,1,1)
 coval(iyeqny,p1,fixp,0.0)
 coval(iyeqny,rctd,onlyms,same)
   ** A non-linear source of RCTD is present; for this
      purpose, the subroutine GXCHSO is called from GREX3,
      group13 by setting COefficient to POLYNOM (GRND7) in the COVAL
      command; the subroutine is entered only when the patch
      name begins with the character CHSO.
      CO=GRND7 selects the following option:
           COefficient=CHSOA*RCTD**CHSOB
      VAL=1.0 enforces that the source falls to zero when
      RCTD equals unity.
PATCH(CHSOTERM,PHASEM,1,NX,1,ny,1,1,1,LSTEP)
COVAL(CHSOTERM,RCTD,POLYNOM,1.0)
CHSOA=5.0e3;CHSOB=6.0
     The source is therefore CHSOA*(1.0-RCTD)*RCTD**CHSOB
    GROUP 15. Termination of sweeps
LSWEEP=50
    GROUP 16. Termination of iterations
    GROUP 17. Under-relaxation devices
 relax(u1,falsdt,0.01*xulast/u1in);relax(v1,falsdt,0.02*xulast/u1in)
 relax(rctd,linrlx,0.5)
    GROUP 18. Limits on variables or increments to them
    GROUP 19. Data communicated by satellite to GROUND
    GROUP 20. Preliminary print-out
    GROUP 21. Print-out of variables
    GROUP 22. Spot-value print-out
ixmon=nx/2;iymon=ny/2;itabl=1
    GROUP 23. Field print-out and plot control
NXPRIN=NX/5;NTPRIN=LSTEP/4;NPLT=1
   ** Plot profiles over the length of the domain
PATCH(XWISE,PROFIL,nx/2,NX,1,1,1,1,1,LSTEP)
PLOT(XWISE,RCTD,0.0,0.0)
 patch(map,contur,1,nx,1,ny,1,1,1,lstep)
 plot(map,rctd,0.0,10.0)
xulast
enul
chsoa
real(reactno,peclet)
reactno=chsoa*xulast/(rho1in/u1in)
tstswp=-1
 real(rt1)
 do ii=1,100
+  rt1=25*25.1234*25.1235*25.1234*25.1234*25.1234
enddo
selref=t; resfac=1.e-2
 fiinit(rctd)=0.95
 relax(p1,linrlx,0.5)
 ixmon=nx-1;iymon=ny-1