Cantera/Adiabatic Flame Temperature Dilution: Difference between revisions
From charlesreid1
| Line 54: | Line 54: | ||
</math> | </math> | ||
Now we can continue building on the code above. Let's create a function to vary equivalence ratio, and compute a corresponding adiabatic flame temperature. We won't worry for now about how to go from an equivalence ratio to a gas composition. | |||
First, the pseudocode: | |||
<pre> | |||
for phi in range_of_phis: | |||
convert phi to composition | |||
call compute_adiabatic_flame_T | |||
</pre> | |||
Next, continuing the script above, | |||
<source lang="python"> | <source lang="python"> | ||
Revision as of 11:13, 31 March 2014
Let's analyze the effect of diluants (nitrogen and carbon dioxide) on the adiabatic flame temperature. Why, you ask? This issue of dilution is of central importance to oxy-fuel combustion, in which effluent gas containing carbon dioxide is recycled into the front of the reactor, so you're not burning with pure oxygen - a big safety hazard and an extremely hot process that'll mess up air-fired reactors.
Background
Adiabatic Flame Temperature Review
Let's review what the AFT is.
Computing the AFT in Cantera
We can compute an adiabatic flame temperature with Cantera by initializing a batch reactor, which will be adiabatic by default, and advancing it until combustion has completed. The final temperature is the adiabatic flame temperature.
in pseudocode,
function compute_adiabatic_flame_T:
create gas phase object with associated reaction network
set gas state
create reactor with gas in it
create reactor network with reactor in it
advance reactor network for a while
return reactor temperature
Translating that to real Python code,
from Cantera import *
from Cantera.Reactor import *
from numpy import *
def compute_adiabatic_flame_T( X0, T0, P0, dt=5.0e-3 ):
print "Computing an adiabatic flame temperature..."
g = GRI30()
g.set(X = X0, T = T0, P = P0)
r = Reactor(g)
n = ReactorNet([r])
ttotal = 0.10
t = 0.0
while t < ttotal:
t = t + dt
n.advance(t)
return r.temperature()
Now we can feed a list of composition vectors or composition strings, and get a list of adiabatic flame temperatures.
Adiabatic Flame Temperature vs Equivalence Ratio
A classical plot for adiabatic flame temperature is the adiabatic flame temperature versus equivalence ratio. The equivalence ratio is defined as:
$ \phi = \frac{ \mbox{fuel-oxidizer ratio} }{ \mbox{stoich fuel-oxidizer ratio} } $
Now we can continue building on the code above. Let's create a function to vary equivalence ratio, and compute a corresponding adiabatic flame temperature. We won't worry for now about how to go from an equivalence ratio to a gas composition.
First, the pseudocode:
for phi in range_of_phis: convert phi to composition call compute_adiabatic_flame_T
Next, continuing the script above,
def equivalence_ratio_test():
T0 = 1073.15
P0 = 3*OneAtm
phis = logspace(-1,1,10)
afts = []
for phi in phis:
X = phi_to_X(phi)
afts.append(compute_adiabatic_flame_T(X,T0,P0))
fig = plt.figure()
ax = fig.add_subplot(111)
ax.semilogx(phis,afts,'bo')
ax.set_xlabel('Phi')
ax.set_ylabel('Adiabatic Flame Temp [K]')
ax.set_title('Adiab Flame Temp vs Equivalence Ratio')
fig.savefig('AFTvsDilFrac.eps')
fig.savefig('AFTvsDilFrac.png')
plt.draw()
plt.show()
Nitrogen and Carbon Dioxide Dilution
Air is composed of a 3.7:1 mix of nitrogen and oxygen. To mimic air in an oxy-fired system, an operator would try and mimic the dilution of oxygen with carbon dioxide by mixing them in a similar ratio. However, this is a variable that the operator can (must) control, because not all of the properties of a carbon dioxide-diluted flame match those of a nitrogen-diluted flame. It can be varied to make those properties match more closely.
Just to start with