Commit graph

41 commits

Author SHA1 Message Date
Harry Moffat
e7e02ffc5e Changes to exit() and additions of cstdlib 2008-12-17 17:01:29 +00:00
Harry Moffat
f56bce1757 Added more output from activity coefficient calculation in HMWSoln.
Added a capability to readh in and change the H298f value in each
species. Needed this for analysis.
2008-12-13 01:59:49 +00:00
Harry Moffat
a838d6dce2 Changed the parameter list to a const on setParameters().
Moved remaining definitions from StoichSubstance.h to StoichSubstance.cpp
2008-12-10 16:42:48 +00:00
Harry Moffat
325ee0765e Fixed the HKFT standard state for neutral aqueous species.
Fixed a dimensioning error in HMWSoln
2008-12-10 00:29:55 +00:00
Harry Moffat
a8d7e74936 Added m_Mu_nnn to the formulation.
Fixed an error in the update of the pitzer coefficients.
2008-12-07 18:18:49 +00:00
Harry Moffat
39a626b6ce Added complex temperature dependence to Lambda term. 2008-12-06 21:41:03 +00:00
Harry Moffat
cd462115c0 Updated the Psi polynomial to take the normal temperature dependence. 2008-12-06 20:25:01 +00:00
Harry Moffat
dda3f02e71 Started transfering over some of the cropping capabilities from
IdealMolalSoln to HNWSoln.
2008-11-07 01:52:46 +00:00
Harry Moffat
e27054daa8 WOrking down the todo list on the eq3 port
Added alpha2 as a changeable parameter to the XML file
   Added temperature dependence for the theta_ij parameter
2008-10-20 20:53:52 +00:00
Harry Moffat
4dcb746101 Small changes to cover the situation where there isn't an
activity coefficient XML section.
2008-09-17 20:05:46 +00:00
Harry Moffat
94c066d1a4 Added a density function to the PDSS objects.
HMWSoln's m_waterSS object is now a PDSS object and not a PDSS_water object.
Added a dummy satPressure() value for PDSS_ConstVol objects of 1.0E-200.
2008-08-27 15:43:51 +00:00
Harry Moffat
e46b6f2b2d PDSS refactor - Addition of VPSSMgr Basically, this makes the specification
of standard states and the specification of activities independent of
each other.


  PDSS Behavior
-------------------------
PDSS is an object that carries out and reports on the evaluation
of the pressure dependent standard state of a single species in a mixture.

VPSSMgr Point of View
--------------------------------------


This is the calculator for the standard states.



From The Point of View of the ThermoPhase Function
---------------------------------------------------------
At the VPStandardStateTP object, the ThermoPhase object is enriched to
include a new object called VPSSMgr. VPSSMgr is
a base class that is responsible for calculating the standard states
of all of the species in the mixture. It is analogous to the
SpeciesThermo virtual base class, which handles all of the reference
state calculations for a class. The VPSSMgr class
usurps all calculations.

There are PDSS objects for each species.
VPStandardStateTP contains a vector of pointers to PDSS, of length
nSpecies in the phase. It owns the list.
VPSSMgr also contains the same vector of pointers to PDSS, of length
nSpecies in the phase. VPSSMgr is a methods class. It
organizes how to calculate the SS values efficiently. It may also have
specific rules for how to handle the pressure dependence (i.e., there
will be a specific class for ideal gases).
The VPSSMgr organizes when to update the internal states of
the PDSS objects.
The determination of which VPSSMgr virtual class to use with
which phase is determined by the phase itself. It know which method to
use.

setState Treatment with Temperature and Pressure
------------------------------------------------------

The VPStandardStateTP object always has the current value of T and P
held within it. It determines when T and P have changed. If it determines
that T or P has changed, it calls VPSSMgr so that VPSSMgr
may update its internal states.
VPSSMgr contains the current T and P, also, separately.
If it determines that T or P has changed, it recalculates its own internal state.


PDSS Object point of View
-----------------------------------------

During the evaluation of the phase thermodynamics, the PDSS object
may be called to evaluate the (T,P) Standard State and RefState information.

The PDSS object may or may not own the reference state calculation. If
it doesn't own the calculation, the ThermoPhase object owns the
calculation through its m_spthermo object.  Then the PDSS objects
uses pointers into the m_spthermo object to satisfy its requirement
to supply (T,P) ss information. It may own or surplant the reference
state calculation. For example, for waterPDSS, there is no specific reference
state calculation, since the regular temperature polynomial process
is ignored (except to set the basis state). The reference state functions
are evaluated the same as other standard state functions.

If PDSS owns the calculation of the reference state thermo, then the
m_spthermo pointer within the PDSS object is zero. It does it's own
reference state calculation.

If PDSS uses the SpeciesThermo object to calculate the reference
state, it needs to know whether the SpeciesThermo object calculations
are current. It checks this. If it is, then it retrieves the result from
storage in VPSSMgr object. If it isn't, then it recalculates the results.

