Commit graph

29 commits

Author SHA1 Message Date
Ray Speth
255f1f9b9f Fixing compiler warnings, part 3 2012-01-17 04:10:43 +00:00
Ray Speth
69bffa3800 Fixing compiler warnings, part 2 2012-01-17 04:10:26 +00:00
Ray Speth
9e1fdfe39a Eliminated CVS keyword cruft 2012-01-09 17:32:01 +00:00
Harry Moffat
350988be37 Changed the format of the xml file so that you only need
2 of the 3 fields:
 DG0, DH0, and S0.

The third field is calculated consistently wrt the first two fields.
2010-04-21 18:05:44 +00:00
Harry Moffat
180fbef55d Doxygen update
- no code has been changed other than a change of symbols.
2010-01-17 17:05:46 +00:00
Harry Moffat
7b3b9b186a Transfering bugfixes from liquidTransport to the main branch.
This mainly involved fixing the copy and assignment operators
for the IonsFromNeutralVPSSTP operator.

Added docs for PDSS_SSVol

Turned on keyword substitution
2009-12-05 19:08:43 +00:00
Harry Moffat
70647c85ed Initial Import 2009-07-27 23:17:19 +00:00
Harry Moffat
f0095a7f9b Added headers for a possible ubuntu problem 2009-03-13 03:21:34 +00:00
Harry Moffat
ce511ab734 Fixed a printout 2009-01-05 15:33:17 +00:00
Harry Moffat
420604c8fa Doxygen update
Worked on cleaning up some logic in VPSSMgr routines.
2009-01-04 19:21:28 +00:00
Harry Moffat
76ebcf3726 Fixed various errors.
Fixed PDSS_HKFT's Cp calculation. It now is correct
   took out out of place initThermo and initThermoXML calls.
2009-01-04 06:34:19 +00:00
Harry Moffat
b20c4174c0 Fixed a big error in the calculation of Cp for the PDSS_HKFT standard
state.
Added reportParams() for the PDSS object and its children.
2009-01-03 03:59:38 +00:00
Harry Moffat
103fd934a1 Changed the algorithm for calculation of reference state properties.
It will now calculate the reference state at an elevated pressure for
elevated temperature for the real water equation of state.
Core dumps were happening around the critical point without this change.
2008-12-22 22:40:44 +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
db33fb8145 Bug fixes for assignment operators. 2008-12-05 02:30:23 +00:00
Harry Moffat
54988b2b5f Doxygen update -> no real changes.
Working on doxygen docs and SAND report and validation for
  EQ3 import.
2008-09-29 16:05:40 +00:00
Harry Moffat
595630e399 Added the entropy of the stable state of each element at 298 and 1 bar,
as another entry in the file elements.xml.  Took this information out of
PDSS_HKFT.cpp, where it was inappropriately cached.

This information is needed for conversion of Gibbs free energies of formations
for speices and the NIST chemical potential formulation where the DelH_f is set to zero.
The Gibbs free energies of formation is the fundamental way EQ3 specifies the
reference state chemical potential of a species.
2008-09-25 19:42:05 +00:00
Harry Moffat
c884917c95 Bug fixes for liquid electrolyte thermo capability.
thermo XML node now takes a couple of extra XML nodes that can specify
explicitly which standardStateManager and which variblePressureStandardState
manager to use.

These are :
  <standardStateManager model="provide_specific_model_here">


and
  <variablePressureStandardStateManager model="provide_specific_model_here">

Previously, these were being determined implicitly by querying the
input deck. However, it seems a no brainer to put the capability for
putting explicit instructions in.
2008-09-23 15:57:52 +00:00
Harry Moffat
5c73809c25 More checks against user input errors in the XML file. 2008-09-16 21:22:17 +00:00
Harry Moffat
33c8065a7c Misc changes due to porting to solaris 10. Caught a few inconsistencies
in inherited functions
2008-09-16 16:33:16 +00:00
Harry Moffat
55cd65fc93 Internal Upgrades:
Added routines to calculate the spinodal curves for the water object.
2008-09-12 21:51:04 +00:00
Harry Moffat
23cb714cc1 Bug fixes for calculating the standard state volume of
HKFT standard states.
2008-08-30 00:56:56 +00:00
Harry Moffat
9a07381972 Fixed an error in the calculation of H_0 and S_0. 2008-08-28 15:30:22 +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
a25f41e605 Added isothermalCompressibility functions to the water models.
Added a missing pressure dependence to the PDSS_HKFT object.
2008-08-25 22:58:12 +00:00
Harry Moffat
5479bcf10b Added a check to make sure the delta H formation reaction value is
consistent with G and S. It's actually redundant.
2008-08-25 03:19:59 +00:00
Harry Moffat
6397cc7770 HKFT standard state implementation
-> fleshed out all thermodynamic functions. Still needs some testing.
2008-08-24 04:47:41 +00:00
Harry Moffat
34bae00f15 Interrum update for standing up HKFT standard state
Gibbs free energies are working and checked against excel spread sheet!
2008-08-24 01:56:24 +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