MICA SOFTWARE DELIVERY NOTES FOR COFFUS

Document Version No: 1.2

Date: December 1997

Author: M R Malin

 

CONTENTS:

1. OVERVIEW OF COFFUS-VR

1.1 Model description

1.2 Library cases

1.3 Features accessible by VR

1.4 Features accessible by PIL

1.5 Pictures

2. HOW TO USE COFFUS-VR

2.1 How to load a VR library example


2.2 How to modify and run a VR library example

2.3 Dialogue box description

  1. main menu
  2. objects

2.4 The use of PIL fragments

 


1. OVERVIEW OF COFFUS-VR

1.1 Model description

A 2-phase combustion model has been utilised for COFFUS-VR. This model uses a 2-phase Eulerian-Eulerian description of the gas and solid phases which is based on the IPSA solution procedure.

The mono-sized particles are assumed to be made up of ash, water, raw coal and char.

The model accounts for slip, coal drying, devolatilisation, char combustion and pollutant formation due to fuel and thermal NO.

Thermal radiation is accounted for via the 6-flux radiation model.

Further details of the model can be found in MICA Deliverables D1.1 and D1.2.

1.2 Library cases

The COFFUS-VR library contains the cases COFFUS2.Q1 and 1D.Q1, which can be found in directory:
‘PHOENICS/D_SATELL/D_VRLIBS/MICA/COFFUS’.

These cases were defined by UZ-LITEC; the first case is a simulation of a 350MW wall-fired power-station furnace, and the second case provides a simple one-dimensional test of the modelling.

Further examples are required, which might be supplied by LITEC, and there is also the IFRF example supplied by ESA.

1.3 Features accessible by VR

The following features are accessible by COFFUS-VR:

  1. furnace geometry;
  2. burner-inlet sources for non-inclined primary and secondary injection with constant swirl velocity;
  3. rectangular-inlet sources for non-inclined premixed coal and gas streams;
  4. turbulence simulation via k-e model or fixed eddy viscosity;
  5. thermal radiation via the 6-flux model;
  6. fuel and thermal NOx computation; and
  7. coal characterisation via proximate and ultimate analysis.

1.4. Features accessible by PIL

The following features are activated using PIL coding:

  1. relaxation and solution control;
  2. auxiliary-variable storage.

2. HOW TO USE COFFUS-VR


2.1 How to load a VR library example

  1. Type 'PC' to load the PHOENICS Commander (or select the appropriate icon).
  2. Select 'FILE'.
  3. Select 'Open CHAM Library Case'.
  4. Select ‘MICA Libraries’.
  5. Select 'COFFUS'.
  6. Select the required library case, which will now be called Q1 in the local directory.

The PHOENICS-VR User Guide (Draft Edition) should be consulted for general information about running the VR Editor and the VR Viewer.

2.2 How to modify and run a VR library example

A library case can be modified by loading it into the VR Editor, as described above, and modifying the settings by means of the dialogue boxes. Alternatively, modifications can be made using PIL (PHOENICS Input Language) coding. The two options are described below.


2.3 Dialogue box description

The following points are intended to highlight aspects of the VR Editor that might be relevant to a user setting up a furnace simulation.

 

2.3.1 Main Menu dialogue box

Two panels are provided, one for 'Modelling Options' and one for 'Solution Options'. The former is application specific, and it is described below:

Modelling Options

The options available are shown below in Figures 1 to 3.

The panel Coal Characterisation permits one to set:

  1. the coal lower-heating value in MJ/kg;
  2. the Sauter mean diameter in m m;
  3. the coal proximate analysis, as fired;
  4. the coal ultimate analysis, on a dry basis; and
  5. the coal type (this has no effect at present)

The entry coal proximate analysis requires the user to define the % mass composition of the

water, ash, and the raw coal. In addition, the user must specify the mass composition of either the volatiles, or the char. A positive number signifies the mass composition of char, but if a negative number is specified, then the absolute value of this is taken as the mass composition of volatiles.

The settings for mass fractions of water Yw, ash Yash, and raw coal Yrc must satisfy the relation:

Yw + Yash + Yrc = 1

The entry coal ultimate analysis requires the user to define the % composition of hydrogen, carbon, oxygen and nitrogen. As indicated in Figure 3, COFFUS derives the mass composition of sulphur from:

Ys = 1 - Yh - Yc - Yo - Yn - Yash

where Ys, Yh, Yc, Yo, Yn and Yash are, respectively, the mass fractions of sulphur, hydrogen, carbon, oxygen, nitrogen and ash.

