Commit graph

779 commits

Author SHA1 Message Date
Dave Goodwin
dae5c70516 *** empty log message *** 2006-10-31 19:09:49 +00:00
Dave Goodwin
9f34a57aa6 fixed bug that resulted in incorrect computation of product concentration products when rxn has 4 or more product molecules and one or more has a stoich coeff > 1 2006-10-31 19:09:29 +00:00
Dave Goodwin
85ef6f2c1d *** empty log message *** 2006-10-25 21:27:59 +00:00
Dave Goodwin
2df82ea520 sundials version detection 2006-10-23 01:13:42 +00:00
Dave Goodwin
d4672515bd moved declaration of nCutoff to avoid jumping over it, causing a compile failure with gcc 4.0.1 on linuxChemEquil.cpp 2006-10-23 00:56:31 +00:00
Harry Moffat
6654105bb5 Added an Id stamp. 2006-10-20 21:42:37 +00:00
Harry Moffat
d822a62476 Fixed an error in the LogGroup system. 2006-10-20 21:41:54 +00:00
Harry Moffat
a9053bfd50 eliminated an unused variable. 2006-10-20 21:40:40 +00:00
Harry Moffat
240c93ff4f Reworking of the solver algorithm within ChemEquil:
Much of the algorithm for relaxing the element potentials
to equilibrium employs the Brinkley algorithm (const T, P)
(p. 129 Smith and Missen). This algorithm does better at
relaxing the system towards steady state from a bad initial
guess.

   The old algorithm now does the last little bit and it does
the calculation for fixed pairs other than const T, P, using
the Brinkley algorithm's initial guess.

  Modified the damping algorithm in the old method. It now doesn't
create false convergence failures when it is close to the
end of the calculation.

  The new solver has been tested against a matrix of initial conditions
for the gri30 mechanism and a 200 species jp8 mechanism.

Yet to do:
   This routine should work but has not been checked out against:
      phases with electric charge
      nonideal phases.
   This routine should probably not yet work with
      molality based phases.
   More work may have to be done with the Brinkley algorithm for
   problems which suffer from stoichiometric constraints. A full
   Gauss-Jordon elimination step should probably be added to
   flag cases where there are effective stoichiometric constraints.
2006-10-20 21:34:00 +00:00
Harry Moffat
653e9fac7a Added more error control and checking. This is needed for new
test problems.
2006-10-20 21:22:30 +00:00
Harry Moffat
3ce657f0c7 Added a couple of comments. 2006-10-20 21:20:27 +00:00
Harry Moffat
ea76725720 Change to the function getElementPotentials(). It now returns a
boolean to indicate whether the object has element potentials or not.
2006-10-20 21:19:35 +00:00
Harry Moffat
7a5c817597 Change to setToEquilState() to guard against inf results. 2006-10-20 21:17:12 +00:00
Harry Moffat
eb129e8f00 In the init() routine, I set the initial mass fraction vector so that
it sums to one. Previously, it was set uniformly to zero. The mass
fraction of species 0 is set to 1.
 This was noticed by a user, and may have resulted in seg faults before
