Commit graph

539 commits

Author SHA1 Message Date
Ray Speth
bade514587 [1D] Fix up getters/setters/default values for radiation values 2015-01-15 21:15:18 +00:00
Andreas Rücker
49c963143e [1D] Add simple radiation model for flames
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).
2015-01-15 21:15:15 +00:00
Ray Speth
9f6c9e3a46 [ck2cti] Fix reading some input files containing non-unicode characters
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
2015-01-12 19:55:37 +00:00
Ray Speth
e94ec95988 [Python] Specify python executable to be used in shebang line for scripts
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.
2015-01-06 23:37:30 +00:00
Ray Speth
ac6f7fefdf [Python] Clarify properties of class Mixture which can be set 2014-12-12 01:37:00 +00:00
Ray Speth
0e51465722 [Doc] Describe specification of reaction orders in CTI files 2014-12-05 23:33:42 +00:00
Ray Speth
3812215ce2 [Doc/Python] Add docstrings for some 1D methods and properties 2014-12-05 23:33:22 +00:00
Ray Speth
d76b67f5fb [ck2cti] Check for formatting errors in elemental composition
Formatting errors (e.g. values in incorrect columns) result in an empty
elemental composition. Raise an exception if this occurs.
2014-12-05 23:33:20 +00:00
Ray Speth
5958578c40 [Kinetics] Check for negative and non-reactant reaction orders
Allow non-reactant orders for electrochemical reactions

Allow negative orders specifically requested, e.g. by setting the
'negative_orders' option in the CTI definition of the reaction.
2014-11-15 00:47:25 +00:00
Ray Speth
c8ecedb140 [Test] Make reaction equation test independent of species ordering 2014-11-11 00:12:21 +00:00
Ray Speth
53fb3bd341 [Test] Prevent infinite loop in TestSofcKinetics
If an infinite loop occurs in the Newton solver, it indicates a problem, but
this way the test will finish (and fail).
2014-11-11 00:12:19 +00:00
Ray Speth
8c934ab678 [Equil] Implement equilibrate as a method of MultiPhase
This differs from the current equilibrate method in that it can use either of
the multiphase equilibrium solvers.
2014-11-08 00:53:42 +00:00
Ray Speth
e16e998dd7 [Equil] Implement equilibrate as a method of ThermoPhase
The Cython interface now calls this equilibrate function.

Unlike the free function 'equilibrate', this new equilibrate method actually
does what the documentation describes regarding the 'solver' argument. This
means that there are cases where failures of the MultiphaseEquil solver were
previously being hidden by a subsequent successful solution using the ChemEquil
solver. These tests have been marked as known failures.
2014-11-08 00:53:39 +00:00
Ray Speth
24c509f539 [Kinetics] Fix some cases where duplicate reactions were not detected
Also add several tests which check that the various kinds of duplicate
reactions are being identified as errors or allowed as intended.
2014-11-07 02:15:03 +00:00
Ray Speth
5ca49efff1 [ck2cti] Adjust number of species per line dynamically 2014-10-29 23:32:04 +00:00
Ray Speth
7c6ef9d3c4 [ck2cti] Eliminate trailing whitespace in species list 2014-10-29 23:32:01 +00:00
Ray Speth
2e23362206 [ck2cti] Remove 'reaction' section label when there are no reactions 2014-10-29 23:31:58 +00:00
Ray Speth
c1b64968a6 [ck2cti] Keep full precision of NASA 9-coefficient thermo data
The 9-coefficient format keeps 10 digits for each coefficient, compared to 9 for
the 7-coefficient format.
2014-10-29 15:36:31 +00:00
Ray Speth
da35e24151 [SCons] Re-cythonize after changes to header files 2014-10-29 15:36:28 +00:00
Ray Speth
424a04bffc [Test] Limit number of lines printed after failed test comparison 2014-10-17 23:44:59 +00:00
Ray Speth
4457b4297c [Doc] Describe syntax for specifying coverage dependencies 2014-10-08 16:54:21 +00:00
Bryan W. Weber
9ed87e857c [Cython] Allow None when setting the quality of a PureFluid
Allow None as an option for the quality as well as the
temperature and pressure when setting the state of a PureFluid.
Completes r3213.
2014-10-08 12:42:15 +00:00
Bryan W. Weber
7c60182142 Allow None when setting the state of a PureFluid
Allow None as an option when setting the temperature and quality or
pressure and quality of a PureFluid. This mimics similar functionality
for Solutions.
2014-10-08 12:37:41 +00:00
Ray Speth
b0085eb58e [CTI] Check for correct number of coverage parameters
This detects errors such as providing two sets of coverage parameters as a
single list, rather than as a list with separate entries for each set of
coverage parameters.
2014-09-29 19:13:21 +00:00
Ray Speth
de9928977c [ck2cti] Preserve mechanism header comment block 2014-09-24 23:17:47 +00:00
Ray Speth
a3bba51f06 [ck2cti] Preserve comments in the REACTIONS section 2014-09-24 23:17:44 +00:00
Ray Speth
21e9892909 [Transport] Fix handling of default value for acentric_factor
If acentric_factor isn't specified in the CTI, don't include it when generating
the XML.
2014-09-23 02:20:57 +00:00
Ray Speth
8b4c5336ba [Cython/Reactor] Add Reactor keyword argument 'volume' 2014-09-23 02:20:55 +00:00
Ray Speth
f14cd6d471 [Cython/Reactor] Raise exception for unrecognized keyword arguments 2014-09-23 02:20:53 +00:00
Ray Speth
ab6ae72e0d Add missing reaction to "h2o2" mechanism
This mechanism, which is supposed to be the H2 mechanism extracted from GRI-3.0,
was actually missing the reaction H+O2+M <-> HO2+M. This updates the original
input file, regenerates h2o2.cti, and updates the blessed output file for one
test (which changed because the newer version of ck2cti actually retains the
given precision of the transport properties).
2014-09-23 02:20:49 +00:00
Ray Speth
eb468b6a48 [SCons] Fix setting 'python_module_loc' with minimal Python module 2014-09-18 22:59:05 +00:00
Ray Speth
606a18e951 [Cython/Thermo] Add mass/mole_fraction_dict methods
This complements the ability to set the composition using a dict when working
with phases with different sets of species.
2014-09-18 22:59:02 +00:00
Ray Speth
459ff956c2 [MixMaster] Fix crash when using Tcl 8.6
Tcl/Tk changed some operations which previously resulted in undefined behavior
into errors, including one case that occurred when updating the "Mixtures" menu
in MixMaster.

