Hello Cantera Users!
I am a new user to Cantera and I am using Cantera 2.3.0 and Python 3.4 in my Windows 10 System. I am working on my Masters thesis on building an emission model of industrial gas turbine combustors under Exhaust Gas Recirculation. I have looked into the examples of combustor.py and pfr.py examples provided by Cantera. I am trying to build the system with the premixer (upstream of combustor) as an Ideal Gas Reactor and the main combustor as a reactor Network (CSTR) and PFRs.
I am using Natural Gas as the fuel with GRI3.0 Mechanism. The premixed mixture's entry conditions into the combustor is at 700 K and 10.3 bar. As a start, I am trying to connect the premixer (with 2 inlets- Natural Gas and EGR oxidizer) with the main combustor (different volume). I am igniting the mixture as per combustor.py wiht a stream of H radicals. Initially, I have assumed the whole combustor volume as a single Ideal Gas reactor.
So the outline is basically:
'''
Fuel stream pipe----|
---------> PREMIXER (Ideal Gas Reactor) ---------> Combustor (CSTR)
EGR oxidiser pipe---|
'''
Problems and Errors for which I need help:
1. After the combustor, an exhaust valve has been connected to calculate the residence time of the combustor.
#exhaust valve
v2=ct.Valve(combustor, exhaust2, K=100)
#reactor Network
sim=ct.ReactorNet([mixer2, combustor])
t_init2 = 0.0
Tprev = combustor.T
states = ct.SolutionArray(fuel2, extra=['t','tres'])
for n in range(100):
tres2= combustor.mass/v2.mdot(t_init2)
t_init2+=2*tres2
sim.advance(t_init2)
print(combustor.thermo.report())
But, the simulation loop shows the following error:
Traceback (most recent call last):
File "E:/Cantera/combustor_network.py", line 89, in <module>
tres = combustor.mass/v2.mdot(tnow)
ZeroDivisionError: float division by zero
How to correct this error? I have correctly defined the mass flow rate as per the experimental work specifies. I have attached my code for your reference.
2. Also, in order to make the simulation run and to avoid the division by zero error, I filled in a value of 1.4 inside the loop to calculate the residence time of the reactor. But I am getting weird results and the Mixture is not getting ignited even if change the initial temperature of the igniter.
I get these results:
gri30:
temperature 700 K
pressure 1.03e+06 Pa
density 4.95761 kg/m^3
mean mol. weight 28.0135 amu
1 kg 1 kmol
----------- ------------
enthalpy 4.2636e+05 1.194e+07 J
internal energy 2.186e+05 6.124e+06 J
entropy 7050.3 1.975e+05 J/K
Gibbs function -4.5089e+06 -1.263e+08 J
heat capacity c_p 1095.3 3.068e+04 J/K
heat capacity c_v 798.55 2.237e+04 J/K
X Y Chem. Pot. / RT
------------- ------------ ------------
N2 1 1 -21.7022
[ +52 minor] 4.23751e-26 1.52475e-27
Process finished with exit code 0
This means that the combustor, initially filled with hydrogen is not ignited at all or is not properly connected by a mass flow controller from the premixer. How to solve this problem?
Kindly help me out with this problem. I have been trying hard to find solutions online, but so far there are no successful attempts. I need to tackle this problem to get going with my thesis!
Kind Regards,
Vaibhav Prakash