Commit graph

485 commits

Author SHA1 Message Date
Ray Speth
6c0cea5ee4 Standardize function used for writing a line of repeated characters 2014-05-27 02:53:06 +00:00
Ray Speth
44e7dd91ad [Equil] Eliminate 'mlequ' and 'gaussj' in favor of using LAPACK 2014-05-21 16:35:02 +00:00
Ray Speth
c81de1d08e Make PDSS::temperature() virtual
This reflects how it's used, being overridden in several derived classes.
2014-05-21 16:34:51 +00:00
Ray Speth
08e9d94ad6 [Thermo] Remove unimplemented overrides of getParameters/setParameters 2014-05-21 16:34:39 +00:00
Harry Moffat
675df76b1c Fixed a long standing problem with the combination of storred XML files and duplicator functions.
Now the complete XML file is storred within the ThermPhase object starting with the root node.
This is needed for later processing of kinetics and transport mechanisms when the ThermoPhase
file is duplicated and the original file is deleted.

xml() is now a const function, and still returns the same pointer.
setXMLdata() is a new function will stores the xml data.
2014-05-20 19:02:20 +00:00
Harry Moffat
b6f9009d28 Fixed a bad bug in deepStdVectorPointerCopy 2014-05-20 16:16:07 +00:00
Ray Speth
f61747973c [Thermo] Extract common implementations out of PDSS descendants
The descendants either calculate molar properties from nondimensonal properties
or vice versa. Add two derived classes to PDSS to implement these behaviors, and
have the leaf classes derive from whichever one of these makes sense.
2014-05-08 23:01:59 +00:00
Ray Speth
0eeae5d9c0 [Thermo] Remove unnecessary manual memory management from PDSS_Water 2014-05-08 23:01:53 +00:00
Ray Speth
edaef6a0b7 [Thermo] Remove redundant methods of PDSS descendants
The removed methods repeated the implementation of the base class.
2014-05-08 23:01:43 +00:00
Ray Speth
7fff65cecd Remove previously-deprecated 'PrintCtrl' and 'LogPrintCtrl' classes. 2014-05-08 23:01:32 +00:00
Ray Speth
54ded64e4b Miscellaneous whitespace cleanup 2014-05-08 23:01:12 +00:00
Ray Speth
2a9ab96609 Use NotImplementedError instead of 'err' member functions 2014-05-06 14:39:13 +00:00
Ray Speth
27e16e5bf1 Fix signature of SingleSpeciesTP::setMassFractions and setMoleFractions
This eliminates warnings generated by Visual Studio about the mismatch
in constness between the base and derived class functions.
2014-05-06 14:39:05 +00:00
Ray Speth
8cfac61a83 Use configuration checks to determine names for 'isnan' and 'finite' 2014-05-03 17:39:33 +00:00
John Hewson
b84f19c439 In InterfaceKinetics added some comments and clarified function names.
Formerly getExchangeCurrentQuantities() is now
updateExchangeCurrentQuantities().  This method updates things like
m_StandardConc for computing reaction rates.

