jcaiuwyo / cantera

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

Sim1D initialization is fragile #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From the Python interface, calling (for example):

f = FreeFlame(...)
f.inlet.set(...)
f.set(...)
f.showSolution()

Generates an error message indicating that "temperature must be positive" 
unless a call to f.init() is placed before the call to showSolution. This is 
caused by the fact that the solution vector of the Sim1D object is initialized 
to all zeros, and when that is used to set the state of the IdealGasMixture 
object as needed by showSolution, the indicated error appears. 

The _getInitialSoln methods of the individual Domain1D objects (called by the 
Sim1D constructor) apparently aren't actually setting the components of the 
initial solution vector to a valid thermodynamic state.

Original issue reported on code.google.com by yarmond on 13 Nov 2012 at 8:15

GoogleCodeExporter commented 9 years ago
The exception is fixed by r1930.

In r1934, showSolution() is updated to automatically call init() so that the 
printed profile is the actual initial guess.

Original comment by yarmond on 15 Nov 2012 at 3:10