__PROBLEM 1__

*Description*

The following **FREEFORM™** commands illustrate the capabilities of **ANSWER™** to dynamically define:

- New field variables,
- New transport
equations, and
- New reactions and sources.

************************************************************************

**TITL**E SQUARE CAVITY PROBLEM WITH
USER-DEFINED TRANSPORT & REACTION

************************************************************************

// This data
set for ACRi Software ANSWER illustrates the use of

// the
FREEFORM command language to dynamically define:

// >>
New Field Variables,

// >>
New Transport Equations, and

// >>
Complex Reactions and Sources

//

************************************************************************

/

// The
problem is set in the context of the classic Square Cavity

// with a
moving lid at the top.

//

// A new
species call DOGS is defined on the fly which is governed by

// a
transport equation. The transport properties and boundary
conditions

// for DOGS
are defined by simple commands.

//

// The
distribution of DOGS is effected by the availability of MEAT

// as a
sinusoidal function of Time, and a 1st-order Arrhenius reaction

// called
KILLed. These are defined on-the-fly.

//

// MEAT =
2.0 * SIN ( 0.06886 * Time + 1. ) +2.0

// KILLed =
-19.6 * exp(-937/T) DOGS^0.5

/

// In
addition in one part of the domain, the DOGS are regenerated as

// as a
function of U velocity if it is positive and eliminated if it is

// negative.
The function is defined as a arbitrary tabulated function

************************************************************************

/

**GRID**
**NODE**s BY 22 BY 22 ! Use structured mode of ANSWER

/

**COOR**DINATE
**X RANGE** 1 ! Auto gridding; range specified

**COOR**DINATE
**Y RANGE **
1 ! Auto gridding; range specified

/

***** Flow
conditions

**WALL** at all outer boundaries

**BOUN**dary
**U:** at boundary **Y+, VALUE**=1. ! Specify moving top wall

**LAMI**NAR flow

**VISC**OSITY is 0.01

**SET**
**T** (temperature) = 293.15

/

***** Define
new variables on the fly

**ALLO**CATe "**DOGS**- Members of Canine Family"

**ALLO**CATe "**MEAT**- Food for Dogs"

/

//////////////////////////////////////////////////////////////////////

**** Define
Transport equation for DOGS and its attributes

//////////////////////////////////////////////////////////////////////

**INIT**ial value of
**DOGS** = 10

**PRAN**Dtl Number for
**DOGS** is 0.1

! Boundary
conditions for DOGS including a linear function at top

**BOUN**dary X- (left) for
**DOGS: Value** = 2
! Fixed value

**BOUN**dary X+ (right) for
**DOGS: FLUX** = 0
! No DOGS leave or enter

**BOUN**dary Y- (bottom) for
**DOGS: FLUX** = 1.E-4
! dogs enter from bottom

**BOUN**dary Y+ (top) for
**DOGS: VALUe** =
**Linear** function 2. +8. *
**X**

//////////////////////////////////////////////////////////////////////

// Define
MEAT as sinusoidal function of TIME; make it source for DOGS

//////////////////////////////////////////////////////////////////////

**SET**
**MEAT** = 2. * **SIN** ( 0.06886 * **Time** + 1. ) +2. **ALWA**ys

**SOUR**ce for
**DOGS** is **LINE**AR function: 0. +1. *
**MEAT** per unit
**VOLU**me

! Assume
dogs die as a non-linear Arrhenius function of population

**ALLO**CATE '**KILL**- Killed from various causes'

**REAC**tion
**KILL DOGS** Z0 = 19.6 **TEMP**erature_activation = 937 power = 0.5

**SOUR**ce
**REAC**TION type for
**DOGS LINE**ar -1. * **KILL**

! Assume in
one subregion dogs die when U < 0 & are born when U > 0

**SELE**CT subregion 5,5 to 7,7

**SOUR**CE for
**DOGS** for **SELE**Cted region is a **TABL**E of 3 sets in terms of
**U**

// U SOURCE

-1 -0.01234

0. 0

1. 2.1234

//////////////////////////////////////////////////////////////////////

**** END of
specification for DOGS' transport equation

//////////////////////////////////////////////////////////////////////

**REAC**tion default hydrocarbon OFF

**DIAG**NOSTIC
**NODE** print **Time, U, V and DOGS** AT (6,6) every 50 step

**CONV**ERGENCE
**REFE**rence **U** in **LOCA**L mode 1.E-6

/

**OUTP**UT
**U DOGS, MEAT, KILL NARR**ow mode

**HIST**ORY of
**U DOGS MEAT** and
**KILL** with **PLOT** output on file "DOGS.HIS"

