Commit graph

6665 commits

Author SHA1 Message Date
Ray Speth
dfd4b7e671 [Python/1D] Automatically increase domain width for free flame
If the domain is narrow with respect to the flame width, there can be
significant temperature gradients at the boundary, which lead to either
incorrect flame speeds or solver failures.

When the 'auto' option to FreeFlame.solve is specified, the solver will now
check the gradients at the ends of the domain after each steady-state solve and
increase the width if necessary.

Fixes #385
2018-01-06 21:26:53 -05:00
Ray Speth
7a314d3124 [Python/1D] Callbacks can be disabled by setting to None 2018-01-06 21:26:53 -05:00
Ray Speth
4b352751f5 [Python/1D] Make callbacks accessible outside Cython 2018-01-06 21:26:53 -05:00
Bryan W. Weber
3e39a0bc3d [CI] Remove python_package options from Travis build command 2017-12-18 15:47:03 -05:00
Bryan W. Weber
4e6af27edf [SCons] Remove the error when python_package and pythonX_package match
Make it a warning instead of an error
2017-12-18 15:47:03 -05:00
Bryan W. Weber
5d599bb680 [SCons] Configure the minimal Python interface build
Adds a new internal-only option for the pythonX_package variables,
'minimal-default'. This value is set when pythonX_package has not been
configured by the user (i.e., it started as default) and checking for
Cython or NumPy fails, so we can't build the full interface.
2017-12-18 15:47:03 -05:00
Bryan W. Weber
9c9ee9e919 [SCons] If python_package is set to default, print fewer warnings
If python_package is default and pythonX_package is present (where X is
the same version of Python as python_package), prefer the
pythonX_package options and don't warn quite so much
2017-12-18 15:47:03 -05:00
Bryan W. Weber
9f4590bc6f [SCons] Switch the order of python version and cython checks
Check for the python_package version of Python and configure the
pythonX_package option before checking for Cython
2017-12-18 15:47:03 -05:00
Bryan W. Weber
c233ddcd30 If both pythonX_package options are set ignore the python_package option 2017-12-18 15:47:03 -05:00
Bryan W. Weber
43b42e9942 [SCons] Delete unnecessary python_message variable 2017-12-18 15:47:03 -05:00
Bryan W. Weber
f824b20fe2 The usersitepackages variable is not used anymore so don't set it 2017-12-18 15:47:03 -05:00
arghdos
3933a943dc Add missing number prefix 2017-12-06 15:00:50 -05:00
Steven DeCaluwe
89fded32d4 Fixes ConstDensityThermo::standardConcentration()
`ConstDensityThermo::standardConcentration(k)` is now calculated
as `density()/molecularWeight(k)`, rather than the previously
incorrect `molarDensity()`.

Note that this causes a problem for any species where
`molecularWeight(k)=0` (i.e. vacancies).  Such species should be
avoided, in this phase model.

