Commit graph

5072 commits

Author SHA1 Message Date
Ray Speth
48101ea1f4 [Reactor] Remove unneeded functions from ReactorBase 2014-06-10 16:23:24 +00:00
Ray Speth
8b5ca80303 [Reactor] Implement reactor network reinitialization
Adds ReactorNet::reinitialize, which skips all one-time initialization and
re-uses the same CVODES integrator. The Reactor::syncState() method is
introduced for applying new initial conditions for individual Reactor objects.

This approach increases efficiency when solving many similar problems with short
integration times, for example when being used as the chemistry term integrator
in an operator-split CFD code.
2014-06-10 16:23:03 +00:00
Ray Speth
1437aade8c [Reactor] Refactor updateState and getInitialConditions implementations
Extract common parts related to surface species
2014-06-10 16:22:46 +00:00
Ray Speth
67de2fa793 [Reactor] Refactor re-implementations of Reactor::initialize
The base class methods does almost all the initialization needed for the derived
classes, so call that first and then do any additional steps needed.
2014-06-10 16:22:37 +00:00
Ray Speth
0da063cdef [Reactor] Refactor wall / surface chemistry evaluation
This creates a single implementation of the calculation of the contributions of
walls and surface chemistry to the governing equations for all reactor types.
2014-06-10 16:21:56 +00:00
Ray Speth
54c14c3ac1 Remove orphaned 'Cantera_legacy.h' file 2014-06-10 16:21:46 +00:00
Ray Speth
2b9f3b9913 Remove unused Doxygen input files 2014-06-10 16:21:37 +00:00
Ray Speth
1ea1e705f3 Remove redundant 'NotImplemented' exception class 2014-06-10 16:21:16 +00:00
Ray Speth
2558ec222d [Test] Use 'assertIn' and 'assertNotIn' where possible 2014-06-10 16:21:01 +00:00
Ray Speth
7f83a49e07 [Test] Fix some incorrect assertions 2014-06-10 16:20:53 +00:00
Ray Speth
baa787f7ac [Test] Use context handler form for 'assertRaises' 2014-06-10 16:20:31 +00:00
Ray Speth
be9882a765 [ck2cti] Import the resulting mechanism to complete validation
This relaxes the need to perform redundant validation in ck2cti.
2014-06-06 00:18:18 +00:00
Ray Speth
c29ae666c0 [CTI] Allow non-integer atomicity
This allows specification of lumped species with average compositions,
such as C10.6H21.8.
2014-06-06 00:18:13 +00:00
Ray Speth
83e38480d6 Throw exceptions instead of calling std::exit after an error
By throwing an exception, Cantera is better behaved when used within other
applications, e.g. as in the case of the Matlab and Python interfaces.
2014-06-06 00:17:58 +00:00
Ray Speth
40290736e0 [Reactor/Samples] Cleanup of kinetics1.cpp
Change this example to use IdealGasConstPressure reactor, which
is the preferred reactor model for this kind of simulation.
2014-06-06 00:17:53 +00:00
Ray Speth
51d0654e47 [Reactor] Add IdealGas reactor types to zerodim.h 2014-06-06 00:17:49 +00:00
Ray Speth
a583949457 [Reactor] ReactorNet::addReactor takes a reference instead of a pointer
This reflects how the function is usually used. The old signature is now
deprecated, as is the extra argument for transfering "ownership" to the
ReactorNet object.
2014-06-06 00:17:41 +00:00
Harry Moffat
199cd4ceba Changes in InterfaceKinetics to allow for downstream hooks to add in the capability to model
arbitrarily fit open circuit potentials for intercalating electrodes.
2014-06-05 22:43:41 +00:00
Harry Moffat
f2130b5e3f Added a missing function 2014-06-05 22:41:55 +00:00
Harry Moffat
f3a0092b42 Fixed a error introduced by Speth that caused the brine phase pop problems to fail. 2014-06-05 22:40:20 +00:00
Ray Speth
ea3f74eb27 [Thermo] 'report' only prints species with non-trivial mole fractions
The threshold for printing species is a new, optional parameter to the
'report' function. If any species are excluded, the total number of
minor species and their aggregate mass and mole fraction are printed.
2014-06-03 16:54:15 +00:00
Ray Speth
dbfe428437 Fix compiler warnings
These were mostly related to changes from r2957.
2014-06-03 16:53:40 +00:00
Ray Speth
d38e4553ec Eliminate 'goto' in VCS_SOLVE::vcs_inest 2014-06-03 16:53:34 +00:00
Ray Speth
b5396837b2 Make use of std::min, std::max, and clip 2014-06-03 16:52:43 +00:00
Ray Speth
d3667cae3c [Doc] Fix reference that wasn't being parsed correctly 2014-06-03 16:52:22 +00:00
Ray Speth
a5d735f047 [Reactor] Disable verbose output by default, even in "debug mode" 2014-06-03 16:52:09 +00:00
Ray Speth
0e9ca0fc4b [Reactor] Eliminate tracking of Reservoirs by ReactorNet
Since Reservoirs don't have any equations to solve, there is no reason to add
them to a ReactorNet.
2014-06-03 16:52:00 +00:00
Ray Speth
2d1003271d [Reactor] Replace ReactorNet::m_size with m_start
A small simplification since the offset into the global solution vector is
usually what we're interested in.
2014-06-03 16:51:47 +00:00
Ray Speth
fb588d873b Remove deprecated / unfinished 'spectra' classes 2014-05-30 19:23:37 +00:00
Ray Speth
46a36c11cb Eliminate redundant VCS vector functions
These functions just duplicated features of the standard library.
2014-05-30 19:23:25 +00:00
Ray Speth
c6cefd6df8 Replace IntStarStar with Array2D 2014-05-30 19:23:16 +00:00
Ray Speth
b569b842d0 Replace DoubleStarStar with Array2D 2014-05-30 19:23:03 +00:00
Ray Speth
3e39423a42 [Doc] Fix name of 'ck2cti' in man page 2014-05-30 19:22:58 +00:00
Ray Speth
2ee3edbe39 [SCons] Move man pages to 'share'
This fixes compatibility with Homebrew. With the default prefix '/usr/local',
this puts the man pages in /usr/local/share/man/man1/, which is usually on the
man path on other OSes as well.
2014-05-29 18:34:49 +00:00
Ray Speth
548b5ca468 Remove cti2ctml binary
Use of cti2ctml binary can be replaced with using ctml_writer.py script
directly.
2014-05-29 18:34:44 +00:00
Ray Speth
f85e49a87b [Doc] Update methods for doing manual cti to ctml conversions 2014-05-29 18:34:38 +00:00
Ray Speth
f80db6c08d Make function signatures independent of DEBUG_MODE 2014-05-27 02:54:34 +00:00
Ray Speth
ddfc7db080 Make helper functions for pieces of vcs_solve_TP main loop 2014-05-27 02:54:24 +00:00
Ray Speth
ad12f392ce Some cleanup of vcs_solve_TP
Use local variables where possible. Remove unreachable code.
Move repeated code out of if/else blocks. Flatten nested if statements.
2014-05-27 02:54:11 +00:00
Ray Speth
32276b1fda Refactor vcs_solve_TP to eliminate goto
This contains just the changes to the flow control to give the same
behavior as the original implementation. Additional refactoring
still to come.
2014-05-27 02:54:07 +00:00
Ray Speth
3e3557e756 [Test] Add more tests of the VCS equilibrium solver
These tests are based on the 'plasma_equilibrium.py' example, and include
a fairly large number of phases, some of which are only present for certain
temperature ranges.
2014-05-27 02:54:02 +00:00
Ray Speth
40e748a2d1 Set printLvl = loglevel for VCS solver since it doesn't use loglevel 2014-05-27 02:53:47 +00:00
Ray Speth
373e4ae565 Remove goto and manual memory management from MultiPhase::equilibrate 2014-05-27 02:53:42 +00:00
Ray Speth
4b9e4da822 Fix some compiler warnings 2014-05-27 02:53:35 +00:00
Ray Speth
712293e415 Change debug code to avoid ifdefs where possible
Use "if (DEBUG_MODE_ENABLED)" instead of "#ifdef DEBUG_MODE". This makes
it easier to see the flow control logic, and the compiler will optimize
out the always-false conditionals when DEBUG_MODE_ENABLED is 0, so there
isn't any speed penalty.
2014-05-27 02:53:22 +00:00
Ray Speth
7ec4531ae0 Removed debugging code that didn't actually do anything 2014-05-27 02:53:16 +00:00
Ray Speth
6c0cea5ee4 Standardize function used for writing a line of repeated characters 2014-05-27 02:53:06 +00:00
Ray Speth
789574ac80 Remove commented-out code 2014-05-27 02:52:21 +00:00
Ray Speth
4dcdc01fb8 [VCS] Use local variable declarations where possible 2014-05-23 22:47:03 +00:00
Ray Speth
217b396ec5 [Python] Fix to conversion of samples from Python 3 to Python 2
Some calls to the print function weren't being converted to print statements
correctly by 3to2, so now we use the alternative fix, which is to use the
backported print function.

Fixes Issue 216.
2014-05-23 22:46:59 +00:00