**HIST**ORY at (2,2) (5,5) (7,7) and (10,10)
every 16 **STEPS**

/

**SOLV**E
**U V P** & **DOGS** for 365 days in step of 0.1

**END**

__PROBLEM 2__

*Description*

The following commands were used
to set up and run a new 5 step methane combustion mechanism in
the University of Washington jet stirred reactor.

/-----------------------------------------------------------------/

**TITL**E Case K. COMBUSTION IN UW JSR -
5-STEP UW CH4/AIR MECH.

/-----------------------------------------------------------------/

/ ANSWER
Input File

/

/ Using UW
1-atm CH4-Air 5-Step Mechanism

/ 2-D
Problem

/

/ Reference:
Nicol, D.G., Malte, P.C., Hamer, A.J., Roby, R.J.,

/ Steele,
R.C., 1998, "Development of a Five-Step

/ Global
Methane Oxidation - NO Formation Mechanism

/ for
Lean-Premixed Gas Turbine Combustion," to

/ appear in
Transactions of ASME (Earlier version

/ of this
work also in Western States/CI paper number

/ 97S-039).

/

/------------------------GRID
SPECIFICATION-----------------------/

/ 2-D Grid

**GRID** 117 by 43

**COOR**dinates
**X JIK**** **'x_jsr.grd' in FULL
**CYLI**ndrical

**COOR**dinates
**R JIK**** **'r_jsr.grd' in FULL
**CYLI**ndrical

/----------------------DEFINE
BOUNDARY REGIONS--------------------/

/ Inlet Jet

**LOCA**te
**ID=IN1** (1,1) (1,12)

**INLE**t
at **X- ID=IN1**

/ Outlet
Drain Hole

**SELE**ct
(24,43) (30,43)

**OUTL**et
at **R+** for the S**ELE**cted subregion

/ Axis of
Symmetry

**SYMM**etry
at **Y-** axis

/ Set Walls

**WALL**s
at undefined outer boundaries

/------------------------CHEMICAL
REACTIONS-----------------------/

/ Set up
combustion from scratch (i.e., turn off all the default

/ reaction
details)

**REAC**tion
**OFF** DEFAULT

/ Define
molecular weights of the species

**GAS**
**FU**=16.0
**CO**=28.0 **CO2**=44.0 **H2O**=18.0

**N2**=28.0
**O2**=32.0 **NO**=30.0

/Allocate
space for reaction rates, called R1, R2, R3, R4, R5

**ALLO**cate
**R1**

**ALLO**cate
**R2**

**ALLO**cate
**R3**

**ALLO**cate
**R4**

**ALLO**cate
**R5**

/ Define
reaction rates (NOTE: FU = CH4)

/ CH4 + 1.5
O2 => CO + 2 H2O

/ 1.66E+15 =
Pre-exponential (see reference)

/ 2.0643E+04
= Activation temp

/ 1.46 =
Exponent for FU

/ 0.5217 =
Exponent for O2

/ 0.0 = Temp
exponent

/ EBU = Want
to specify EBU rate for this reaction

/ TEMP =
Include this modifier because using activation

/
temperature (instead of activation energy)

**REAC**tion
**R1 FU
O2** 1.66E+15
2.0643E+04 1.460 0.5217 0.0 **EBU TEMP**

/ CO + 0.5
O2 => CO2

**REAC**tion
**R2 CO
O2** 7.98E+14
1.1613E+04 1.6904 1.570 0.0 **EBU TEMP**

/ CO2 =>
CO + 0.5 O2

**REAC**tion
**R3
CO2** 2.23E+14
6.2281E+04 1.0 0.0 **EBU TEMP**

/ N2 + O2
=> 2 NO

**REAC**tion
**R4 CO
O2** 8.83E+23
5.3369E+04 0.7211 4.0111 0.0 **EBU TEMP**

/ N2 + O2
=> 2 NO

**REAC**tion
**R5 N2
O2** 9.27E+14
6.8899E+04 1.0 0.5 -0.5** EBU TEMP**

/ EBU
coefficients for each mechanism

**EBU**
**R1 FU** 3.0

**EBU**
**R2 CO**
**O2** 3.0 1.75

**EBU**
**R3 CO2** 3.0

**EBU**
**R4 N2** 3.0

**EBU**
**R5 N2** 3.0

/---EBU 3.0
1000

/---------------SOURCE
TERMS FOR SPECIES DIFF EQ------------------/

/ Define
source terms for CH4, CO, and NO

/ CH4 source
term

**SOUR**ce
**REAC**tion type **FU LINE***ar -1.0 **** R1**

