VPSSMgr_ConstVol.h

Go to the documentation of this file.
00001 /**
00002  *  @file VPSSMgr_ConstVol.h
00003  *  Declarations for a derived class for the calculation of multiple-species thermodynamic
00004  *  property managers for variable temperature and pressure standard
00005  *  states assuming constant volume (see class 
00006  *  \link Cantera::VPSSMgr_ConstVol VPSSMgr_ConstVol \endlink).
00007  */
00008 /*
00009  * $Author: hkmoffa $
00010  * $Revision: 279 $
00011  * $Date: 2009-12-05 14:08:43 -0500 (Sat, 05 Dec 2009) $
00012  */
00013 /*
00014  * Copywrite (2005) Sandia Corporation. Under the terms of 
00015  * Contract DE-AC04-94AL85000 with Sandia Corporation, the
00016  * U.S. Government retains certain rights in this software.
00017  */
00018 
00019 #ifndef CT_VPSSMGR_CONSTVOL_H
00020 #define CT_VPSSMGR_CONSTVOL_H
00021 
00022 #include "ct_defs.h"
00023 #include "VPSSMgr.h"
00024 
00025 namespace Cantera {
00026 
00027   class SpeciesThermoInterpType;
00028   class PDSS;
00029 
00030   //! Constant Molar Volume e VPSS species thermo manager class
00031   /*!
00032    *  The calculation of multiple-species thermodynamic
00033    *  property managers for variable temperature and pressure standard
00034    *  states assuming a constant partial molar volume assumption.
00035    *
00036    *  @ingroup mgrpdssthermocalc
00037    */
00038   class VPSSMgr_ConstVol : public VPSSMgr {
00039     
00040   public:
00041 
00042     //! Constructor
00043     /*!
00044      *  @param vp_ptr Pointer to the owning VPStandardStateTP  object
00045      *                for the phase. It's a requirement that this be
00046      *                already malloced.
00047      *  @param spth   Pointer to the SpeciesThermo object for the
00048      *                phase. It's a requirement that this be already
00049      *                malloced.
00050      */
00051     VPSSMgr_ConstVol(VPStandardStateTP *vp_ptr, SpeciesThermo *spth);
00052 
00053     //! Destructor
00054     virtual ~VPSSMgr_ConstVol();
00055 
00056     //! Copy Constructor
00057     /*!
00058      * @param right    Reference to %VPSSMgr_ConstVol object to be copied into the
00059      *                 current one.
00060      */
00061     VPSSMgr_ConstVol(const VPSSMgr_ConstVol &right);
00062         
00063     //! Assignment operator for the %VPSSMgr_ConstVol object
00064     /*!
00065      *  This is NOT a virtual function.
00066      *
00067      * @param right    Reference to %VPSSMgr_ConstVol object to be copied into the
00068      *                 current one. 
00069      */
00070     VPSSMgr_ConstVol& operator=(const VPSSMgr_ConstVol &right);
00071    
00072     //! Duplicator routine for the VPSSMgr base class
00073     /*!
00074      *  This virtual routine can be used to duplicate %VPSSMgr objects
00075      *  inherited from %VPSSMgr even if the application only has
00076      *  a pointer to %VPSSMgr to work with.
00077      */
00078     virtual VPSSMgr *duplMyselfAsVPSSMgr() const;
00079 
00080     /*!
00081      * @name  Properties of the Standard State of the Species in the Solution 
00082      *
00083      *  Within VPStandardStateTP, these properties are calculated via a common routine, 
00084      *  _updateStandardStateThermo(),
00085      *  which must be overloaded in inherited objects.
00086      *  The values are cached within this object, and are not recalculated unless
00087      *  the temperature or pressure changes.
00088      */
00089     //@{
00090 
00091   protected:
00092 
00093     //! Updates the standard state thermodynamic functions at the current
00094     //! T and P of the solution.
00095     /*!
00096      * @internal
00097      *
00098      * If m_useTmpStandardStateStorage is true,
00099      * this function must be called whenever the temperature or pressure
00100      * has changed.
00101      *
00102      * This function is responsible for updating the following internal members,
00103      * when m_useTmpStandardStateStorage is true.
00104      *
00105      *  -  m_hss_RT;
00106      *  -  m_cpss_R;
00107      *  -  m_gss_RT;
00108      *  -  m_sss_R;
00109      *  -  m_Vss
00110      *
00111      *  If m_useTmpStandardStateStorage is not true, this function may be
00112      *  required to be called every time information is requested from
00113      *  this object.
00114      */                    
00115     virtual void _updateStandardStateThermo();
00116 
00117     //@}
00118 
00119     /// @name Thermodynamic Values for the Species Reference States 
00120     /*!
00121      *  There are also temporary
00122      *  variables for holding the species reference-state values of Cp, H, S, and V at the
00123      *  last temperature and reference pressure called. These functions are not recalculated
00124      *  if a new call is made using the previous temperature.
00125      *  All calculations are done within the routine  _updateRefStateThermo().
00126      *  _updateRefStateThermo() is defined in the parent object.
00127      */
00128     //@{
00129 
00130     /*!
00131      *  Returns the vector of nondimensional
00132      *  Gibbs free energies of the reference state at the current temperature
00133      *  of the solution and the reference pressure for the species.
00134      *
00135      * @param grt Output vector contains the nondimensional Gibbs free energies
00136      *            of the reference state of the species
00137      *            length = m_kk, units = dimensionless.
00138      */
00139     virtual void getGibbs_RT_ref(doublereal *grt) const ;
00140        
00141 
00142     //!  Get the molar volumes of the species reference states at the current
00143     //!  <I>T</I> and <I>P_ref</I> of the solution.
00144     /*!
00145      * units = m^3 / kmol
00146      *
00147      * @param vol     Output vector containing the standard state volumes.
00148      *                Length: m_kk.
00149      */
00150     virtual void getStandardVolumes_ref(doublereal *vol) const ;
00151 
00152     //@}
00153   
00154     //! @name Initialization Methods - For Internal use 
00155     /*!
00156      * The following methods are used in the process of constructing
00157      * the phase and setting its parameters from a specification in an 
00158      * input file. They are not normally seen by application programs 
00159      */
00160     //@{
00161 
00162    public:
00163     //! Initialize the VPSSMgr object
00164     /*!
00165      * This method is provided to allow
00166      * subclasses to perform any initialization required after all
00167      * species have been added. For example, it might be used to
00168      * resize internal work arrays that must have an entry for
00169      * each species. It is called after createInstallPDSS() and
00170      * before initThermoXML().
00171      *
00172      * @internal
00173      */
00174     virtual void initThermo();
00175 
00176     //! Initialize the thermo for this standard state thermo calculator
00177     /*!
00178      *  This task is done last, after createInstallPDSS() and after
00179      *  initThermo().
00180      * 
00181      *  @param phaseNode   Reference to the phase node in the XML tree 
00182      *  @param id          string name of the phase
00183      */
00184     virtual void initThermoXML(XML_Node& phaseNode, std::string id);
00185 
00186     //!  Create and install a constant volume pressure dependent
00187     //!  standard state for one species within this object
00188     /*!
00189      *  This function sets up the internal data within this object for
00190      *  handling the calculation of the standard state for the species.
00191      *
00192      *  -   It registers the species with the SpeciesThermo object for the
00193      *      containing VPStandardStateTP phase.
00194      *  -   It grabs the molar volume property and installs its value within
00195      *      this object.
00196      *  -   It also creates a PDSS object, which basically contains a 
00197      *      duplication of some of this information and returns a pointer to
00198      *      the new object.
00199      *  .
00200      *
00201      *  @param k Species index within the phase
00202      *  @param speciesNode Reference to the species node in the XML tree
00203      *  @param phaseNode_ptr Pointer to the phase node in the XML tree 
00204      * 
00205      *  @return Returns a pointer to the a newly malloced PDSS object
00206      *          containing the parameterization
00207      */
00208     virtual PDSS* createInstallPDSS(int k, const XML_Node& speciesNode,  
00209                                     const XML_Node * const phaseNode_ptr);
00210     //@}
00211 
00212     //! This utility function reports the type of parameterization
00213     //! used for the species with index number index.
00214     /*!
00215      *
00216      * @param index  Species index
00217      */
00218     virtual PDSS_enumType reportPDSSType(int index = -1) const ;
00219 
00220 
00221     //! This utility function reports the type of manager
00222     //! for the calculation of ss properties
00223     /*!
00224      *
00225      */
00226     virtual VPSSMgr_enumType reportVPSSMgrType() const ;
00227 
00228   };
00229   //@}
00230 }
00231 
00232 #endif
Generated by  doxygen 1.6.3