Commit graph

940 commits

Author SHA1 Message Date
Ray Speth
0707caaee6 [SCons] Check for a supported version of Python 2018-09-19 17:59:59 -04:00
Ray Speth
33591282f5 [SCons] Use Cython from the targeted copy of Python
Use the Cython module from the Python installation specified by
'python_cmd', rather than the Python installation that is running
SCons. This allows complilation of Cantera for Python versions that
aren't supported by SCons (e.g. Python 3.4).
2018-09-19 17:59:59 -04:00
Ray Speth
d6da006e3e [SCons] Only build the Python package for Python 3.x 2018-09-19 17:59:59 -04:00
Ray Speth
b0b66d7211 [Python] Make transport properties accessible with the Water() function 2018-09-07 23:24:23 -04:00
Ray Speth
e4362d37e7 [Kinetics] Check for non-existent species in reaction orders
When the nonreactant_orders option was enabled, specifying reactant orders for
species which were not present in the phase previously resulted in out-of-bounds
memory access.
2018-08-28 16:40:43 -04:00
Ray Speth
fefc008ed2 [Matlab] Fix definition of isFlow
Caused most Matlab flame simulations to fail, e.g. those using
CounterFlowDiffusionFlame.m or flame.m. Fixes regression introduced in c1067aa.

Fixes #554
2018-08-23 16:45:28 -04:00
Ray Speth
af51a61ab1 [Python] Fix building MSI for Python 3.7 module
Workaround for https://bugs.python.org/issue34251 for Python 3.7.0
2018-08-20 18:45:57 -04:00
Bryan W. Weber
1ca6c5eb40
Change all github.io links to cantera.org links 2018-08-20 15:06:28 -04:00
Ray Speth
dc5ec06a0c [Python/Examples] Rewrite combustor.py to be more useful
This updated example eliminates the complicated and inefficient "hydrogen
radical igniter" as a method for starting a well-stirred reactor.
2018-08-17 14:17:51 -04:00
Ray Speth
2f67c9969d [Python/Examples] Add a more useful example of time-dependent mass flow rate
In this example, a time-dependent mass flow rate function is used to inject a
specific fuel mass into a reactor. This is a more practical use case for this
capability than the fictitious hydrogen radical igniter used in combustor.py.
2018-08-17 14:17:51 -04:00
Ray Speth
a68c048bfa [Thermo] Relax warning threshold for heat capacity discontinuities
Discontinuities in heat capacity, in contrast to enthalpy and entropy, are less
of a problem and are not always indicative of problems with a mechanism. As
such, a looser tolerance on this quantity is reasonable.

This threshold eliminates warnings from the nDodecane_Reitz.cti input file included with Cantera.
2018-08-17 14:17:51 -04:00
Ray Speth
d3f49e74cb [Python] Fix display of information from errors in callback functions 2018-08-17 14:17:51 -04:00
Ray Speth
820b9de4b0 [Test/1D] Try to make TestIonBurnerFlame more reliable 2018-08-14 14:58:18 -04:00
Ray Speth
331e11366a [1D/Python] Respect 'refine_grid' option when using 'auto' solver 2018-08-14 14:31:32 -04:00
Ray Speth
57b38ce40f [1D] Use tighter tolerances and bounds for charged species
Looser tolerances can lead to instabilities, especially in cases where negative
concentrations of charged species are found at the end of the first solving
stage.
2018-08-14 14:31:13 -04:00
Ray Speth
166249869b [Python/1D] Rename IonFlameBase.set_solvingStage to set_solving_stage
Lowercase with underscores matches the PEP8 style used elsewhere
2018-08-10 18:15:36 -04:00
Ray Speth
a54ab2f3ef [Doc] Update docs related to StFlow restructuring 2018-08-10 18:15:36 -04:00
Ray Speth
ac8612f36b [Doc] Add IonFlow and related classes to Sphinx docs 2018-08-10 18:15:36 -04:00
bangshiuh
ee633f3e16 [1D] Change Poisson equation to first-order difference 2018-08-10 18:15:36 -04:00
bangshiuh
5082a212c4 [1D/Examples] Add example burner_ion_flame 2018-08-10 18:15:36 -04:00
bangshiuh
2527869536 [1D/Python] Create BurnerIonFlame and add test
Create a base class (IonFlameBase) for both IonFreeFlame and BurnerIonFlame, and
use the set_axisymmetric_flow() and set_free_flow() methods to select the flow
type.

Also combines FreeFlow and AxisymmetricStagnationFlow classes into class
IdealGasFlow.
2018-08-10 18:15:36 -04:00
bangshiuh
a5762ea6b6 [1D] Add function to set flow type and make IonFlow inherit from StFlow 2018-08-10 18:15:36 -04:00
Ray Speth
fb68cae145 [Thermo] Keep PureFluidPhase state data consistent
Previously, calls to setTemperature, setDensity, and setState_TR did not result
in the underlying Substance object being updated. In addition, the
isothermalCompressibility and thermalExpansionCoeff methods did not synchronize
the state.

