Commit graph

223 commits

Author SHA1 Message Date
Ray Speth
83097b3860 Consolidated definitions of repeatedly-used constants
"MIN_X" and "TINY" are replaced by "Tiny". "xxSmall" is replaced with
"SmallNumber".
2013-01-11 22:55:46 +00:00
Victor Brunini
9b6b65fe04 Add function to DenseMatrix that multiplies two square matrices. 2013-01-07 18:18:10 +00:00
Ray Speth
205706f5dd [Reactor] Avoid a segfault when using phases with no Kinetics 2013-01-07 18:08:23 +00:00
Ray Speth
1e43e4f333 Added a version of writelog which takes the log level as an argument 2012-12-30 00:17:08 +00:00
Ray Speth
6b8986d0d0 Fixed const-ness of PecosTransport virtual functions
These now match the function signatures in the base class.
2012-12-26 23:56:10 +00:00
Ray Speth
46a8b3052f Use size_t instead of int in InterfaceKinetics 2012-12-26 23:56:07 +00:00
Harry Moffat
eab8781ea7 Added back ability to get transport parameters from transport objects.
Added back read and write of named XML array blocks.
Fixed an error in IonsFromNeutralVPSSTP.
2012-12-21 01:18:28 +00:00
Ray Speth
8587abf17f Fixed an uninitialized variable in Domain1D 2012-12-18 00:13:48 +00:00
Ray Speth
1e91bd59af [1D/Cython] Set pressure when restoring solution from XML file
This partially addresses Issue 90.
2012-12-18 00:10:48 +00:00
Ray Speth
14426bfc86 [1D] Added loglevel argument to control output from save and restore
Passing loglevel=0 to Sim1D::save or Sim1D::restore will suppress all output
from these functions. The default loglevel maintains the normal level of output.
2012-12-18 00:09:29 +00:00
Victor Brunini
95e66cd5ff Get rid of static variables in member functions. 2012-12-17 16:14:14 +00:00
Harry Moffat
ea25de7fe7 Continuing transfering LiquidTransport changes, doing bugfixes, and
qualifying against our testsuite.
2012-12-15 00:49:14 +00:00
Victor Brunini
bd653e357f Revert change to LiquidTransport. 2012-12-13 22:16:50 +00:00
Victor Brunini
749f988e52 Convert LiquidTransport to just store a pointer to the external
gradient (T, X, V) values that it uses to compute fluxes. These
are never changed by the LiquidTransport object so there is no
reason to have them stored locally rather than just holding a pointer
to the data.
2012-12-13 22:15:35 +00:00
Victor Brunini
2eba1ee7c8 PDSS_IonsFromNeutral does not own the neutralMoleculePhase_ pointer
and the state of the neutralMoleculePhase_ is updated by the
VPSSIonsFromNeutral phase object that the PDSS_IonsFromNeutral
species object belongs to. Remove neutralMoleculePhase_->setState
calls from PDSS_IonsFromNeutral to avoid duplicate work, and make
it a const * to reflect that.
2012-12-13 22:15:14 +00:00
Victor Brunini
d4d1093957 Performance improvements focused on Stefan-Maxwell liquid transport
model for molten salts.

Summary:
- Division is expensive, replace repeated division with multiplication
  by stored 1/x.
- New and delete are expensive, make working vectors in some functions
  static so that they are not repeatedly instantiated and deleted.
- Reorder a few loops to reduce computation and hopefully cache misses.
2012-12-13 22:14:36 +00:00
Victor Brunini
4f41718e5b Make all ThermoPhase setState functions virtual. 2012-12-13 22:14:02 +00:00
Ray Speth
b4f34045a8 [1D] Added a minimum grid spacing parameter 2012-12-06 17:31:44 +00:00
Ray Speth
347029d06a [1D] Added loglevel for saving residual components
At loglevel 8, the residual after each Newton step, set of time steps, or grid
refinement is saved to 'debug_sim1D.xml'.
2012-12-06 17:31:35 +00:00
Ray Speth
ecb930e9f7 [1D] Added a nSpecies() method to Bdry1D 2012-12-04 20:28:43 +00:00
Harry Moffat
c6f7abbf2f Fixed a serious error in InterfaceKinetics that had crept into this branch.
Started upgrade/update of equilibrium solver
       - Fixed numerical jacobian calculation of the ln activity coefficients.
2012-11-29 02:18:05 +00:00
Victor Brunini
c3233c1355 Update TransportFactory to allow the specification of the number of
dimensions in the problem and default it to 1. At present this is
only passed through to the LiquidTransport constructor.

Remove LiquidTransport member m_nDim since the base Transport class
already stores m_nDim.

