jcaiuwyo / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

Negative Concentrations as output from Reactor.advance() leads to entropy_mass()=="nan" #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When a gas phase object (GRI30 or others) in  a reactor is advanced in
time, it happens sometimes that concentrations of species in negligible
concentrations (mole fractions) get negative. If the entropy or free
enthalpy is needed, their values get "nan".

I can check for this myself and set the negative concentrations to zero in
my Python script. But a general solution seems more appropriate.

Wouldn't it be better to check  for (no-physical) negative mole fractions
in the integration routine and set them to zero, if the concentration is
negligible (at least as an opttion) and setting an error flag  or warning
flag otherwise?
2.
3.

What is the expected output? What do you see instead?

I am expecting a numeric value for entropy intead of "nan".

What version of the product are you using? On what operating system?
Cantera 1.8 ; Python 2.6, Windows XP

Please provide any additional information below.

Original issue reported on code.google.com by Burak.At...@gmail.com on 31 May 2010 at 9:13

GoogleCodeExporter commented 9 years ago

Original comment by yarmond on 27 May 2011 at 9:39

GoogleCodeExporter commented 9 years ago
This should be fixed by the changes in r1329.

Original comment by yarmond on 25 Mar 2012 at 11:28