Now, setting the state of the PureFluidPhase object always sets the state of the
Substance object, and no synchronization is required in property calculation
functions.
2018-08-03 15:18:30 -04:00
Ray Speth
4911539b56 [1D] Refine grid after expanding domain width
The test for a sufficiently wide domain short circuits the normal control logic
which makes a call to refine() after each successful steady-state solve. This
caused failures for certain cases where sucessive solutions on wider grids with
only a few points still failed to satisfy the gradient criterion at the edges of
the domain.
2018-08-02 17:51:31 -04:00
Ray Speth
e79cf6f8cb [Transport] Add temperature dependence of rotational relaxation
Results in increase in mixture-averaged thermal conductivity of ~1% or less, and
a similar increase in laminar flame speeds, at least for some test cases.
2018-07-30 10:47:49 -04:00
Bryan W. Weber
d33e67c36c [Doc] Put titles on raw links to main site 2018-07-29 17:47:14 -04:00
Bryan W. Weber
c28bc0235f Fix missing raw string in Cython docstring 2018-07-29 17:47:14 -04:00
Bryan W. Weber
d2252037c6 Fix docstring of Matlab CounterFlowDiffusionFlame.m 2018-07-29 17:47:14 -04:00
Bryan W. Weber
549463683d Fix Sphinx and Doxygen warning messages about moved content 2018-07-29 17:47:14 -04:00
Bryan W. Weber
d57f1d147d Minor formatting change in GRI30 Matlab docstring 2018-07-29 17:47:14 -04:00
Bryan W. Weber
e7f346cddf Fix references to examples in docstrings
Seems like the best bet is an absolute link, since the examples are no
longer in the Sphinx-generated docs
2018-07-29 17:47:14 -04:00
Ray Speth
1b605133d8 [Transport/Test] Add test of CK_Mode 2018-07-11 15:41:42 -04:00
BangShiuh
5c783c708f [Transport/Test] Add tests for IonTransport properties 2018-06-15 10:44:46 -04:00
BangShiuh
1245a694e5 [Test/1D] change TestIonFlame to use IonGasTransport 2018-06-15 10:44:46 -04:00
BangShiuh
fa9b9374cf [1D] Add polyfit for electron transport profile 2018-06-15 10:44:46 -04:00
bangshiuh
eeb27d84a9 [1D] Remove charge neutrality solver option from IonFlow 2018-06-15 10:44:46 -04:00
BangShiuh
b7e32e4604 [Transport] add dispersion coefficient and quadrupole polarizability 2018-06-15 10:44:46 -04:00
Ray Speth
4b4128aebd [Doc] Note requirement to call modifySpecies and modifyReaction
Modifying Reaction and Species objects alone does not affect Kinetics or
ThermoPhase objects unless the modified objects are passed back to
modifyReaction or modifySpecies.
2018-06-07 16:24:19 -04:00
Ray Speth
a1c12b4a3b [Transport] Implement UnityLewisTransport::getMixDiffCoeffsMass 2018-06-07 13:52:26 -04:00
Ray Speth
3c3ef10f93 [1D/Test] Add flame test for unity Lewis number transport 2018-06-07 13:52:26 -04:00
Armin Wehrfritz
29a3c19399 [Transport] Add test for unity Lewis number transport model 2018-06-07 13:52:26 -04:00
Ray Speth
3c978cdff6 [Equil] Deprecate get/setElementPotentials 2018-06-06 11:54:14 -04:00
Jeff Santner
a9ad75e974 [Python] Add get_equivalence_ratio function 2018-05-18 13:06:51 -04:00
Ray Speth
277aa0b913 [ck2cti] Allow convertMech function to be called multiple times
Each call to convertMech now creates a new Parser object to do the conversion,
rather than requiring the user to do so themselves.

Fixes #528.
2018-05-16 13:50:33 -04:00
Nick
cc93ce62ca Add cython func defn to expose species viscosity & test equivalence to single-species species viscosity 2018-04-24 21:54:36 -04:00
Ray Speth
d09161716f Fix duplicate key check in parseCompString
The check was being done at a stage where the token being checked could be just
a part of a key (if the key contained a colon), where this partial key could
correspond to another valid key.

Fixes #525
2018-04-13 15:33:35 -04:00
Bryan W. Weber
fde5051131
[Test/1D] Test that solving in inconsistent transport state errors
If Soret diffusion and mixture-averaged transport properties are
enabled, test that an exception is thrown. Also test that
multicomponent diffusion and Soret diffusion can be enabled/disabled
in either order. Also test that the automatic flame solver
correctly disables Soret diffusion.
2018-03-13 14:32:09 -04:00
Bryan W. Weber
4bd5e92694
[1D] Check for Soret diffusion in auto flame solver
Don't use Soret diffusion for the initial solve steps, and re-enable it
at the end if the user desires
2018-03-13 14:32:09 -04:00
Bryan W. Weber
a03afbd56e
[1D] Throw an exception if transport state is inconsistent
The user can enable Soret (thermal) diffusion or multicomponent
transport in either order, but attempts to solve flame problems with
Soret enabled and the mixture-averaged transport approximation will
result in an error
2018-03-13 10:11:52 -04:00
Ray Speth
c9b0bce8b9 [Thermo] Preserve constant property pair when multiplying Quantity 2018-03-09 22:28:48 -05:00