Don't set m_nDim to 1 in LiquidTransport constructor, it is set by
the Transport constructor.
2012-11-26 20:19:57 +00:00
Ray Speth
7ed2a02953 StFlow::_getInitialSoln now sets the solution to a valid thermodynamic state
This fixes errors that occured when the "showSolution" method was called before
explicitly setting the initial solution profile.
2012-11-14 21:07:13 +00:00
Victor Brunini
7d8a61baf1 Clean up function prototypes to avoid 'a is hidden by b' warnings
where the subclass prototype had an int and the super had a size_t
for a virtual function of the same name.
2012-11-14 00:04:05 +00:00
Victor Brunini
28171eeece Update the definition of getSpeciesFluxesES to use all size_t
instead of int to match the definition for the base Transport class.
Prior to this LiquidTransport::getSpeciesFluxesES was not overriding
the virtual Transport::getSpeciesFluxesES because the prototypes
differed.
2012-11-13 21:59:11 +00:00
Harry Moffat
08a41f191c Added back constructPhaseFile() and constructPhaseXML().
All molten salt problems were broken and some brine problems were broken.
2012-11-07 23:51:30 +00:00
Harry Moffat
83391db4fe Added back Cantera.h
Note in the near future, we'll require that all Cantera code include this file so that the environment may be set up correctly.
2012-11-07 23:41:58 +00:00
Victor Brunini
7c70568bb3 Clean up compiler warnings. 2012-11-07 21:08:56 +00:00
Ray Speth
fe6b5d3c0b Changed the ordering of Reactor sensitivity coefficients
The order now matches the order in which the corresponding sensitivity reactions
are added to the ReactorNet, regardless of the order in which Reactors and Walls
are added to the network.

Sensitivity parameter names can be accessed using the "sensitivityParameterName"
method of ReactorNet, and the "sensParamID" methods of Reactor and Wall have
been removed as they no longer meaningful.
2012-11-02 20:07:25 +00:00
Ray Speth
e34ac55f4f [Cython] Added sensitivity analysis to Reactor / ReactorNet 2012-11-02 20:07:15 +00:00
Ray Speth
845b73405e Merge bug fixes from 2.0 maintenance branch 2012-10-30 15:46:10 +00:00
Ray Speth
86e7723c26 Fixed sign error in isothermalCompressibility of ideal phases 2012-10-30 15:30:27 +00:00
Ray Speth
af10c288b4 Removed some unused member variables from PDSS classes 2012-10-24 15:46:57 +00:00
Ray Speth
436f38c6a6 Removed some unused member variables from Transport classes 2012-10-24 15:46:45 +00:00
Ray Speth
120600c625 Removed some unused member variables from ThermoPhase classes 2012-10-24 15:46:31 +00:00
Ray Speth
5e34beb4a8 Fixed incorrectly defined duplication method of ConstDensityThermo 2012-10-24 15:46:22 +00:00
Ray Speth
c9ba50ecc6 Removed unimplemented method VPSSMgr_General::err 2012-10-24 15:46:15 +00:00
Ray Speth
94d08f1d5e Removed unnecessary casts from object duplication functions 2012-10-24 15:45:33 +00:00
Ray Speth
3df93b8f4c Removed some dead code 2012-10-24 15:45:08 +00:00
Ray Speth
f4d35e4bd7 Always pass "const std::string&" instead of "const std::string" 2012-10-24 15:44:54 +00:00
Ray Speth
1d19803885 Pass "const std::string&" instead of "std::string" when possible 2012-10-24 15:42:51 +00:00
Ray Speth
d2ac071660 Fixed a few missing #includes 2012-10-24 15:42:29 +00:00
Ray Speth
e9026fb683 Removed the broken/unused PID_Controller class 2012-10-12 20:34:56 +00:00
Ray Speth
3f17786c01 Removed some commented-out includes 2012-10-12 20:34:48 +00:00
Ray Speth
c404c31879 Eliminated unnecessary string copying in Reactor / ReactorNet 2012-10-12 20:34:41 +00:00
Ray Speth
11a11bea79 Removing deprecated / nonfunctional methods from Reactor
These functions / variables are for driving the time integration, which is
handled entirely by ReactorNet.
2012-10-12 20:34:33 +00:00
Ray Speth
5252c41a80 [Cython] Full implementation of zero-dimensional reactor networks 2012-10-10 18:25:20 +00:00
Ray Speth
dec608b811 Fixed ReactorNet::setInitialTime to actually set the initial integrator time
Removed the optional argument to ReactorNet::initialize so that setInitialTime
is the only interface for setting the integrator start time, and made initialize
protected to make it clear that it does not need to be explicitly called by the
user.
2012-10-10 18:25:12 +00:00
Ray Speth
5f2ec1f11d Added ability to switch between transport models in the Cython module 2012-09-06 19:59:45 +00:00
Ray Speth
8afc669b67 Proof-of-concept for a Python interface written using Cython
This module is compatible with both Python 2 and Python 3. Unlike the existing
Python module, this module directly utilizes the Cantera C++ interface,
bypassing the "clib" compatibility layer, as well as all of the direct use of
the Python C API.

Currently, this contains just enough to instantiate a ThermoPhase object from an
XML input file.
2012-09-06 19:55:25 +00:00