For that reason, `sofc-test.xml` is changed so that the oxide bulk
is modeled as an `IdealSolidSolution`
2017-12-06 10:57:15 -05:00
Ray Speth
6cd7bf160f Bump development version to 2.4.0a2 2017-12-06 10:52:59 -05:00
Ray Speth
1eebd3efdb [Equil] Fix invalid memory access in VCS solver
Before bba0d8edf, the vector m_molNumSpecies_new was of a size greater than
m_nsp, with elements m_nsp through the end always filled with zeros. Thus the
check removed here always passed. In bba0d8edf, the vector size was reduced to
be the correct size (m_nsp), so this resulted in this check accessing
unallocated memory, causing the check to fail randomly in the TestKOH_Equil
test. The resulting exception was always caught internally, so the solver wasn't
returning incorrect results, but the non-determinism was leading to unexpected
changes in code coverage reports.
2017-12-05 22:26:45 -05:00
Bryan W. Weber
17dfa2dd48
Use pip2 explicitly to install dependencies on TravisCI
Apparently, some change in Homebrew caused pip to go missing on macOS,
so use pip2 to fix that
2017-12-03 09:23:44 -05:00
Bryan W. Weber
07409dea59
The conda GCC compilers aren't called gcc, they're called gnu-cc
Check for gnu-cc in the CC variable to catch this case
2017-12-03 09:23:44 -05:00
Bryan W. Weber
7054a7bb3d
If Cython can't be imported, the cython_version is undefined
This results in a NameError and building fails. Change to check for one
exception at a time, with the relevant error message.
2017-12-03 09:23:44 -05:00
Ray Speth
4a4886f63e Generate setup_cantera.csh for use with csh/tcsh
Resolves #453
2017-12-02 20:03:15 -05:00
Ray Speth
deeaaed03f [Reactor] Fix using pure substances near temperature limits
Fixes #475
2017-12-02 19:19:51 -05:00
Ray Speth
2ac8a0ef08 [Thermo] Use min/max temperatures from equation of state
The values in the liquidvapor.cti should be ignored, since this thermo data is
not actually applicable -- it is just used to set the reference state.
2017-12-02 19:19:51 -05:00
Ray Speth
501b5fd1f5 [test/ck2cti] Add tests for negative reaction orders 2017-12-02 19:18:59 -05:00
Ray Speth
4771874c75 [ck2cti] Allowing negative reaction orders requires '--permissive' option 2017-12-02 19:18:59 -05:00
Jeff Santner
8f02c777a5 [ck2cti] Allow negative reaction orders, with warning 2017-12-02 19:18:59 -05:00
Ray Speth
0d01d031a9 [Examples] Prevent spurious empty figures in IC engine example 2017-12-02 17:41:05 -05:00
Ray Speth
6f564e6101 [Examples] Fix error in IC Engine example CO calculation 2017-12-02 17:35:25 -05:00
Bryan W. Weber
831239633d Fix dependency problem with matlab library
Building in parallel would error out because the macOS Matlab library
was relying on the static Cantera library before that was finished.
2017-11-26 16:48:40 -05:00
Bryan W. Weber
2f03a1e531 Reformat postInstallMessage code to be easier to read in SConstruct 2017-11-26 16:48:40 -05:00
Bryan W. Weber
26216e9adc Fix 3to2 conversion of NonIdealShockTube example
The triple quoted strings made 3to2 think that was the module docstring,
so it was putting __future__ imports in the wrong places
2017-11-26 16:48:40 -05:00
Bryan W. Weber
77ee76c5f3 Simplify checking for 3to2
Switch to importing the lib3to2 as a check, which is platform agnostic
and doesn't depend on how 3to2 was installed. Also, take advantage of
the fact that the 3to2 converter recurses by default to avoid spawning
a bunch of subprocesses. Finally, don't depend on the location of the
3to2 script and just use the library directly to do the conversion.
2017-11-26 16:48:40 -05:00
Bryan W. Weber
11943bbc6f Update options for Travis Python tests 2017-11-26 16:48:40 -05:00
Bryan W. Weber
6ca67b4845 Update documentation for new Python configuration options 2017-11-26 16:48:40 -05:00
Bryan W. Weber
2bc4d09da3 Fix substitution of setup_cantera and ctpath.m
Use Python 3 variables by default, and Python 2 only if Python 3 isn't
being built
2017-11-26 16:48:40 -05:00
Bryan W. Weber
94ea9b585f Update SConstruct to recognize that Python 3 might be running SCons
Update and make more consistent the specification of Python package
building. Since SCons can be run by Python 3 now, we cannot assume that
the Python running SCons is Python 2. This changes a bunch of
assumptions in SConstruct about where things should be built or
installed. This commit addresses those assumptions by making the options
for Python 2 and Python 3 symmetric.
2017-11-26 16:48:40 -05:00
Bryan W. Weber
1635cd2e04 Use the minimal Python interface for tests when others are not built
If no full or minimal Python interface is being built, copy the minimal
interface into the build directory and use the sys.executable to run it,
so the tests that require CTML or CTI conversion can run.
2017-11-26 16:48:40 -05:00
Bryan W. Weber
136c86636e Make the minimal Python interface compatible with Python 3
Use relative imports in the package, compatible with Python 2 and 3
2017-11-26 16:48:40 -05:00
Bryan W. Weber
d1f9b9393a Remove testing related files if test-clean is specified 2017-11-26 16:48:40 -05:00
Bryan W. Weber
16fd18315c Remove HAS_NO_PYTHON configuration variable
This variable is not needed since in the two places its used we do a
runtime check of the presence of the Python interface anyways
2017-11-26 16:48:40 -05:00
emccorkle
684262e945 [SCons] Fix Python 3.6 compatibility
The build was failing with:
  TypeError: 'mappingproxy' object does not support item assignment
2017-10-28 20:12:14 -04:00
Evan McCorkle
60d2075492 Update to gtest-1.8.0.
This release included the merger of gtest and gmock. Cantera is now
building gmock in addition to gtest in order to take advantage of
gmock matchers.
2017-10-28 20:07:14 -04:00
Evan McCorkle
83ffd844d1 Added test coverage for AnyValue move/copy assignment. 2017-10-25 09:30:22 -04:00
Evan McCorkle
87a7deb35d Added macro to conditionally exclude boost from API. 2017-10-25 09:30:22 -04:00
Evan McCorkle
686250e51f Partial pimpl for AnyValue to hide boost on API.
- boost now only included in AnyMap.inl.h (within include/cantera)
2017-10-25 09:30:22 -04:00
Evan McCorkle
f8d183220c Move AnyValue template definitions to inl file 2017-10-25 09:30:22 -04:00
Evan McCorkle
713b9cc23c Wrapped common uses of boost string algorithms.
- Limits propagation of boost header and namespace.
2017-10-25 09:30:22 -04:00
Evan McCorkle
6844e52713 Allow building tests with msvc-12.0.
Fixes the appearance of C2797 (list initialization inside member
initializer list or non-static data member initializer is not
implemented). This was preventing building/running tests with
msvc_version=12.0. It was fixed using Visual Studio 2013 (12.0)
Update 5.
2017-10-20 20:33:38 -04:00
Evan McCorkle
e921cb89c8 Allow default build with msvc-12.0.
Fixes the appearance of C2536 (cannot specify explicit initializer for
arrays). This was preventing a build with msvc_version=12.0. It was
fixed using Visual Studio 2013 (12.0) Update 5.
2017-10-20 20:33:38 -04:00
Ray Speth
680d0841b5 [Doc] Fix typo in BibTeX entry 2017-10-08 20:42:35 -04:00
Ray Speth
405750f61d Fix compilation errors due to implicit dependence on <functional>
Some recent versions of libstdc++ require this header for the declaration of
std::function
2017-10-05 22:58:19 -04:00
Ray Speth
21c2215117 [Equil] Eliminate switching between dimensional / nondimensional in VCS
The solver always works in nondimensional units
2017-10-05 22:58:19 -04:00