Hi all !
I am currently working with the Python interface of Cantera, and performing 1D premixed flame calculations of methane oxidation with the GRI30 (irreversible) mechanism.
To perform a scheme reduction, I would like to get the sensitivities of the concentrations of the
solution of premixed flame calculation to the
reaction rate coefficients of each reactions, in the same fashion as explained here :
https://groups.google.com/forum/#!topic/cantera-users/qMOxAdolJiA Now, since from my understanding -but I would reeaally like to stand corrected - there is no way of doing this directly as in CHEMKIN, I tried to systematically modify the multiplier of each reaction in order to recompute my flame (surprisingly enough, it doesn't take that much time to do), and to use the formula that can be found both in the previous post and in the premix.f file of CHEMKIN (II) to get the normalized sensitivities of each species.
My problem is that it does not confront well with CHEMKIN results. First of all, the orders of magnitude are way off (sensitivities in the order of 10e4 with cantera ...??). So I guess that my way of performing these calculations is wrong, but I cannot find a way to correct it without finding out :
what exactly is that "multiplier" in cantera, is it comparable to the result of CHEMKIN's subroutine CKRDEX ? (but even in CHEMKIN I always wondered what it did in reality)
why, when normalizing the sensitivities, do we use the multiplier value and not the reaction rate coef ?
Thank you for your help !
---------------------------------------------
Just in case, here is my sensitivity calculation routine (similar to the one given in the post I mentionned) :
fout = open('out.out','w')
T0 = f.T()
II=gas.nReactions()
KK=gas.nSpecies()
JJ=f.flame.nPoints()
#Sensitivity analysis------------------------------------------
#Similar to the DP of CHEMKIN
dk = 2.98e-8
#LOOP sur les reactions
for i in range(II):
fout.write(' ' + str(i+1))
gasbis.setMultiplier(1+dk, i)
fbis.solve(loglevel, 0)
T = fbis.T()
#LOOP sur les mesh points
for n in range(JJ):
f.setGasState(n)
fbis.setGasState(n)
G0 = gas.moleFractions()
G = gasbis.moleFractions()
#LOOP sur Temp, especes, enrg
SensiTemp=(T[n]-T0[n])/(T0[n]*dk)
fout.write(' ' + str(SensiTemp))
for k in range (KK):
Su0=G0[k]
Su=G[k]
Sensi=(Su-Su0)/(Su0*dk)
fout.write(' ' + str(Sensi))
gasbis.setMultiplier(1, i)
fout.write("\n")
fout.close()