Testing the value of self.parent in _SolutionBase.__dealloc__ was ineffective
because this attribute can already be cleared when __dealloc__ is called,
causing the borrowed C++ objects to be deleted prematurely. A C data member
needs to be used to determine whether this object is responsible for deleting
the underlying C++ objects.
The reactions in these files can be referenced by other CTI/XML files, or used
directly to create Reaction objects. The absence of a phase definition requires
that either (a) all reactions are in bulk phases, or (b) the rate constants are
given in kmol, meter, second units since it is impossible to determine the
dimensionality of the concentration for each species.
This makes it possible to create a phase without ever generating a CTI
or XML description. Does not yet work with phase types that require
additional parameters.
Without these functions, it was impossible to use these classes
without leaking memory. Even with these functions, the memory is
released only when these functions are explicitly called, as
old-style Matlab classes have no notion of a destructor.
Fixes#252.
This keyword argument allows the transport model specified in a CTI/XML file to
be overridden when creating the object. Can be used to speed up Solution
initialization by specifying 'transport_model=None', which is especially useful
for large mechanisms where transport initialization scales as species number
squared.
This shows the preferred method for simulating a constant pressure reactor,
rather than using a Wall with a high expansion rate coefficient which introduces
unnecessary stiffness to the problem.
Implements the radiation model of Liu & Rogg (1991). Optically thin limit,
gray-gas approximation using Planck mean absorption coefficients. Considers
emissions from CO2 and H2O, with the temperature-dependent absorption
coefficients calculated using polynomial fits to results from RADCAL
(Grosshandler, 1993).
In Python 3, attempting to convert some mechanisms would give errors like the
following:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 348:
invalid start byte
This fixes a bug in the Windows installer where the path to python.exe on the
machine where the installer is built is used, and also allows us generate
different shebang lines for the Python 2 and Python 3 modules.
Fixes Issue 247.