CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   CANTERA code to get pure species mass fluxes (

gemmafebrer October 19, 2010 11:42

CANTERA code to get pure species mass fluxes
Hi everybody,

I am a new user of the open-source Cantera code, and I am using the code with the Phyton interface.

My aim is to simulate a 1D freely propagating premixed flame. At the moment I am struggling to obtain the pure species mass fluxes. I know there is a function called "getSpeciesFluxes", which inherits from Cantera.Transport class. I want to get the fluxes from a solution instance, which is defined as an ideal gas mixture (using the IdealGasMixture() constructor). Besides, my transport model is a mixture-averaged model.

In my code I am writing:

spFlux = gas.speciesFluxes(1,gradT,46,gradX,46)

where gas is the gas mixture instance, and 46 is the number of species of the chemical scheme. And the error I obtain is:

================================================== ====
Traceback (most recent call last):
File "C:\Documents and Settings\ttgf\Desktop\Cantera_related\python_gemma \", line 249, in -toplevel-
spFlux = gas.speciesFluxes(1,gradT,46,gradX,46)
AttributeError: Solution instance has no attribute 'speciesFluxes'
================================================== ====

Can anyone give me a clue about what is happening? I can obtain other transport properties, such as mixDiffCoeffs(), thermalDiffCoeffs(),... but not for species mass fluxes.

Thanks in advance


All times are GMT -4. The time now is 06:34.