PDSS has its own storage for the current state of T and P.
2008-08-23 00:53:54 +00:00
Harry Moffat
b72ca7f04a Doxygen work for PDSS
added phaseNode XML pointer to installSpecies routines.
2008-01-30 17:54:12 +00:00
Harry Moffat
ccfeb489a9 Compile fixes for DEBUG_MODE 2008-01-14 22:33:18 +00:00
Harry Moffat
35d96f6d03 Changed the PITZER_TEMP_COMPLEX1 parameterization to use 5 coefficients
for beta1 and 5 coefficients for beta2. They are now the same as
beta0 and Cphi.
All xml blocks using this parameterization must be modified accordingly.
2007-10-02 00:49:55 +00:00
Harry Moffat
67d7e3f290 Cropping Update
-Did a better job at coming up with cropping strategy for molalalities
   which are used for the calculation of the activity coefficents.
   Without such a strategy, act coeffs may become unbounded and
   cause the equilibrium solver to fail.
2007-07-18 19:27:51 +00:00
Harry Moffat
1b4538dd25 Fixed compilation problems on solaris 2007-07-13 15:55:45 +00:00
Harry Moffat
d7fb2d6ffa Doxygen update.
completed HMWSoln header information.
2007-06-26 22:28:53 +00:00
Harry Moffat
edd8584dda Doxygen update
-> fixing documentation for functions.
2007-06-26 17:43:12 +00:00
Harry Moffat
faa637d25a Doxygen update -
Update of Header files
2007-06-17 20:56:46 +00:00
Harry Moffat
fa0cc67986 Doxygen Update
Worked on the class header information.
2007-06-14 23:40:49 +00:00
Harry Moffat
56155a1d27 Doxygen update
-> Eliminated all of the doxygen warnings. However, there is a long
     way to go in documenting the HMWSoln header file.
2007-06-14 15:05:49 +00:00
Harry Moffat
29c71152f9 Doxygen update
-> added more member data documentation to HMWSoln
Added DebyeHuckel and IdealMolalSoln to the ThermoFactory
2007-06-13 18:53:37 +00:00
Harry Moffat
63dd45cc6a Doxygen update
- documented some member data
Changed names to make it more readable.
2007-06-13 14:36:52 +00:00
Harry Moffat
cb1dc5917c Made several routines const that should be const
getUnitStandardConc
 and in Phase::nDim and getMolecularWeight()
2007-06-13 00:08:35 +00:00
Harry Moffat
235ff2acb5 Turned the virtual function,getParameters(), to getParameters() const 2007-06-12 19:14:06 +00:00
Harry Moffat
440c74236c Made constructPhaseFile() and constructPhaseXML() non-virtual.
They are called from the constructor, and it generally is a
tricky situation when virtual functions are called from constructors.
2007-06-12 17:33:19 +00:00
Harry Moffat
16c8a59ca5 Bugfix checkin to get the duplMyselfAsThermoPhase() routines working.
Bugs include quite a few errors in the copy constructors and
assignment operator functions, which, for most of them, have been
checked against a sample problem, HMW_dupl_test, for the very first time.

Note, the duplMyselfAsThermoPhase() routines are now working.
2007-06-01 23:44:24 +00:00
Harry Moffat
9773c9b23b Changed the duplMyselfAsThermoPhase function to be a const function
(trying to keep a unified view of what are const and non-const
functions within the ThermoPhase classes)
2007-06-01 15:31:02 +00:00
Harry Moffat
aa7bf0421b Fixed a bug in the calculation of reference state values, for
thermophase objects that derive from VPStandardStateTP
2007-05-11 17:34:44 +00:00
Dave Goodwin
a04e7309a2 moved files to thermo subdirectory 2007-05-04 14:02:39 +00:00
Harry Moffat
810520f4ac Solaris 10 update
Various std:: additions to stl functions and additions of c include files.
2007-03-20 21:51:12 +00:00
Harry Moffat
af38f45d1d Worked on VPStandardStateTP some more
Fixed an error in IdealMolalSoln -> density wasn't beeing recalculated.
      Updated the test problem with the fix.
Worked CANTERA_DEBUG_MODE into the Makefiles. It wasn't being used.
Split the multiproblem DH_graph_1 test into multiple directories, one per test
Worked on getting all of the test problems to have the same look, feel, and printout.
2007-03-09 21:04:42 +00:00
Harry Moffat
ca4f9cc31d Work on VPStandardStateTP. Started to formalize what it actually
does, putting in doxygen documentation. Tried to fix some holes
in DebyeHuckel wherein calculations may be returned without
updating the underlying water standard state.
2007-03-08 18:23:52 +00:00
Harry Moffat
1cd197ea7a doxygen update:
Added EdgePhase
Worked on test suite:
   HMW_Test_1 passes now whether Debug_Mode is turned on or not.
2007-02-24 00:51:56 +00:00
Harry Moffat
72a6de13a4 Uupdaetd the structure of the namespaces so that it would compile. 2006-11-28 18:44:23 +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
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
6aa9287438 Added Pitzer Object 2006-07-06 15:39:34 +00:00