MixMaster now modifies the existing Menu when adding an item, rather than
completely regenerating it, which avoids this problem.

Fixes Issue 235.
2014-09-15 18:05:04 +00:00
Ray Speth
1ea0122c15 [Transport] Check for invalid 'geometry' flags
For those cases where the number of atoms in a molecule precludes certain
geometries, check to make sure that that the geometry flag is set
appropriately.
2014-09-15 18:05:00 +00:00
Ray Speth
a837dfdc6d [1D] Add 'clearStats' function for clearing accumulated solver stats 2014-09-07 21:17:00 +00:00
Ray Speth
38b5434fc4 [ck2cti] Expand paths containing '~' and '~user' 2014-09-07 21:16:54 +00:00
Ray Speth
8e0335e9b1 [ck2cti] Add line numbers for errors parsing transport data 2014-09-07 21:16:52 +00:00
Ray Speth
e65539833d [ck2cti] Fix error message produced when the input file is unreadable 2014-09-07 21:16:46 +00:00
Thomas Fiala
d6dd968891 [1D/Examples] Add new diffusion flame examples
These two examples show how to run sequences of diffusion flames while varying
certain parameters (pressure or strain rate). They make use of scaling rules to
provide improved initial guesses for the continuation runs, increasing
computational efficiency.

Resolves Issue 229.
2014-09-02 22:34:23 +00:00
Ray Speth
1e2ba1f0d2 [1D/Python] Fix spurious 'divide by zero' warning 2014-09-02 22:34:21 +00:00
Thomas Fiala
46231379c1 [1D/Python] Add solver warnings for diffusion flame solutions
Adds warnings that check if the solution of a counterflow diffusion flame is
reasonable (not extinct, and not too close to the boundaries of the domain).

Resolves Issue 231.
2014-09-02 22:34:18 +00:00
Ray Speth
22a6bb9ef2 [1D/Python] Fix initial profile generation for diffusion flames
Don't assume that the leftmost grid point is z = 0.
2014-09-02 22:34:16 +00:00
Thomas Fiala
68e84bdff7 [Python/1D] Add strain rate calculation for diffusion flames
Allows calculation of strain rate based on various definitions.

Resolves Issue 230.
2014-08-28 16:55:44 +00:00
Bryan W. Weber
f0bb0f8492 [Doc] Fix some Sphinx warnings
Comments are also added to note places where the function
signatures embedded by Cython produce warnings in Sphinx.
These warnings should be ignored until Sphinx supports this.
2014-08-26 22:04:59 +00:00
Bryan W. Weber
32d5d7b8b2 [Matlab] Fix build warnings about Contents.m 2014-08-26 22:04:50 +00:00
Bryan W. Weber
6bf39e87c4 [Matlab] Minor fixes to docs and screen output
Fix missing parameter docs in Matlab ReactorNet setTolerances. Fix missing semicolon in ThermoPhase display
2014-08-26 22:04:46 +00:00
Bryan W. Weber
eeab08d683 Allow auto conversion of Python examples on Windows
3to2 cannot be called as an executable on Windows, but it can be called
as a script. Assume that the 3to2 script is installed in
PYTHONROOT\Scripts, which is the default for installation by pip.
2014-08-25 18:41:56 +00:00
Ray Speth
907bbd8b79 Allow importing phases from XML or CTI strings 2014-07-30 16:59:51 +00:00
Ray Speth
4a1aee131d [Cython/Examples] Update surf_pfr to show reactor network reinitialization 2014-07-30 16:59:34 +00:00
Ray Speth
2b67ec4538 [Test] Add surface kinetics test based on the sofc.py example 2014-07-30 16:59:30 +00:00