The coal type requires the user to select from lignite, bituminous, anthracite, subbituminous and semianthracite. However, these options have no effect in the current release, although the framework for doing so has been provided in the PIL fragment COFFUS2, which is located in the directory ‘PHOENICS/D_SATELL/D_MEN/MICA/COFFUS.

  • Figure 1: Modelling Options

    Figure 2: Modelling Options: Coal Proximate Analysis

    Figure 3: Modelling Options: Coal Ultimate Analysis

     

    The entry Ref Temperature should always be set to 273.

    The entry Ref Pressure defines the furnace operating pressure in Pa.

    The entry Turbulence Model allows the user to select either the standard k-e model or a fixed eddy-viscosity model, which requires the user to define the kinematic turbulent viscosity in m2/s. The selection scroll also indicates options for the LVEL algebraic viscosity model and the RNG and Chen-Kim variants of the k-e model. However, these options cannot be activated in the current release.

    The button Combustion allows the user to switch between from inert flow to reacting flow, and vice versa.

    The entry Radiation allows the user to select one of the following:

    1. No radiation
    2. 6-flux radiation
    3. P-1 model (not available yet)
    4. IMMERSOL (not available yet)

    The entry NOX allows the user to activate calculation of the thermal and fuel nitrogen oxides select by selecting NOX model. This post-processing calculation can be deactivated by selecting No NOX model.

    The entry No Slip allows the user to switch from the NO to YES, which then sets high CFIPS to lock phase velocities. Eventually EQUVEL=T will be used for no slip.

    The entry Particle Size Change provides a switch to activate or deactivate the calculation of the size change of a coal particle. The size-change calculation has been implemented in this release, but has yet to be tested in COFFUS.

    2.3.2 Object dialogue boxes

    (a) PLATE objects

    These are 2d objects which are used to construct both internal and boundary walls of zero thickness. It is possible to construct a wall with burners or inlets in it, by creating the complete wall and then superimposing the ‘burners and/or inlets’ later. This is quicker than splitting the wall into several solid regions so as to define the hole; it also means that the hole can be of any shape for which clip-art exists, e.g. cylindrical.

  • Figure 4: Plate Object Dialogue Box

     

  • COFFUS has been extended so that the PLATE object automatically produces the required radiative and convective boundary conditions for a fixed-temperature bounding wall. The user must specify the temperature in oC and the wall emissivity, as indicated in Figure 4. At present, the only other acceptable boundary condition in COFFUS for PLATE objects is zero heat flux, i.e. adiabatic.

     

    (b) BLOCKAGE objects

    Walls of a finite thickness or wedges, which are 3d objects, should be constructed by use of the BLOCKAGE object.

    Similar to the PLATE object, it is possible to specify a solid blockage with a hole in it by creating the whole wall and then ‘superimposing the hole’ later. This is quicker than splitting the wall into several solid regions so as to define the hole; it also means that the hole can be of any shape for which clip-art exists, e.g. cylindrical. However, note that when viewing the geometry the blockage will appear entirely solid.

    (c) BURNER objects

    BURNER-type objects are 2d and are comprised of 2 co-axial cylinders. The ‘shapes/cylpipe’ clip-art type should be selected for this type of object. As shown in Figures 5 and 6, the ‘attributes’ panel provides access to a dialogue box from which the user can define:

  • Figure 5: Burner Object Dialogue Box: Primary Inlet

     

     

    Figure 6: Burner Object Dialogue Box: Secondary Inlet

  • The user can bring up the dialogue box for the "Primary Inlet Properties" by clicking on the "Inner Inlet Properties" panel, and that for the "Secondary Inlet Properties" by clicking on the "Outer Inlet Properties" panel.

    As shown in Figure 5, the ‘Primary Inlet Properties’ are:

    1. the gas and coal mass flow rates in kg/s;
    2. the gas composition by way of the species mass fractions of O2, N2, CO2, H2O and NO; the Swirl number, as defined by the ratio of a constant tangential velocity to the axial injection velocity;
    3. the swirl direction, which toggles between clockwise and anti-clockwise;
    4. the gas and coal inlet temperatures in oC; and
    5. the inlet turbulent intensity in %.

    As shown in Figure 6, the ‘Secondary Inlet Properties’ are:

    1. the gas mass flow rate in kg/s;
    2. the gas composition by way of the species mass fractions of O2, N2, CO2, H2O and NO;
    3. the Swirl number, as defined by the ratio of a constant tangential velocity to the axial injection velocity;
    4. the swirl direction, which toggles between clockwise and anti-clockwise;
    5. the gas inlet temperature in oC;
    6. and the inlet turbulent intensity.

    The swirl velocity, as deduced from the Swirl number and direction, is +ve for clockwise swirl into the solution domain when using a right-handed coordinate system.

    Note that VR currently sets the inlet turbulence intensity to 5%, independent of the value specified in the dialogue box.

    (d) OUTLET objects

    OUTLETs are 2d objects. COFFUS-VR currently assumes that both phases exit through an outflow boundary. The dialogue box permits user specification of the pressure coefficient for the gas phase, and the external pressure value (relative to the furnace operating pressure) which is used by both phases.
    The pressure coefficient is usually set to unity, and COFFUS-VR arranges that the solid-phase pressure coefficient is scaled with the solid-phase density and also that in the event of inflow, the incoming phasic enthalpies are equal to those in the cell. For single-phase and non-reacting flow, the default CORE-VR practice is retained, which requires user specification of the external temperature in oC.

    (e) NULL objects

    In this version, the computational grid is based on the number of cells in each direction, specified by the user, and the objects defined.

    There is no provision for a fine-grid region to be specified. If the automatically-calculated grid does not provide enough resolution in some areas, it may be possible to remedy the defect by creating small null objects; these have no effect on the problem specification, but introduce additional regions into which (at least) one cell will be placed.

    (f) INLET objects

    INLETs are 2d objects which can be used for rectangular or square inlets of gas and/or coal. At present, this facility is restricted to specifying an orthogonal injection in terms of the mass flow rate, and as such it does not allow the possibility of an inclined injection stream of coal and gas.

    As shown in Figure 7, the user must define the following inlet properties:

    1. the gas and coal mass flow rates in kg/s;
    2. the gas composition by way of the species mass fractions of O2, N2, CO2, H2O and NO; the Swirl number, as defined by the ratio of a constant tangential velocity to the axial injection velocity;
    3. the gas and coal inlet temperatures in oC; and
    4. the inlet turbulent intensity in %.

    Figure 7: Inlet Object Dialogue Box


    2.4 The use of PIL fragments

    It is possible for the user to introduce additional functionality by using PIL coding (with which PHOENICS users have long been familiar). Examples of this approach are provided for most of the MICA application sectors; these can act as a guide for other users.

    PIL fragment location

    There are three different types of PIL fragment:

    (a) application-specific (COFFUS for the coal furnace)

    (b) object-specific for a particular application

    (c) case-specific.

    The first type is used for ‘global’ settings related to an application: these are settings that can be expected to be required in all such cases (although they can be changed if necessary, by means of case-specific PIL code). The second type is used for settings that are expected to be required whenever a particular type of object (e.g. INLET) is used for a particular application. The third type is used for settings (global or object-related) that are specific to the current case.

    COFFUS-VR uses PIL fragments only of the first and third types. The first type is in the file COFFUS2, which is located in the directory ‘PHOENICS/D_SATELL/D_MEN/MICA/ COFFUS’. Case specific PIL coding is located at the end of the Q1 file for the case in question; examples can be found in the COFFUS library Q1 files, located in directory ‘PHOENICS/D_SATELL/D_VRLIBS/MICA/COFFUS’.

    PIL coding of both types will be included automatically on exit from the VR Editor; the settings will be included in the Q1 and EARDAT files that are created at that time. If MONITR=T is inserted at the end of the Q1 file, then for inspection-purposes only, COFFUS-VR will write a file Q1EAR on leaving the VR Editor; this will contain the input settings in conventional PIL format.

    Note that changes to PIL fragments of the first and second type will only influence simulations run locally; for remote runs, the standard PIL fragments on the remote machine will be accessed. Thus, changes for remote runs should always be made at the end of the Q1 file.

    PIL fragment descriptions

    
    

    The PIL coding in COFFUS2, which defines the DOMAIN settings for COFFUS, is as follows:

    ** PIL settings for DOMAIN of COFFUS

    BOOLEAN(BURN,INERT,NOXCAL,RADCAL,SIZECH)

    ** {= 2 Inert} {=1 Combustion}

    IF(ATTRIB(31).EQ.2) THEN

    + BURN=F

    ELSE

    + BURN=T

    ENDIF

    SPEDAT(SET,COFFUS,BURN,L,BURN)

    ** {= 2 6-flux } {=1 no radiation}

    IF(ATTRIB(17).EQ.2) THEN

    + RADCAL=T

    ELSE

    + RADCAL=F

    ENDIF

    SPEDAT(SET,COFFUS,RADCAL,L,RADCAL)

    ** {= 1 particle size change} {=2 no size change}

    IF(ATTRIB(19).EQ.1) THEN

    + SIZECH=T

    ELSE

    + SIZECH=F

    ENDIF

    ** Coal characterisation

    INTEGER(JCOAL)

    JCOAL=ATTRIB(12)

    IF(JCOAL.EQ.1) THEN

    ** Lignite

    ENDIF

    IF(JCOAL.EQ.2) THEN

    ** Bituminous

    ENDIF

    IF(JCOAL.EQ.3) THEN

    ** Anthracite

    ENDIF

    IF(JCOAL.EQ.4) THEN

    ** Subbituminous

    ENDIF

    IF(JCOAL.EQ.5) THEN

    ** Semianthracite

    ENDIF

    ** Coal proximate analysis (mass fractions, as fired)

    YWATM = water YASHM = ash n.b. YRAWC=1.0-YWATM-YASHM

    YCHAM = char if YCHAM > 0 , volatiles if YCHAM < 0

    REAL(YWATM,YASHM,YCHAM,YRAWC)

    YWATM = 1.E-2*ATTRIB(23);YASHM = 1.E-2*ATTRIB(24)

    YCHAM = 1.E-2*ATTRIB(25);YRAWC = 1.E-2*ATTRIB(26)

    SPEDAT(SET,COFFUS,YWATM,R,YWATM);SPEDAT(SET,COFFUS,YASHM,R,YASHM)

    SPEDAT(SET,COFFUS,YCHAM,R,YCHAM);SPEDAT(SET,COFFUS,INCOAL,R,YRAWC)

    ** Dry coal ultimate analysis (mass fractions) -----

    YCDRY = carbon YODRY = oxygen YSDRY = sulphur

    YHDRY = hydrogen YNDRY = nitrogen

    REAL(YHDRY,YCDRY,YODRY,YNDRY,YSDRY)

    YHDRY = 1.E-2*ATTRIB(27);YCDRY = 1.E-2*ATTRIB(28)

    YODRY = 1.E-2*ATTRIB(29);YNDRY = 1.E-2*ATTRIB(30)

    YSDRY = 1.-YASHM-YHDRY-YCDRY-YODRY-YNDRY

    ** YSDRY=0.0132

    SPEDAT(SET,COFFUS,YCDRY,R,YCDRY);SPEDAT(SET,COFFUS,YODRY,R,YODRY)

    SPEDAT(SET,COFFUS,YSDRY,R,YSDRY);SPEDAT(SET,COFFUS,YHDRY,R,YHDRY)

    SPEDAT(SET,COFFUS,YNDRY,R,YNDRY)

    Group 7. Variables: STOREd,SOLVEd,NAMEd

    ---------------------------------------

    ** the following STORE,SOLUTN coding is inactive, as currently coded in s5_cof.for

    + STORE(TMP1)

    IF(.NOT.ONEPHS) THEN

    + SOLUTN(U2,Y,Y,N,N,N,Y);SOLUTN(V2,Y,Y,N,N,N,Y)

    + SOLUTN(W2,Y,Y,N,N,N,Y)

    + SOLUTN(R1,Y,Y,N,N,N,Y);SOLUTN(R2,Y,Y,N,N,N,Y)

    + SOLUTN(H2,Y,Y,N,N,N,Y);SOLUTN(H1,P,P,N,P,P,P)

    + STORE(TMP2)

    * Gas-phase mass-fractions

    + SOLVE(YCHX,YCO2,YCO,YH2O,YO2);STORE(YN2)

    * Particle-phase mass-fractions

    + SOLVE(COL2,CHA2,WAT2);STORE(ASH2)

    ENDIF

    Particle Size Change

    -------------------------

    REAL(SMDIAM);SMDIAM=ATTRIB(21)*1.E-6

    IF(SIZECH) THEN

    + SOLVE(PHIS);STORE(SIZE);FIINIT(PHIS)=1.0

    + TERMS(PHIS,P,P,P,P,N,P);FIINIT(SIZE)=SMDIAM

    ENDIF

    Thermal Radiation

    -----------------------

    REAL(ABSORB,SCAT);INTEGER(IHRADL)

    IF(RADCAL) THEN

    + SPEDAT(SET,COFFUS,RADCAL,L,RADCAL)

    + ABSORB=RADIA;SCAT=RADIB

    + RADIAT(FLUX,ABSORB,SCAT,H1)

    + SOLUTN(H1,P,P,N,P,P,P)

    + PATCH(RADISO,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    ** if IHRADL > 0 then set CP1 in MJ/kg for use in GXRADI

    + IHRADL=1

    + SPEDAT(SET,RADI,IHRADL,I,IHRADL)

    ** relaxation

    + REAL(DTRAD);DTRAD=0.1

    + RELAX(RADX,FALSDT,DTRAD);RELAX(RADY,FALSDT,DTRAD)

    + RELAX(RADZ,FALSDT,DTRAD)

    ** reset RADZ to slabwise to aid convergence (JRH/230797)

    + SOLUTN(RADZ,P,P,N,P,P,P)

    ENDIF

    Group 8. Terms & Devices

    ---------------------------------

    TERMS(H1,N,P,P,P,P,P)

    TERMS(H2,N,P,P,P,P,P)

    * Gas-phase mass-fractions (assign variables to phases)

    TERMS(YO2,P,P,P,P,Y,P);TERMS(YCHX,P,P,P,P,Y,N)

    TERMS(YCO,P,P,P,P,Y,P);TERMS(YCO2,P,P,P,P,Y,P)

    TERMS(YH2O,P,P,P,P,Y,P)

    * Particle-phase mass-fractions (assign variables to phases)

    TERMS(COL2,P,P,P,P,N,P);TERMS(CHA2,P,P,P,P,N,P)

    TERMS(WAT2,P,P,P,P,N,P)

    CSG3=CNGR

    Group 9. Properties

    ------------------------

    REAL(RG56,RG57)

    TMP1=GRND2;TMP1A=-TEMP0;TMP1B=1./CP1;ENUL=1.8E-5

    RHO2=2590.

    TMP1=GRND2;TMP1A=-TEMP0;TMP1B=1./CP1

    TMP2=GRND2;CP2=1.8E3;TMP2A=-TEMP0;TMP2B=1./CP2

    PRNDTL(H2)=1.E10

    RHO1=GRND;TMP1=GRND;RG56=GRND;RG57=2.0

    SPEDAT(SET,COFFUS,RG56,R,RG56);SPEDAT(SET,COFFUS,RG57,R,RG57)

    TMP1B=1000.;TMP2=GRND2;CP2=1.8/1.E3;TMP2B=1./CP2

    TMP1A=0.0;TMP2A=0.0;TEMP0=0.0

    * Enthalpies solved in MJ/kg

    HUNIT=1.E-6;CP1=CP1*HUNIT

    PRNDTL(WAT2)=1.E10;PRNDTL(COL2)=1.E10;PRNDTL(CHA2)=1.E10

    Group 10.Inter-Phase Transfer Processes

    -------------------------------------------------

    INTEGER(ISLIP);ISLIP=ATTRIB(18)

    STORE(CFIP);SPEDAT(SET,COFFUS,SMDIAM,R,SMDIAM)

    IF(ISLIP.EQ.1) THEN

    * No slip; ISLIP=1 (for now high CFIPS, eventually use EQUVEL=T)

    + CFIPS=1.E6

    ELSE

    * Slip (islip=2)

    + RLOLIM=1.E-5;CFIPS=GRND;;STORE(SLIP,REYN)

    + CINT(YCHX)=0.0;CINT(YO2)=0.0;CINT(YH2O)=0.0;CINT(YCO)=0.0

    + CINT(YCO2)=0.0;CINT(WAT2)=0.0;CINT(CHA2)=0.0;CINT(COL2)=0.0

    * Gas-particles heat transfer

    + CINT(H1)=0.0;CINT(H2) =0.0

    + PATCH(LHEATRA,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(LHEATRA,H1,GRND3,GRND3)

    + COVAL(LHEATRA,H2,GRND3,GRND3)

    * storage for relaxation of heat source

    + STORE(QDOT);FIINIT(QDOT)=0.0

    * special relaxation factors for heat source

    + RELAX(QDOT,LINRLX,1.0)

    + RESREF(QDOT)=0.3;ENDIT(QDOT)=0.3;PRT(QDOT)=1.0;PRNDTL(QDOT)=1.0

    + REAL(THCON);THCON=0.0458;SPEDAT(SET,COFFUS,GASCON,R,THCON)

    ENDIF

    Group 11.Initialise Var/Porosity Fields

    -----------------------------------------------

    REAL(HCALC,TREFE,TINI,TCALC)

    FIINIT(R2)=1.E-5;FIINIT(R1)=1.0-FIINIT(R2)

    FIINIT(YCHX)=0.;FIINIT(YCO)=0.

    IF(BURN) THEN

    + FIINIT(YO2) =0.0 ;FIINIT(YH2O)=0.12

    + FIINIT(YN2) =0.73;FIINIT(YCO2)=0.15

    ELSE

    + FIINIT(YO2)=0.232;FIINIT(YH2O)=0.

    + FIINIT(YN2)=0.768;FIINIT(YCO2)=0.

    ENDIF

    FIINIT(ASH2)=1.0;FIINIT(CHA2)=0.0

    FIINIT(WAT2)=0.0;FIINIT(COL2)=0.0

    TREFE=273.0;TINI=340.

    IF(BURN) THEN

    + TCALC=TREFE+600.0

    ELSE

    + TCALC=TREFE+TINI

    ENDIF

    * compute the enthalpy of the air stream

    RG57=2.0

    HCALC=1.0E-3*0.77*(0.97035+1.493E-4*TCALC/RG57)*TCALC

    HCALC=HCALC+1.0E-3*0.23*(1.0802+3.265E-5*TCALC/RG57)*TCALC

    FIINIT(H1)=HCALC;FIINIT(H2)=CP2*TCALC

    FIINIT(TEMP1)=TCALC;FIINIT(TEMP2)=TCALC

    FIINIT(DEN1)=PRESS0/(FIINIT(TEMP1))/287.398

    GROUP 13. Boundary conditions and special sources

    -----------------------------------------------------------------

    COAL DRYING

    ---------------------

    PATCH(VAPORIS0,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    COVAL(VAPORIS0,P1,FIXFLU,GRND5);COVAL(VAPORIS0,P2,FIXFLU,GRND5)

    COVAL(VAPORIS0,YH2O,ONLYMS,1.0);COVAL(VAPORIS0,H1,ONLYMS,GRND5)

    PATCH(VAPORIS2,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    COVAL(VAPORIS2,H2,FIXFLU,GRND5);COVAL(VAPORIS2,WAT2,FIXFLU,GRND5)

    * Patch to counter the transfer of species due to mass transfer

    PATCH(VAPORIS5,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    COVAL(VAPORIS5,COL2,GRND9,GRND9);COVAL(VAPORIS5,CHA2,GRND9,GRND9)

    COVAL(VAPORIS5,WAT2,GRND9,GRND9)

    IF(SIZECH) THEN

    + COVAL(VAPORIS5,PHIS,GRND9,GRND9)

    ENDIF

    STORE(VAPO);FIINIT(VAPO)=0.0;RELAX(VAPO,LINRLX,1.0)

    RESREF(VAPO)=0.3;ENDIT(VAPO)=0.3;PRT(VAPO)=1.0;PRNDTL(VAPO)=1.0

    REAL(ADEVOL,EDEVOL,RG55,C1EBU,C2EBU)

    INTEGER(IG14,IG16,MODHET,IORDER,IKDMEA)

    RAW COAL VOLATILISATION: Raw coal > Y Volatiles + (1-Y) Char

    -----------------------------------------------------------------------------------------

    IF(BURN) THEN

    + PATCH(DEVOLAT0,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(DEVOLAT0,P1,FIXFLU,GRND1);COVAL(DEVOLAT0,P2,FIXFLU,GRND1)

    + COVAL(DEVOLAT0,YCHX,ONLYMS,GRND1);COVAL(DEVOLAT0,YO2,ONLYMS,GRND1)

    + COVAL(DEVOLAT0,H1,ONLYMS,GRND1)

    * Patch for volatile phase-2 species

    + PATCH(DEVOLAT2,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(DEVOLAT2,COL2,FIXFLU,0.0);COVAL(DEVOLAT2,CHA2,FIXFLU,GRND1)

    + COVAL(DEVOLAT2,COL2,GRND1,0.0)

    ENDIF

    * ADEVOL = constant A * EDEVOL = constant E/R in volat. model

    + ADEVOL=2000.0;EDEVOL=2.3E4/8.130

    + SPEDAT(SET,COFFUS,ADEVOL,R,ADEVOL)

    + SPEDAT(SET,COFFUS,EDEVOL,R,EDEVOL)

    * store volatilization rate & special relaxation

    + STORE(VRAT);FIINIT(VRAT)=0.0;RELAX(VRAT,LINRLX,1.0)

    + RESREF(VRAT)=0.3;ENDIT(VRAT)=0.3;PRT(VRAT)=1.0;PRNDTL(VRAT)=1.0

    * Use this line to de-activate: devolat=skip;rg(21)=0.0

    Patch to counter the transfer of non-volatile species

    IF(BURN) THEN

    + PATCH(DEVOLAT5,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(DEVOLAT5,COL2,GRND9,GRND9)

    + COVAL(DEVOLAT5,CHA2,GRND9,GRND9)

    + COVAL(DEVOLAT5,WAT2,GRND9,GRND9)

    IF(SIZECH) THEN

    + COVAL(DEVOLAT5,PHIS,GRND9,GRND9)

    ENDIF

    ENDIF

    * Ask litec what this is; suggest better name than IG16

    * IG16 = 1 indicates CO as product, =2 indicates CO2

    + IG16=1

    + SPEDAT(SET,COFFUS,IG16,I,IG16)

    * Combustion

    Ask litec what these are:

    CHx + O2 -> CO2 + H20 (Not active)

    patch(combustc,phasem,1,nx,1,ny,1,nz,1,1000)

    coval(combustc,ychx,fixflu,grnd2)

    coval(combustc,yo2,fixflu,grnd2)

    coval(combustc,yh2o,fixflu,grnd2)

    coval(combustc,yco2,fixflu,grnd2);ig16=2

    coval(combustc,h1, fixflu,grnd2)

    TWO-STEP HOMOGENEOUS COMBUSTION OF VOLATILES (YCHX)

    --------------------------------------------------------------------------------------------

    * Ask litec what these are:

    Store combustion rate for relaxation

    + STORE(COM1);FIINIT(COM1)=0.0;LITER(COM1)=1;RELAX(COM1,LINRLX,1.0)

    + RESREF(COM1)=0.3;ENDIT(COM1)=0.3;PRT(COM1)=1.0;PRNDTL(COM1)=1.0

    CHx + O2 -> CO + H20 seguida por CO + O2 -> CO2

    IF(BURN) THEN

    + PATCH(COMBUSTA,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(COMBUSTA,YCHX,FIXFLU,GRND2);COVAL(COMBUSTA,YO2,FIXFLU,GRND2)

    + COVAL(COMBUSTA,YH2O,FIXFLU,GRND2);COVAL(COMBUSTA,YCO,FIXFLU,GRND2)

    + COVAL(COMBUSTA,H1,FIXFLU,GRND2)

    + PATCH(COMBUSTB,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(COMBUSTB,YO2,FIXFLU,GRND2);COVAL(COMBUSTB,YCO2,FIXFLU,GRND2)

    + COVAL(COMBUSTB,YCO,FIXFLU,GRND2);COVAL(COMBUSTB,H1,FIXFLU,GRND2)

    ENDIF

    * Ask litec what these are:

    Store combustion rate for relaxation and products for printout

    + STORE(COM2);FIINIT(COM2)=0.0;RELAX(COM2,LINRLX,1.0)

    + RESREF(COM2)=0.3;ENDIT(COM2)=0.3;PRT(COM2)=1.0;PRNDTL(COM2)=1.0

    * Liter=1 selects mixing rate (ep/k) as combustion rate

    + LITER(COM2)=1

    * C1EBU & C2EBU = EBU constants in combustion model

    + C1EBU=4.0;C2EBU=0.0

    + SPEDAT(SET,COFFUS,C1EBU,R,C1EBU)

    + SPEDAT(SET,COFFUS,C2EBU,R,C2EBU)

    HETEROGENEOUS COMBUSTION OF CHAR C(S) + O2 > CO2

    -------------------------------------------------

    IF(BURN) THEN

    + PATCH(BURNOUT0,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(BURNOUT0,P1,FIXFLU,GRND5);COVAL(BURNOUT0,P2,FIXFLU,GRND5)

    + COVAL(BURNOUT0,H1,ONLYMS,GRND1)

    + PATCH(BURNOUT2,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(BURNOUT2,H1 ,FIXFLU,GRND5)

    + COVAL(BURNOUT2,YO2 ,FIXFLU,GRND5)

    + COVAL(BURNOUT2,CHA2,FIXFLU,GRND5)

    + COVAL(BURNOUT2,YCO,GRND9,1.0)

    * Ask litec what this is:

    coval(burnout2,yco2,grnd9,1.0);ig14=2

    ENDIF

    * Ask litec for clarification of these:

    * IG14 = 1 indicates CO as product, =2 indicates CO2

    * MODHET = selects kinetic law for heterog. reaction

    * IORDER = selects order of heterog. reaction

    * IKDMEA = selects kinetic/diffusion weighting

    + IG14=1;MODHET=0;IORDER=0;IKDMEA=0

    + SPEDAT(SET,COFFUS,IG14 ,I,IG14 )

    + SPEDAT(SET,COFFUS,MODHET,I,MODHET)

    + SPEDAT(SET,COFFUS,IORDER,I,IORDER)

    + SPEDAT(SET,COFFUS,IKDMEA,I,IKDMEA)

    * storage of rate triggers calculation

    + STORE(BOUT);FIINIT(BOUT)=0.0

    ** special relaxation practice

    + RELAX(BOUT,LINRLX,4.0);RESREF(BOUT)=0.3

    + ENDIT(BOUT)=1.E-20;PRT(BOUT)=0.1;PRNDTL(BOUT)=1.E+20

    * RG55 = ask litec what this is

    + RG55=0.0

    + SPEDAT(SET,COFFUS,RG55,R,RG55)

    IF(BURN) THEN

    * Patch to counter the transfer of non-combusting species

    + PATCH(BURNOUT5,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(BURNOUT5,COL2,GRND9,GRND9);COVAL(BURNOUT5,CHA2,GRND9,GRND9)

    + COVAL(BURNOUT5,WAT2,GRND9,GRND9)

    IF(SIZECH) THEN

    + COVAL(BURNOUT5,PHIS,GRND9,GRND9)

    ENDIF

    ENDIF

    GROUP 16. Termination of iterations

    -----------------------------------

    * Limit iterations to save cpu time

    DO II=12,NPHI

    + IF(LITER(II).GT.8) THEN

    + LITER(II)=8

    + ENDIF

    ENDDO

    GROUP 17. Under-relaxation devices

    ----------------------------------

    REAL(FACLIN,FACMIN)

    IF(SIZECH) THEN

    + FACLIN=0.01;RELAX(PHIS,LINRLX,0.1)

    ELSE

    + FACLIN=0.1

    ENDIF

    RELAX(CFIP,LINRLX,0.3);RELAX(DEN1,LINRLX,0.3)

    RELAX(YCHX,LINRLX,FACLIN);RELAX(YO2, LINRLX,FACLIN)

    RELAX(YH2O,LINRLX,FACLIN);RELAX(YCO, LINRLX,FACLIN)

    RELAX(YCO2,LINRLX,FACLIN);RELAX(COL2,LINRLX,FACLIN)

    RELAX(CHA2,LINRLX,FACLIN);RELAX(WAT2,LINRLX,FACLIN)

    * Special relaxation practices for sources

    * FACMIN = ask litec what this is

    FACMIN = 0.9

    SPEDAT(SET,COFFUS,FACMIN,R,FACMIN)

    GROUP 18. Limits on variables or increments to them

    ---------------------------------------------------

    HCALC=1.0E-3*0.77*(0.97035+1.493E-4*TREFE/RG57)*TREFE

    HCALC=HCALC+1.0E-3*0.23*(1.0802+3.265E-5*TCALC/RG57)*TREFE

    VARMIN(H1)=HCALC;VARMIN(H2)=CP2*TREFE

    VARMIN(R2) =1.E-9

    VARMAX(YCHX)=1.0;VARMIN(YCHX)=1.E-6

    VARMAX(YCO) =1.0;VARMIN(YCO) =1.E-6

    VARMAX(YO2) =1.0;VARMIN(YO2) =1.E-6

    VARMAX(YH2O)=1.0;VARMIN(YH2O)=1.E-6

    VARMAX(YCO2)=1.0;VARMIN(YCO2)=1.E-6

    VARMAX(YN2) =1.0;VARMIN(YN2) =1.E-6

    VARMAX(CHA2)=1.0;VARMIN(CHA2)=1.E-6

    VARMAX(COL2)=1.0;VARMIN(COL2)=1.E-6

    VARMAX(WAT2)=1.0;VARMIN(WAT2)=1.E-8

    VARMAX(ASH2)=1.0;VARMIN(ASH2)=1.E-10

    GROUP 19. Data communicated by satellite to GROUND

    --------------------------------------------------

    BOOLEAN(SPEOUT)

    REAL(CBETA,YVOL,STCOEF,HEATC,HEATH,HEATC2,HITMUL,RG42,RG91)

    REAL(RG100,RG101,RG102,RG103,RG104)

    * SPEOUT = T activates special output data

    SPEOUT=F

    SPEDAT(SET,COFFUS,SPEOUT,L,SPEOUT)

    * CBETA * YVOL * STCOEF * HEATC * HEATH * HEATC2

    * HITMUL * RG91 ( ask litec what all these are )

    CBETA=0.0;YVOL =0.0;STCOEF=0.0;HEATC=0.0

    HEATH=0.0;HEATC2=0.0;HITMUL=0.0;RG42 =0.0;RG91=0.0

    SPEDAT(SET,COFFUS,CBETA ,R,CBETA)

    SPEDAT(SET,COFFUS,YVOL ,R,YVOL )

    SPEDAT(SET,COFFUS,STCOEF,R,STCOEF)

    SPEDAT(SET,COFFUS,HEATC ,R,HEATC )

    SPEDAT(SET,COFFUS,HEATH ,R,HEATH )

    SPEDAT(SET,COFFUS,HEATC2,R,HEATC2)

    SPEDAT(SET,COFFUS,HITMUL,R,HITMUL)

    SPEDAT(SET,COFFUS,RG42 ,R,RG42 )

    SPEDAT(SET,COFFUS,RG91 ,R,RG91 )

    ** Coal size-change calculation

    IF(SIZECH) THEN

    ** LITEC recommend deactivating patch & setting rg100-rg105=0.

    PATCH(SIZECHAN,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)

    COVAL(SIZECHAN,PHIS,FIXFLU,GRND7)

    ENDIF

    * RG100 = minimum size = 5.E-6

    * RG101 = factor for breakup during devolatilization =-100.

    * RG102 = factor for slip velocity

    * RG103 = factor for turbulent kinetic energy

    * RG104 = particle swelling =-0.2

    RG100=0.0;RG101=0.0;RG102=0.0;RG103=0.0;RG104=0.0

    SPEDAT(SET,COFFUS,RG100,R,RG100);SPEDAT(SET,COFFUS,RG101,R,RG101)

    SPEDAT(SET,COFFUS,RG102,R,RG102);SPEDAT(SET,COFFUS,RG103,R,RG103)

    SPEDAT(SET,COFFUS,RG104,R,RG104)

    ** Store Nox variables in combustion run

    STORE(NO1);STORE(HCN1)

    Group 21. Print-out of Variables

    --------------------------------

    * The following OUTPUT coding is inactive, as currently coded in s5_cof.for

    OUTPUT(U2,Y,P,P,Y,Y,Y);OUTPUT(V2,Y,P,P,Y,Y,Y)

    OUTPUT(W2,Y,P,P,Y,Y,Y);OUTPUT(R1,Y,P,P,Y,Y,Y)

    OUTPUT(R2,Y,P,P,Y,Y,Y)

    DO II=15,NPHI

    IF(:ISLN(II):/3*3.EQ.:ISLN(II):) THEN

    + OUTPUT(II,Y,P,P,Y,Y,Y)

    ELSE

    + OUTPUT(II,Y,P,P,N,N,N)

    ENDIF

    ENDDO

    ** NOX Computation Settings

    ------------------------

    ** ATTRIB(20) {=1 No NOX} {=2 NOX}

    IF(ATTRIB(20).EQ.2) THEN

    + NOXCAL=T

    ELSE

    + NOXCAL=F

    ENDIF

    SPEDAT(SET,COFFUS,NOXCAL,L,NOXCAL)

    IF(NOXCAL) THEN

    * Deactivate VRAT calculation (volatilization rate)

    + SPEDAT(SET,COFFUS,ADEVOL,R,0.0)

    * Store all the previously-solved variables

    + DO II=1,NPHI

    + SOLUTN(II,P,N,P,P,P,P)

    + ENDDO

    + SOLVE(NO1);SOLVE(HCN1)

    * CINT's for new variables

    + CINT(NO1)=0.0;CINT(HCN1)=0.0

    * Variables are phase 1

    + TERMS(NO1,P,P,P,P,Y,N);TERMS(HCN1,P,P,P,P,Y,N)

    * HCN creation from coal

    + PATCH(HCN2FORM,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(HCN2FORM,HCN1,FIXFLU,GRND)

    * NO creation from char-bound nitrogen

    + PATCH(HETNOFOR,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(HETNOFOR,NO1,FIXFLU,GRND)

    * Fuel-NO formation from HCN

    + PATCH(FUELFORM,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(FUELFORM,NO1 ,FIXFLU,GRND)

    + COVAL(FUELFORM,HCN1,GRND,0.0)

    * Thermal-NO formation

    + PATCH(THERMLNO,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(THERMLNO,NO1 ,GRND,GRND)

    * NO destruction by homogeneous reaction with HCN

    + PATCH(FUELRHOM,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(FUELRHOM,NO1 ,GRND,0.0)

    + COVAL(FUELRHOM,HCN1,GRND,0.0)

    * Heterogeneous reduction of NO on char

    + PATCH(FUELRHET,FREEVL,1,NX,1,NY,1,NZ,1,LSTEP)

    + COVAL(FUELRHET,NO1,GRND,0.0)

    + VARMIN(NO1)=0.;VARMIN(HCN1)=0.;RESREF(NO1) =1.E-15

    + RESREF(HCN1)=1.E-15

    + DO II=1,NPHI

    + OUTPUT(II,P,P,P,P,N,N)

    + ENDDO

    + OUTPUT(NO1 ,P,P,P,P,Y,Y);OUTPUT(HCN1,P,P,P,P,Y,Y)

    + REAL(YNCOAL,RENDNH,TSAPAR,CHAMIN)

    * YNCOAL = Mass fraction of N in coal

    * RENDNH = Efficiency of transformation of charN to NOx

    * TSAPAR = Particle Total Surface Area (TSA) m2/g

    * CHAMIN = Cut-off value for char NOx

    + YNCOAL=0.0115;RENDNH=0.15;TSAPAR=1.0;CHAMIN=0.0

    + SPEDAT(SET,COFFUS,YNCOAL,R,YNCOAL)

    + SPEDAT(SET,COFFUS,RENDNH,R,RENDNH)

    + SPEDAT(SET,COFFUS,TSAPAR,R,TSAPAR)

    + SPEDAT(SET,COFFUS,CHAMIN,R,CHAMIN)

    Skip radiation patch, since fluxes will now be stored

    + RADISO=SKIP

    * Restart everything

    + RESTRT(ALL)

    * Relax new variables

    + RELAX(HCN1,FALSDT,0.01);RELAX(NO1 ,FALSDT,0.01)

    * Deactivate phase diffusion because of PHOENICS error of not computing these

    fluxes for scalars, when hydrodynamics not solved.

    + TERMS(R2,P,P,N,P,P,P);RESTRT(ALL)

    ENDIF

    Pictures

    geometry

    velocity

    temperature

    H2O concentration