the ThermoPhase object was properly initialized.
2006-10-02 19:10:53 +00:00
Harry Moffat
9568195dec Fixed the Makefile that gets used in the install directories.
autoconf variables needed updating.
2006-10-02 16:38:09 +00:00
Harry Moffat
8996287691 Added user directory to a lot of the rules.
Took out the cads directory.
2006-08-21 16:44:02 +00:00
Harry Moffat
d6f22fc5e5 Added an install rule to the Makefile 2006-08-21 16:42:16 +00:00
Harry Moffat
e46567e0fa Added depends include at the end of the file. 2006-08-20 00:18:27 +00:00
Harry Moffat
6f0081ec29 Fixed clean rules. 2006-08-20 00:17:06 +00:00
Harry Moffat
9d6b4258d9 Fixed an optimization compiler warning about a possible uninitialized variable. 2006-08-19 16:08:03 +00:00
Harry Moffat
01dc3cf915 This change is needed in order for clean to work in some cases. 2006-08-15 21:59:24 +00:00
Harry Moffat
51156a44ca Added DEGUG_MODE to the defaults. 2006-08-14 20:54:38 +00:00
Harry Moffat
b23d7def2a Slightly decreased the accuracy of internal check in one case. 2006-08-14 20:38:38 +00:00
Harry Moffat
6aa9c846f4 Fixed a compilation error that popped up on SUSE 9.0. 2006-08-14 19:18:34 +00:00
Harry Moffat
19cd590ac2 Another iteration on trying to unify the water treatment between
the 2 objects.
2006-07-13 20:05:11 +00:00
Harry Moffat
07d5b6a6aa Unifying the water treatment between objects.
Found a bug in getPartialMolarEntropy in HMWSoln that wasn't covered
in the test suite.
2006-07-12 15:41:38 +00:00
Harry Moffat
60ff5fb20e Iteration on unifying water treatments in the 2 objects. 2006-07-12 00:46:34 +00:00
Dave Goodwin
ec04dbe060 *** empty log message *** 2006-07-11 18:12:06 +00:00
Dave Goodwin
f325a1b190 initial import 2006-07-11 16:30:24 +00:00
Dave Goodwin
ca65c77427 *** empty log message *** 2006-07-11 16:07:46 +00:00
Dave Goodwin
660e5a7812 commented out 2 output statements 2006-07-11 15:40:59 +00:00
Dave Goodwin
4c0648b5b2 commented out code that will try to find a cti file if the xml file is not found. 2006-07-11 15:38:22 +00:00
Dave Goodwin
3436e52eab minor cleanup 2006-07-11 15:35:46 +00:00
Dave Goodwin
6f06be3182 made destructor virtual 2006-07-11 15:34:51 +00:00
Dave Goodwin
d7cf9cc53a added some consts, and a routine to read a multiphase mixture from an input file, but this is not yet active 2006-07-11 15:33:30 +00:00
Dave Goodwin
7da64f4af7 added Crystal class, DAE_Solvers 2006-07-11 15:31:39 +00:00
Dave Goodwin
d5211ffd6b initial import 2006-07-11 15:28:51 +00:00
Dave Goodwin
b79414ece7 updated for latest sundials 2006-07-11 15:28:23 +00:00
Dave Goodwin
3662c314ee fixed minor bug that caused problems in some cases when an element was excluded. 2006-07-11 15:25:57 +00:00
Harry Moffat
d5affaa953 Took out an unneeded parameter B_Debye in Pitzer model.
Switched to DEBUG_MODE for optional printing.
2006-07-07 18:05:36 +00:00
Harry Moffat
ea1e5cedb8 Added the DebyeHuckel object.
Note, this object needs a bit of work. It's not connected to the
real model of water yet.
2006-07-07 00:27:26 +00:00
Harry Moffat
b44ec59837 Added general .h define file 2006-07-06 15:41:15 +00:00
Harry Moffat
b5c1023aa8 Added a utility routine. 2006-07-06 15:40:07 +00:00
Harry Moffat
6aa9287438 Added Pitzer Object 2006-07-06 15:39:34 +00:00
Harry Moffat
29bd558cc2 First commit of water properties routines. These are
under-the-hood routines for calculation of water electrolyte
thermochemistry.
2006-07-04 00:01:53 +00:00
Harry Moffat
71ef5ebfcc Fix for negative pre-exponential factors producing NaN rates
of progress. This bug was reported in the Cantera newsgroup.

The fix consists of replacing
  Rc = exp ( mlogA + blogT - Ea / RT)
with
  Rc = A * exp (b logT - Ea/RT)

Therefore, the log of A never has to be taken.

Note, this also allows for a zero rate of progress for a reaction.

Consequences:
   The permissible range of the rate constant values may be altered.
   Numerical roundoff differences will occur, since the order of
    operations in key rate constant evalulations has been changed.
   Speed of the calculation may be affected. I have no idea which way.

The fix should be considered as provisional. There are different pathways
for fixing this. This is merely the simplest.
2006-07-03 19:57:29 +00:00
Harry Moffat
228ebc78b1 Added a couple of comments. 2006-07-03 19:41:57 +00:00
Harry Moffat
20a21103cb Doxygen fixes. 2006-06-23 20:35:16 +00:00
Harry Moffat
cfdd7d7293 Doxygen formatting changes. 2006-06-23 20:31:12 +00:00
Dave Goodwin
e778904e56 added C++ combustor example 2006-06-23 14:31:19 +00:00