/

/ CO source
term ( 1.75 = CO/CH4; 0.6364 = CO/CO2 )

**SOUR**ce
**REAC**tion type **CO LINEar*** +1.75 * *
**R1*** -1.0 *
*** R2*** +0.63636 * *
**R3**

/

/ NO source
term ( 2.1429 = 2 * NO/N2 = 2 * NO/CO )

**SOUR**ce
**REAC**tion type **NO*** *
**LINE***ar*** **
*+2.1429 * *
**R4*** +2.1429 * *
**R5**

/

/------------ALGEBRAIC
EXPRESSIONS FOR OTHER SPECIES--------------/

/

/ Algebraic
equations for total H-atom (FH), total O-atom (FO),

/ CO2, H2O,
O2, and N2 by atom balance. FF is total C-atom.

**SET**
**ALWA**ys **LINE***ar ***FH*** = 0.0 +1.0 * *
**FF**

**SET**
**ALWA**ys **LINE***ar ***FO*** = 0.2331 -0.2331 * *
**FF**

**SET**
**ALWA**ys **LINE***ar ***CO2*** = 2.75 * *
**FF*** -1.571 * *
**CO*** -2.75 **** FU*** + 0.0*

**SET ALWA**ys
**LINE***ar*
**H2O*** = 2.75 * *
**FH*** -2.75 * *
**FU*** +0.0*

**SET ALWA**ys
**LINE***ar*
**O2*** = 1.0 * *
**FO*** -0.571 * *
**CO*** -0.727 * *
**CO2*** -0.889 * *
**H2O*** -0.533 * *
**NO*** + 0.0*

**SET ALWA**ys
**LINE***ar*
**N2*** = -1.0 * *
**FU*** -1.0 * *
**CO*** -1.0 * *
**CO2*** -1.0 * *
**H2O*** -1.0 * *
**NO*** -1.0 * *
**O2*** + 1.0*

/------------------INITIAL
AND BOUNDARY CONDITIONS----------------/

/

/ Walls of
reactor are adiabatic

**ADIA**batic
**WALL**S

/ Inlet
Jet/Initial Conditions (Fuel-Air Equivalence Ratio = 1.1)

*SET** *
**U X-*** 78.4 *
**ID=IN1**

*SET** *
**FU X-*** 0.06 *
**ID=IN1**

*SET** *
**FF X-*** 0.06 *
**ID=IN1**

*SET** *
**T **
*523.0*

*SET** *
**K **
*100.0*

*SET** *
**L **
*0.0004*

/ Initialize
a 'hot' region to start combustion

**INIT****IAL **
**T**** 2000.0 (2,2) (76,30)**

/-------------------FLUID
PROPERTIES AND CONSTANTS----------------/

/ Density
calculated by Gas Law

**DENS**ity
**GAS**

/ Specific
heat and species enthalpies calculated by polynomial

/
expressions

**SPEC**ific **heat by NASA **
**POLY****nomial expressions**

/--------------------------SOLUTION
OPTIONS-----------------------/

/ Variable
limit setting

**LIMI**T
**FU** 1.0E-20 1.0

**LIMI**T
**FF **
1.0E-20 1.0

**LIMI**T
**H2O** 1.0E-20 1.0

**LIMI**T
**CO2** 1.0E-20 1.0

**LIMI**T
**O2** 1.0E-20 1.0

**LIMI**T
**H2** 1.0E-20 1.0

**LIMI**t
**CO** 1.0E-20 1.0

**LIMI**t
**NO** 1.0E-20 1.0

**LIMI**t
**T** 523.0 4000.0

/

/ Relaxation
Factors

**RELA**xation
**U**=0.3 **V**=0.3 **W**=0.3 **P**=0.3 **K**=0.3 **E**=0.3 **T**=0.3 **FF**=0.3 **FU**=0.3 **CO**=0.3 **NO**=0.3

/ Monitor
solution at (90,5) every 10 iterations

**DIAG**nostic output for
**U, V, T, NO, FU,
FF** at (90,5) in
every 1 steps

/------------------------OPERATIONAL
CONTROL----------------------/

/
Convergence criteria - based on global residual

**CONV**ergence
**GLOB**AL 1.E-9 1

**SOLV**E
**STEA**DY 5000

**OUTP**UT
**U V W P T K E L H FF FH FO FU CO
O2 H2O CO2 NO N2 MU RHO**

**SAVE**
**U V W P T K E L H FF FH FO FU CO
O2 H2O CO2 NO N2 MU RHO** on file 'CaseK.sav'

**END**

**Related Links:**

# FREEFORM Home Page