## Fluids

#### Developing CEL expressions for a chemical reaction

• Goenitz
Subscriber

Good day,

I am re-posting  to explain my position better. I ma trying to implement Fuel reforming reaction, on a surface, through ANSYS CFX.

reaction rate equation is:

r=Ae^(E/(RT)) (PCH4) )^a (PH2O )^b a=0.47,b=-0.01, A=390  ( mol /kg /s/Pa^0.46), E4.32 10^4 J/mol, ,R =8.3144  J/mol K and T is variable and also PCH4 and PH2O (partial pressure).

How can I write a simple CEL expression so that it can:

1. calculate r (it should take T and partial pressure as input from software)

2. also I can see, how r is changing along length (in Post, I guess). (because I cannot define r through variable as Algebraic equation is unit-less). Expression is like this:

LIBRARY:

CEL:

EXPRESSIONS:

Arr= 390 [mol kg^-1 s^-1 Pa^-0.47]

Eact = 43200 [J mol^-1]

kconst=Arr*((CH4.p)^0.46)*((H2O.p)^0.01)

Rate= kconst* e^(-Eact/R/T)

END

END

END

• Goenitz
Subscriber

Will the above expression capture T and partial pressure or I have to incorporate AreaAve(CH4.p)@Surface?

Another things is CH4.p for partial pressure is not recognised by CFX so I use CH4.mf*p for time being. Because Dalton Law says CH4.p=CH4.mol/mol_total*p_total.

Going through reference guide, I can say that when user assigns p,T, density etc then these are bulk values.

• DrAmine
Ansys Employee

Please have a look in the tutorial Reacting Flow in Mixing tube.

To get partial pressure you need to get the mole fractions out of the mass fraction and then apply Dalton's Law.

• Goenitz
Subscriber

Thank you for partial pressure. I will review that tutorial shortly.

I posted multiple Questions but main questions are, the opening questions.

• Goenitz
Subscriber

I used CH4.molf*p which is equivalent to CH4.molfraction*pressure and in accordance with Dalton's law.

however, overall topic is not solved and I just need to know the answer of my opening question.

• Rob
Ansys Employee

You should be able to pull any/all variables out of CFX in Post to create the expression. If you plug it all in with units for each number/input and compute does the error message give you the units?

• Goenitz
Subscriber

yeah it gives, as units are not balanced so what I do is multiply it with some quantities to balance it out. mainly because reaction rate should be in mol/m^2/s where as this r (reaction rate) has mol/kg/s. So what I do is multiply it with density and length of catalyst

so r*enthalpy*density*length (r*enthalpy is general formula for flux)

In case of r in mol/m^2/s we just need r*enthalpy*length.

I am multiplying it by length because of this discussion

• Goenitz
Subscriber

I have found another mistake in my code, let me post the new one

however for heat flux I use Rate*Enthalpy*density*XLength (to balance out for time being)

# State file created:  2019/06/17 16:022

# Build 18.1 2017-04-01T000:25.494000

LIBRARY:

CEL:

EXPRESSIONS:

Arr = 390 [mol kg^-1 s^-1 Pa^-0.47]

DiffusionCoeff = ThermCond/density/HeatCap

Eact = 43200 [J mol^-1]

Enthalpy = 165000 [J mol^-1]

HeatCap =

CH4.mf*CH4.Cp+CO2.mf*CO2.Cp+CO.mf*CO.Cp+H2.mf*H2.Cp+H2O.mf*H2O.Cp+N2.m

f*N2.Cp

Rate = kconst* e^(-Eact/R/T)

ThermCond =

CH4.mf*CH4.cond+CO2.mf*CO2.cond+CO.mf*CO.cond+H2.mf*H2.cond+H2O.mf*H2O

.cond+N2.mf*N2.cond

XLength = 0.002 [m]

kconst = Arr*((CH4.molf*p)^0.46)*((H2O.molf*p)^0.01)

new = Rate*Enthalpy*density*XLength

END

END

END

COMMAND FILE:

Version = 18.1

END