Formerly applyExchangeCurrentDensityFormulation() is now
convertExchangeCurrentDensityFormulation().  This method converts
rate expressions from A/m2 to kmol/m2/s.
2014-04-22 22:25:59 +00:00
Harry Moffat
f1863b103a Some changes to make XML sections of liquid transport more orderly, uniform, and processed in
only one place.
2014-04-20 02:12:35 +00:00
Harry Moffat
7b2563c5ae Worked on comments. Took out "Pure" and substituted standard state. 2014-04-19 01:33:27 +00:00
Harry Moffat
6e40841d94 Added missing member functions for partial molar quantities 2014-04-18 23:53:38 +00:00
Ray Speth
79bbdf3aff [Thermo] Make use of initializers in SpeciesThermoInterpType classes 2014-04-14 18:37:12 +00:00
Ray Speth
588728addc [Equil] Make vcs_MultiPhaseEquil::m_vprob a normal member variable 2014-04-14 18:37:06 +00:00
Ray Speth
818a22be05 [Equil] Make vcs_MultiPhaseEquil::m_vsolvePtr a normal member variable
There is no reason for this to be a pointer.
2014-04-14 18:36:58 +00:00
Ray Speth
fcf7edf694 Implement Sub::name and Sub::formula in the base class
Eliminates the need for redundant implementations in all the derived
classes. Also, make the return value a "const char*" to eliminate the dangerous
cast.
2014-04-14 18:36:32 +00:00
Ray Speth
6449415933 [Thermo] Simplify setState specialization of SingleSpeciesTP
We don't need to override every function that sets the mass/mole fractions, just
the ones that would have actually done something.
2014-04-08 16:26:29 +00:00
Ray Speth
14ea7e64c6 [Thermo] make compositonMap a const argument 2014-04-08 16:26:20 +00:00
Ray Speth
beeaa21644 Deprecate unused stringUtils functions 2014-04-02 15:26:42 +00:00
Ray Speth
3530050dc4 [Thermo] Remove redundant overrides of ThermoPhase::eosType() 2014-03-28 23:12:53 +00:00
Ray Speth
2468b47ae7 [Thermo] Remove unimplemented overrides of ThermoPhase methods
ThermoPhase already provides an implementation of these methods that raises
an exception to indicate that the method is unimplemented. Therefore,
derived classes which do not implement a method do not need to do this.
2014-03-27 01:29:27 +00:00
Ray Speth
f1066aa072 [Thermo] Remove redundant versions of intEnergy_mole and gibbs_mole 2014-03-27 01:29:13 +00:00
Ray Speth
5b77bbb719 [1D] Add bounds checks to setRefineCriteria 2014-03-24 21:38:22 +00:00
Ray Speth
aa4dcf393c [1D] Avoid Jacobian update after successful solve
Calling solve() again after a successful solution no longer automatically
triggers a Jacobian update. This enables relatively efficient sensitivity
analysis by sequentially perturbing the reaction multipliers and re-solving
the system. Since the perturbed system is close to the orignal, the solution
can be found after only a few steps, even when using the original Jacobian.
2014-03-24 04:03:44 +00:00
Ray Speth
90c2d58973 [Numerics] move 'm_factored' up to GeneralMatrix 2014-03-24 04:03:01 +00:00
Ray Speth
4467b898a5 [Numerics] Remove unused BandMatrix::err method 2014-03-24 04:02:56 +00:00
Ray Speth
7fef1b0051 [Numerics] BandMatrix does not silently do LU when QR is specified
Change GeneralMatrix to allow derived classes to not implement QR
factorization. BandMatrix does not implement QR because this LAPACK
does not contain a QR algorithm for this matrix type.
2014-03-24 04:02:51 +00:00
Ray Speth
1ec72f3171 Add 'NotImplementedError' 2014-03-24 04:02:46 +00:00
Ray Speth
150a7845f8 [Numerics] Simplify solving DenseMatrix with multiple RHS 2014-03-24 04:02:41 +00:00
Ray Speth
e2dc48e45e Remove unnecessary includes of ctlapack.h 2014-03-24 04:02:34 +00:00
Ray Speth
5b6e52b5d1 [Transport] Abstract use of LAPACK in MultiTransport 2014-03-24 04:02:29 +00:00
Ray Speth
4d1622ee96 [Kinetics] Eliminate unnecessary variable solveSP::m_JacCol 2014-03-24 04:02:23 +00:00
Ray Speth
44c53a6f27 [Kinetics] Abstract use of LAPACK in solveSP and solveProb 2014-03-24 04:02:18 +00:00
Ray Speth
4e72cf0334 [Numerics] BandMatrix and SquareMatrix support solving multiple RHS 2014-03-24 04:02:06 +00:00
Victor Brunini
a641992960 Add validate() functions to CachedValue.
To both check and update the cached state values. Reduces
a lot of code duplication in the use of CachedValues.

I'd like to make state1, state2, and stateNum private so
that they can only be accessed with one of the validate functions,
and also add some asserts to the validate functions that do not
use all of the state variables to ensure that the unused ones are
set to their default values to prevent the case where the wrong
validate() function is called and incorrectly determines that the
cached state is valid.

First pass at making the state variables private caused a test failure
for test_problems/statmech. The m_spthermo->update() call in
IdealGasPhase::_updateThermo() throws an exception for this test right
now that gets caught in equilibrate(). When using validate() the cached
state variable is updated before the m_spthermo->update() call and subsequently
it thinks that the thermo does not need to be updated, whereas when
cached.state1 is being set after the m_spthermo->update() call it does not get
set. The current blessed output for that test is just the text of the exception
that gets caught, so I suspect the test may not work as is.
2014-03-19 00:14:18 +00:00
Victor Brunini
a704df09d8 Convert recent changes to new caching method. 2014-03-18 18:52:29 +00:00
Ray Speth
7556b828f9 Introduce a more general method of caching results
The ValueCache class is intended to standardize the method for implementing
value caching in Cantera, and to reduce the need to introduce additional member
variables to store cached variables and the thermodynamic state at which the
cached values were computed.

The initial usage is to replace the use of the m_tlast variable in IdealGasPhase
as an example.
2014-03-18 00:48:38 +00:00
Victor Brunini
2b92ad5684 WIP on additional caching.
I'll convert this over to the new caching framework once
Ray adds it.
2014-03-17 16:03:22 +00:00
Harry Moffat
39651964a7 Added back Statmech and PecosTransport.
Rarefied gas dynamics is an import application area for Sandia, and
    it represents a potentially important development direction for Cantera.
    These classes provide inroads into that area.
2014-03-15 02:57:00 +00:00
Victor Brunini
b0ecf96cb6 Trying out a cleaner way knowing when expensive state functions need to be recomputed. 2014-03-13 23:50:31 +00:00
Ray Speth
89eab1bb48 [Thermo] Remove redundant implementations of logStandardConc
For the cases where logStandardConc just calls standardConcentration,
rely on the default implementation in class ThermoPhase.
2014-03-13 21:35:49 +00:00
Ray Speth
2fb9ff630d Remove abandoned StatMech and PecosTransport classes 2014-03-13 21:35:11 +00:00
Victor Brunini
48ec4dc65c HMWSoln::s_update_lnMolalityActCoeff() performance improvement.
Only do the expensive update if state has changed.
2014-03-13 18:35:00 +00:00
Victor Brunini
e62ce054ce Style changes to be consistent with the rest of Cantera.
Thanks for the code review.
2014-03-13 16:49:10 +00:00