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


text(In-Form chemical-reaction source
title
libref=751
  
  DISPLAY
  This In-Form case does without Fortran coding what Z251 does with
  it, namely  it creates a source which is dependent on both the 
  dependent variable (RCTD) and the independent variable (X), which is a 
  requirement for the method of simulation of laminar flame propagation 
  which employs
      x = exp(-const * distance)      as the independent variable.
  [See Adler and Spalding, Proc Roy Soc A vol 261 pp 53-78 1961]
 
  It also illustrates the use of the y dimension as a parametric
  multiplier, thus allowing the multiplying constant of the reaction
  rate to have  NY values in a single run.
 
  This device is often useful when parametric studies have to be
  made; for it also permits PHOTON to be used for display purposes.
 
  ENDDIS  
  PHOTON USE
  p;;;;
 
  con rctd z 1 fi;0.02
  msg contours of reactedness; x=distorted distance; y=multiplier-1
  pause;con rate z 1 fi;0.02
  msg contours of reaction rate; x=distorted dist.; y=multiplier-1
  pause;con diff z 1 fi;0.02
  msg contours of rctd difference>.001
  ENDUSE


  Group 1. Run Title
 TEXT(Steady lam. fl. propagation   :751
 TITLE
 ************************************************************
  Group 2. Transience
 STEADY  =    T
 ************************************************************
GRDPWR(X,100,1.0,1.0);GRDPWR(Y,50,1.0,1.0)
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 
   C1 is the reactedness, c2 the volumetric reaction rate
   NPOR is stored, and set to zero, in order that there shall
   be no influence of one y-value solution on another.
 
 SOLVE(C1,C2);STORE(NPOR)
 
 TERMS(C1,N,N,Y,P,P,P);TERMS(C2,N,N,N,N,N,N)
 ************************************************************
  Group 9. Properties
ENUL=1.0
 ************************************************************
  Group 11.Initialise Var/Porosity Fields
 ************************************************************
FIINIT(C1)=0.5;FIINIT(NPOR)=0.0

  Group 13. Boundary & Special Sources
 ************************************************************
 
PATCH(MINUSINF,WEST,1,1,1,NY,1,1,1,1);COVAL(MINUSINF,C1,FIXVAL,0.0)
 
PATCH(DOWNSTRM,EAST,NX,NX,1,NY,1,1,1,1);COVAL(DOWNSTRM,C1,1.E5,1.0)
 
   In-Form inserts reaction-rate expression..
  rate = rconst * c1**n * (1-c1) / ((n+1)*(n+2))
  with further division by x**2 because x is a distorted scale
  and multiplication by (1+y) for the purpose of parametric study.
 
libref=751

  INFORM13BEGIN
REAL(RCONST,EXPO)
RCONST=0.2;EXPO=6.0
 
RCONST=RCONST*(EXPO+1)*(EXPO+2)
    
NAME(C1)= RCTD ! reactdeness, = 0 upstream and 1 downstream
NAME(C2)= RATE ! reaction rate,  
            
PATCH(IREACRAT,VOLUME,1,NX,1,NY,1,1,1,1)
(SOURCE of RCTD at IREACRAT is RCONST*RCTD^EXPO*XG^(-2)$
*(1.0+2.*YG)*(1-RCTD) with LINE)

  The following enables the volumetric source to be printed and displayed
(SOURCE of RATE at IREACRAT is RCONST*RCTD^EXPO$
*(1.0+2.*YG)*(1-RCTD) with FIXV)
  
  The following enables the gradient of reactedness to be
  computed. The adiabatic-flame speed can be regarded as having 
  been attained at the YG for which diff at the right-hand boundary 
  falls below 0.001 .
(stored var diff is min(.001,rctd-rctd[-1,,])!if(ix.gt.1))
  INFORM13END
 ************************************************************
lsweep=400
 ************************************************************
  Group 19. EARTH Calls To GROUND Station
 ************************************************************
  Group 21. Print-out of Variables
 ************************************************************
  Group 22. Monitor Print-Out
 TSTSWP  =      1;NPLT=1;IXMON=NX/2;IYMON=NY/2
 ************************************************************
  Group 23.Field Print-Out & Plot Control
 PATCH(PROFILE,PROFIL,1,NX,1,1,1,1,1,1)
 COVAL(PROFILE,RCTD,0.0,00)
 ************************************************************
   No PATCHes used for this Group
  Group 24. Dumps For Restarts
 LIBREF=251

tstswp=-1

DISTIL=T
EX(RCTD)=8.315E-01; EX(RATE)=7.250-01; EX(DIFF)=5.258E-05
STORE(NPOR); EX(NPOR)=1.000E-11
 
 STOP