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.
This commit is contained in:
parent
ca4f9cc31d
commit
af38f45d1d
49 changed files with 1564 additions and 578 deletions
|
|
@ -14,8 +14,16 @@
|
|||
INCDIR = ../../build/include/cantera/kernel
|
||||
INSTALL_TSC = ../../bin/install_tsc
|
||||
CANTERA_LIB = @buildlib@/libcantera.a
|
||||
|
||||
debug_mode = @CANTERA_DEBUG_MODE@
|
||||
ifeq ($(debug_mode), 1)
|
||||
DEBUG_FLAG=-DDEBUG_MODE
|
||||
else
|
||||
DEBUG_FLAG=
|
||||
endif
|
||||
|
||||
#LOCAL_DEFNS=-DDEBUG_PATHS -DDEBUG_MULTIPHASE_EQUIL
|
||||
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(LOCAL_DEFNS)
|
||||
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(LOCAL_DEFNS) $(DEBUG_FLAG)
|
||||
EXT = ../../ext
|
||||
do_ranlib = @DO_RANLIB@
|
||||
USE_SUNDIALS = @use_sundials@
|
||||
|
|
|
|||
|
|
@ -2704,9 +2704,6 @@ namespace Cantera {
|
|||
* class. It checks to see whether the temperature or pressure has changed and
|
||||
* thus the ss thermodynamics functions for all of the species
|
||||
* must be recalculated.
|
||||
*
|
||||
*
|
||||
* Note, this will throw an error. It must be reimplemented in derived classes.
|
||||
*/
|
||||
void DebyeHuckel::_updateStandardStateThermo(doublereal pnow) const {
|
||||
_updateRefStateThermo();
|
||||
|
|
|
|||
|
|
@ -974,6 +974,19 @@ namespace Cantera {
|
|||
*/
|
||||
virtual void getStandardVolumes(doublereal *vol) const;
|
||||
|
||||
protected:
|
||||
|
||||
//! Updates the standard state thermodynamic functions at the current T and P of the solution.
|
||||
/*!
|
||||
* @internal
|
||||
*
|
||||
* This function gets called for every call to functions in this
|
||||
* class. It checks to see whether the temperature or pressure has changed and
|
||||
* thus the ss thermodynamics functions for all of the species
|
||||
* must be recalculated.
|
||||
*/
|
||||
virtual void _updateStandardStateThermo(doublereal pres = -1.0) const;
|
||||
|
||||
//@}
|
||||
/// @name Thermodynamic Values for the Species Reference States ---
|
||||
//@{
|
||||
|
|
@ -1330,23 +1343,6 @@ namespace Cantera {
|
|||
*/
|
||||
double _osmoticCoeffHelgesonFixedForm() const;
|
||||
double _lnactivityWaterHelgesonFixedForm() const;
|
||||
|
||||
protected:
|
||||
|
||||
//! Updates the standard state thermodynamic functions at the current T and P of the solution.
|
||||
/*!
|
||||
* @internal
|
||||
*
|
||||
* This function gets called for every call to functions in this
|
||||
* class. It checks to see whether the temperature or pressure has changed and
|
||||
* thus the ss thermodynamics functions for all of the species
|
||||
* must be recalculated.
|
||||
*
|
||||
*
|
||||
* Note, this will throw an error. It must be reimplemented in derived classes.
|
||||
*/
|
||||
virtual void _updateStandardStateThermo(doublereal pres = -1.0) const;
|
||||
|
||||
|
||||
|
||||
//@}
|
||||
|
|
|
|||
|
|
@ -549,22 +549,22 @@ namespace Cantera {
|
|||
#ifdef DEBUG_MODE
|
||||
//printf("setPressure: %g\n", p);
|
||||
#endif
|
||||
double temp = temperature();
|
||||
/*
|
||||
* Call the water SS and set it's internal state
|
||||
* Store the current pressure
|
||||
*/
|
||||
m_waterSS->setTempPressure(temp, p);
|
||||
|
||||
m_Pcurrent = p;
|
||||
/*
|
||||
* update the standard state thermo
|
||||
* -> This involves calling the water function and setting the pressure
|
||||
*/
|
||||
_updateStandardStateThermo();
|
||||
|
||||
/*
|
||||
* Store the internal density of the water SS.
|
||||
* Note, we would have to do this for all other
|
||||
* species if they had pressure dependent properties.
|
||||
*/
|
||||
m_densWaterSS = m_waterSS->density();
|
||||
/*
|
||||
* Store the current pressure
|
||||
*/
|
||||
m_Pcurrent = p;
|
||||
/*
|
||||
* Calculate all of the other standard volumes
|
||||
* -> note these are constant for now
|
||||
|
|
@ -784,6 +784,7 @@ namespace Cantera {
|
|||
*
|
||||
*/
|
||||
void HMWSoln::getActivities(doublereal* ac) const {
|
||||
_updateStandardStateThermo();
|
||||
/*
|
||||
* Update the molality array, m_molalities()
|
||||
* This requires an update due to mole fractions
|
||||
|
|
@ -815,7 +816,7 @@ namespace Cantera {
|
|||
*/
|
||||
void HMWSoln::
|
||||
getMolalityActivityCoefficients(doublereal* acMolality) const {
|
||||
|
||||
_updateStandardStateThermo();
|
||||
A_Debye_TP(-1.0, -1.0);
|
||||
s_update_lnMolalityActCoeff();
|
||||
copy(m_lnActCoeffMolal.begin(), m_lnActCoeffMolal.end(), acMolality);
|
||||
|
|
@ -1075,6 +1076,7 @@ namespace Cantera {
|
|||
* units = J / kmol
|
||||
*/
|
||||
void HMWSoln::getStandardChemPotentials(doublereal* mu) const {
|
||||
_updateStandardStateThermo();
|
||||
getGibbs_ref(mu);
|
||||
doublereal pref;
|
||||
doublereal delta_p;
|
||||
|
|
@ -1145,6 +1147,7 @@ namespace Cantera {
|
|||
*/
|
||||
void HMWSoln::
|
||||
getEnthalpy_RT(doublereal* hrt) const {
|
||||
_updateStandardStateThermo();
|
||||
getEnthalpy_RT_ref(hrt);
|
||||
doublereal pref;
|
||||
doublereal delta_p;
|
||||
|
|
@ -1174,6 +1177,7 @@ namespace Cantera {
|
|||
*/
|
||||
void HMWSoln::
|
||||
getEntropy_R(doublereal* sr) const {
|
||||
_updateStandardStateThermo();
|
||||
getEntropy_R_ref(sr);
|
||||
sr[0] = m_waterSS->entropy_mole();
|
||||
sr[0] /= GasConstant;
|
||||
|
|
@ -1195,6 +1199,7 @@ namespace Cantera {
|
|||
* constant pressure heat capacity for species k.
|
||||
*/
|
||||
void HMWSoln::getCp_R(doublereal* cpr) const {
|
||||
_updateStandardStateThermo();
|
||||
getCp_R_ref(cpr);
|
||||
cpr[0] = m_waterSS->cp_mole();
|
||||
cpr[0] /= GasConstant;
|
||||
|
|
@ -1209,12 +1214,37 @@ namespace Cantera {
|
|||
* The water calculation is done separately.
|
||||
*/
|
||||
void HMWSoln::getStandardVolumes(doublereal *vol) const {
|
||||
copy(m_speciesSize.begin(),
|
||||
m_speciesSize.end(), vol);
|
||||
_updateStandardStateThermo();
|
||||
copy(m_speciesSize.begin(), m_speciesSize.end(), vol);
|
||||
double dd = m_waterSS->density();
|
||||
vol[0] = molecularWeight(0)/dd;
|
||||
}
|
||||
|
||||
/*
|
||||
* Updates the standard state thermodynamic functions at the current T and P of the solution.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* This function gets called for every call to functions in this
|
||||
* class. It checks to see whether the temperature or pressure has changed and
|
||||
* thus the ss thermodynamics functions for all of the species
|
||||
* must be recalculated.
|
||||
*/
|
||||
void HMWSoln::_updateStandardStateThermo(doublereal pnow) const {
|
||||
_updateRefStateThermo();
|
||||
doublereal tnow = temperature();
|
||||
if (pnow == -1.0) {
|
||||
pnow = m_Pcurrent;
|
||||
}
|
||||
if (m_tlast != tnow || m_plast != pnow) {
|
||||
if (m_waterSS) {
|
||||
m_waterSS->setTempPressure(tnow, pnow);
|
||||
}
|
||||
m_tlast = tnow;
|
||||
m_plast = pnow;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ------ Thermodynamic Values for the Species Reference States ---
|
||||
*/
|
||||
|
|
@ -1287,7 +1317,7 @@ namespace Cantera {
|
|||
return vol;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A_Debye_TP() (virtual)
|
||||
*
|
||||
* Returns the A_Debye parameter as a function of temperature
|
||||
|
|
|
|||
|
|
@ -621,6 +621,22 @@ namespace Cantera {
|
|||
*/
|
||||
virtual void getStandardVolumes(doublereal *vol) const;
|
||||
|
||||
protected:
|
||||
|
||||
//! Updates the standard state thermodynamic functions at the current T and P of the solution.
|
||||
/*!
|
||||
* @internal
|
||||
*
|
||||
* This function gets called for every call to functions in this
|
||||
* class. It checks to see whether the temperature or pressure has changed and
|
||||
* thus the ss thermodynamics functions for all of the species
|
||||
* must be recalculated.
|
||||
*
|
||||
*
|
||||
* Note, this will throw an error. It must be reimplemented in derived classes.
|
||||
*/
|
||||
virtual void _updateStandardStateThermo(doublereal pres = -1.0) const;
|
||||
|
||||
//@}
|
||||
/// @name Thermodynamic Values for the Species Reference States ---
|
||||
//@{
|
||||
|
|
@ -654,7 +670,7 @@ namespace Cantera {
|
|||
* Chemical equilibrium.
|
||||
* @{
|
||||
*/
|
||||
|
||||
public:
|
||||
/**
|
||||
* This method is used by the ChemEquil equilibrium solver.
|
||||
* It sets the state such that the chemical potentials satisfy
|
||||
|
|
|
|||
|
|
@ -207,6 +207,63 @@ namespace Cantera {
|
|||
return m_Pcurrent;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the pressure at constant temperature. Units: Pa.
|
||||
* This method sets a constant within the object.
|
||||
* The mass density is not a function of pressure.
|
||||
*/
|
||||
void IdealMolalSoln::setPressure(doublereal p) {
|
||||
|
||||
#ifdef DEBUG_MODE
|
||||
//printf("setPressure: %g\n", p);
|
||||
#endif
|
||||
/*
|
||||
* Store the current pressure
|
||||
*/
|
||||
m_Pcurrent = p;
|
||||
|
||||
/*
|
||||
* update the standard state thermo
|
||||
* -> This involves calling the water function and setting the pressure
|
||||
*/
|
||||
_updateStandardStateThermo();
|
||||
|
||||
/*
|
||||
* Calculate all of the other standard volumes
|
||||
* -> note these are constant for now
|
||||
*/
|
||||
/*
|
||||
* Get the partial molar volumes of all of the
|
||||
* species. -> note this is a lookup for
|
||||
* water, here since it was done above.
|
||||
*/
|
||||
double *vbar = &m_pp[0];
|
||||
getPartialMolarVolumes(vbar);
|
||||
|
||||
/*
|
||||
* Get mole fractions of all species.
|
||||
*/
|
||||
double *x = &m_tmpV[0];
|
||||
getMoleFractions(x);
|
||||
|
||||
/*
|
||||
* Calculate the solution molar volume and the
|
||||
* solution density.
|
||||
*/
|
||||
doublereal vtotal = 0.0;
|
||||
for (int i = 0; i < m_kk; i++) {
|
||||
vtotal += vbar[i] * x[i];
|
||||
}
|
||||
doublereal dd = meanMolecularWeight() / vtotal;
|
||||
|
||||
/*
|
||||
* Now, update the State class with the results. This
|
||||
* stores the density.
|
||||
*/
|
||||
State::setDensity(dd);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* The isothermal compressibility. Units: 1/Pa.
|
||||
* The isothermal compressibility is defined as
|
||||
|
|
@ -395,7 +452,8 @@ namespace Cantera {
|
|||
* The max against 8.689E-3 is to limit the activity
|
||||
* coefficient to be greater than 1.0E-50.
|
||||
*/
|
||||
void IdealMolalSoln::getActivities(doublereal* ac) const {
|
||||
void IdealMolalSoln::getActivities(doublereal* ac) const {
|
||||
_updateStandardStateThermo();
|
||||
/*
|
||||
* Update the molality array, m_molalities()
|
||||
* This requires an update due to mole fractions
|
||||
|
|
@ -608,6 +666,7 @@ namespace Cantera {
|
|||
* units = J / kmol
|
||||
*/
|
||||
void IdealMolalSoln::getStandardChemPotentials(doublereal* mu) const {
|
||||
_updateStandardStateThermo();
|
||||
getGibbs_ref(mu);
|
||||
doublereal pref;
|
||||
doublereal delta_p;
|
||||
|
|
@ -656,6 +715,7 @@ namespace Cantera {
|
|||
* Units: J/kmol
|
||||
*/
|
||||
void IdealMolalSoln::getPureGibbs(doublereal* gpure) const {
|
||||
_updateStandardStateThermo();
|
||||
getGibbs_ref(gpure);
|
||||
doublereal pref;
|
||||
doublereal delta_p;
|
||||
|
|
@ -682,6 +742,7 @@ namespace Cantera {
|
|||
*/
|
||||
void IdealMolalSoln::
|
||||
getEnthalpy_RT(doublereal* hrt) const {
|
||||
_updateStandardStateThermo();
|
||||
getEnthalpy_RT_ref(hrt);
|
||||
doublereal pref;
|
||||
doublereal delta_p;
|
||||
|
|
@ -713,6 +774,7 @@ namespace Cantera {
|
|||
*/
|
||||
void IdealMolalSoln::
|
||||
getEntropy_R(doublereal* sr) const {
|
||||
_updateStandardStateThermo();
|
||||
getEntropy_R_ref(sr);
|
||||
}
|
||||
|
||||
|
|
@ -732,6 +794,7 @@ namespace Cantera {
|
|||
* constant pressure heat capacity for species k.
|
||||
*/
|
||||
void IdealMolalSoln::getCp_R(doublereal* cpr) const {
|
||||
_updateStandardStateThermo();
|
||||
getCp_R_ref(cpr);
|
||||
}
|
||||
|
||||
|
|
@ -747,10 +810,32 @@ namespace Cantera {
|
|||
* Units = m^3 / kmol
|
||||
*/
|
||||
void IdealMolalSoln::getStandardVolumes(doublereal *vol) const {
|
||||
_updateStandardStateThermo();
|
||||
copy(m_speciesMolarVolume.begin(),
|
||||
m_speciesMolarVolume.end(), vol);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Updates the standard state thermodynamic functions at the current T and P of the solution.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* This function gets called for every call to functions in this
|
||||
* class. It checks to see whether the temperature or pressure has changed and
|
||||
* thus the ss thermodynamics functions for all of the species
|
||||
* must be recalculated.
|
||||
*/
|
||||
void IdealMolalSoln::_updateStandardStateThermo(doublereal pnow) const {
|
||||
_updateRefStateThermo();
|
||||
doublereal tnow = temperature();
|
||||
if (pnow == -1.0) {
|
||||
pnow = m_Pcurrent;
|
||||
}
|
||||
if (m_tlast != tnow || m_plast != pnow) {
|
||||
m_tlast = tnow;
|
||||
m_plast = pnow;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ------ Thermodynamic Values for the Species Reference States ---
|
||||
|
|
@ -773,7 +858,7 @@ namespace Cantera {
|
|||
MolalityVPSSTP::initThermo();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Initialization of an IdealMolalSoln phase using an
|
||||
* xml file
|
||||
*
|
||||
|
|
|
|||
|
|
@ -251,9 +251,7 @@ namespace Cantera {
|
|||
*
|
||||
* @param p Input Pressure
|
||||
*/
|
||||
virtual void setPressure(doublereal p) {
|
||||
m_Pcurrent = p;
|
||||
}
|
||||
virtual void setPressure(doublereal p);
|
||||
|
||||
/**
|
||||
* Calculate the density of the mixture using the partial
|
||||
|
|
@ -734,6 +732,20 @@ namespace Cantera {
|
|||
*/
|
||||
virtual void getStandardVolumes(doublereal *vol) const;
|
||||
|
||||
//! Updates the standard state thermodynamic functions at the current T and P of the solution.
|
||||
/*!
|
||||
* @internal
|
||||
*
|
||||
* This function gets called for every call to functions in this
|
||||
* class. It checks to see whether the temperature or pressure has changed and
|
||||
* thus the ss thermodynamics functions for all of the species
|
||||
* must be recalculated.
|
||||
*
|
||||
* Note, this function doesn't really do anything. I just left it in as a template
|
||||
* for other situations which need a calculation at this level.
|
||||
*/
|
||||
virtual void _updateStandardStateThermo(doublereal pres = -1.0) const;
|
||||
|
||||
//@}
|
||||
/// @name Thermodynamic Values for the Species Reference States ---
|
||||
//@{
|
||||
|
|
@ -856,27 +868,7 @@ namespace Cantera {
|
|||
/// These methods are only implemented by subclasses that
|
||||
/// implement full liquid-vapor equations of state.
|
||||
///
|
||||
/*
|
||||
virtual doublereal satTemperature(doublereal p) const {
|
||||
err("satTemperature"); return -1.0;
|
||||
}
|
||||
|
||||
virtual doublereal satPressure(doublereal t) const {
|
||||
err("satPressure"); return -1.0;
|
||||
}
|
||||
|
||||
virtual doublereal vaporFraction() const {
|
||||
err("vaprFraction"); return -1.0;
|
||||
}
|
||||
|
||||
virtual void setState_Tsat(doublereal t, doublereal x) {
|
||||
err("setState_sat");
|
||||
}
|
||||
|
||||
virtual void setState_Psat(doublereal p, doublereal x) {
|
||||
err("setState_sat");
|
||||
}
|
||||
*/
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,15 @@ do_ranlib = @DO_RANLIB@
|
|||
do_electro = @COMPILE_ELECTROLYTES@
|
||||
do_issp = @COMPILE_IDEAL_SOLUTIONS@
|
||||
|
||||
LOCAL_DEFS = -DDEBUG_MODE
|
||||
CXX_FLAGS = @CXXFLAGS@ $(LOCAL_DEFS) $(CXX_OPT)
|
||||
debug_mode = @CANTERA_DEBUG_MODE@
|
||||
ifeq ($(debug_mode), 1)
|
||||
DEBUG_FLAG=-DDEBUG_MODE
|
||||
else
|
||||
DEBUG_FLAG=
|
||||
endif
|
||||
|
||||
#LOCAL_DEFS=-DDEBUG_MODE
|
||||
CXX_FLAGS = @CXXFLAGS@ $(LOCAL_DEFS) $(CXX_OPT) $(DEBUG_FLAG)
|
||||
|
||||
# Extended Cantera Thermodynamics Object Files
|
||||
|
||||
|
|
|
|||
|
|
@ -263,6 +263,8 @@ namespace Cantera {
|
|||
*/
|
||||
virtual void getStandardVolumes(doublereal *vol) const;
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
//! Updates the standard state thermodynamic functions at the current T and P of the solution.
|
||||
|
|
|
|||
6
configure
vendored
6
configure
vendored
|
|
@ -8753,7 +8753,7 @@ fi
|
|||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile Cantera/Makefile Cantera/src/Makefile Cantera/src/zeroD/Makefile Cantera/src/oneD/Makefile Cantera/src/converters/Makefile Cantera/src/transport/Makefile Cantera/src/thermo/Makefile Cantera/clib/src/Makefile Cantera/fortran/src/Makefile Cantera/fortran/f77demos/f77demos.mak Cantera/fortran/f77demos/isentropic.dsp Cantera/matlab/Makefile Cantera/matlab/setup_matlab.py Cantera/matlab/setup_winmatlab.py Cantera/python/Makefile Cantera/python/setup.py Cantera/cxx/Makefile Cantera/cxx/src/Makefile Cantera/cxx/demos/Makefile Cantera/user/Makefile Cantera/python/src/Makefile ext/lapack/Makefile ext/blas/Makefile ext/cvode/Makefile ext/math/Makefile ext/recipes/Makefile ext/tpx/Makefile ext/Makefile ext/f2c_libs/Makefile ext/f2c_blas/Makefile ext/f2c_lapack/Makefile ext/f2c_math/Makefile examples/Makefile examples/cxx/Makefile tools/Makefile tools/doc/Cantera.cfg tools/doc/Makefile tools/src/Makefile tools/src/sample.mak tools/src/finish_install.py tools/src/package4mac tools/templates/f77/demo.mak tools/templates/f90/demo.mak tools/templates/cxx/demo.mak tools/testtools/Makefile data/inputs/Makefile test_problems/Makefile test_problems/cxx_ex/Makefile test_problems/silane_equil/Makefile test_problems/surfkin/Makefile test_problems/diamondSurf/Makefile test_problems/ChemEquil_gri_matrix/Makefile test_problems/ChemEquil_gri_pairs/Makefile test_problems/ChemEquil_ionizedGas/Makefile test_problems/ChemEquil_red1/Makefile test_problems/fracCoeff/Makefile test_problems/negATest/Makefile test_problems/ck2cti_test/Makefile test_problems/ck2cti_test/runtest test_problems/min_python/Makefile test_problems/min_python/minDiamond/Makefile test_problems/min_python/negATest/Makefile test_problems/python/Makefile test_problems/cathermo/Makefile test_problems/cathermo/issp/Makefile test_problems/cathermo/ims/Makefile test_problems/cathermo/testIAPWS/Makefile test_problems/cathermo/testIAPWSPres/Makefile test_problems/cathermo/testIAPWSTripP/Makefile test_problems/cathermo/testWaterPDSS/Makefile test_problems/cathermo/testWaterTP/Makefile test_problems/cathermo/HMW_test_1/Makefile test_problems/cathermo/HMW_test_3/Makefile test_problems/cathermo/HMW_graph_GvT/Makefile test_problems/cathermo/HMW_graph_GvI/Makefile test_problems/cathermo/HMW_graph_HvT/Makefile test_problems/cathermo/HMW_graph_CpvT/Makefile test_problems/cathermo/HMW_graph_VvT/Makefile test_problems/cathermo/DH_graph_1/Makefile bin/install_tsc"
|
||||
ac_config_files="$ac_config_files Makefile Cantera/Makefile Cantera/src/Makefile Cantera/src/zeroD/Makefile Cantera/src/oneD/Makefile Cantera/src/converters/Makefile Cantera/src/transport/Makefile Cantera/src/thermo/Makefile Cantera/clib/src/Makefile Cantera/fortran/src/Makefile Cantera/fortran/f77demos/f77demos.mak Cantera/fortran/f77demos/isentropic.dsp Cantera/matlab/Makefile Cantera/matlab/setup_matlab.py Cantera/matlab/setup_winmatlab.py Cantera/python/Makefile Cantera/python/setup.py Cantera/cxx/Makefile Cantera/cxx/src/Makefile Cantera/cxx/demos/Makefile Cantera/user/Makefile Cantera/python/src/Makefile ext/lapack/Makefile ext/blas/Makefile ext/cvode/Makefile ext/math/Makefile ext/recipes/Makefile ext/tpx/Makefile ext/Makefile ext/f2c_libs/Makefile ext/f2c_blas/Makefile ext/f2c_lapack/Makefile ext/f2c_math/Makefile examples/Makefile examples/cxx/Makefile tools/Makefile tools/doc/Cantera.cfg tools/doc/Makefile tools/src/Makefile tools/src/sample.mak tools/src/finish_install.py tools/src/package4mac tools/templates/f77/demo.mak tools/templates/f90/demo.mak tools/templates/cxx/demo.mak tools/testtools/Makefile data/inputs/Makefile test_problems/Makefile test_problems/cxx_ex/Makefile test_problems/silane_equil/Makefile test_problems/surfkin/Makefile test_problems/diamondSurf/Makefile test_problems/ChemEquil_gri_matrix/Makefile test_problems/ChemEquil_gri_pairs/Makefile test_problems/ChemEquil_ionizedGas/Makefile test_problems/ChemEquil_red1/Makefile test_problems/fracCoeff/Makefile test_problems/negATest/Makefile test_problems/ck2cti_test/Makefile test_problems/ck2cti_test/runtest test_problems/min_python/Makefile test_problems/min_python/minDiamond/Makefile test_problems/min_python/negATest/Makefile test_problems/python/Makefile test_problems/cathermo/Makefile test_problems/cathermo/issp/Makefile test_problems/cathermo/ims/Makefile test_problems/cathermo/testIAPWS/Makefile test_problems/cathermo/testIAPWSPres/Makefile test_problems/cathermo/testIAPWSTripP/Makefile test_problems/cathermo/testWaterPDSS/Makefile test_problems/cathermo/testWaterTP/Makefile test_problems/cathermo/HMW_test_1/Makefile test_problems/cathermo/HMW_test_3/Makefile test_problems/cathermo/HMW_graph_GvT/Makefile test_problems/cathermo/HMW_graph_GvI/Makefile test_problems/cathermo/HMW_graph_HvT/Makefile test_problems/cathermo/HMW_graph_CpvT/Makefile test_problems/cathermo/HMW_graph_VvT/Makefile test_problems/cathermo/DH_graph_1/Makefile test_problems/cathermo/DH_graph_acommon/Makefile test_problems/cathermo/DH_graph_NM/Makefile test_problems/cathermo/DH_graph_Pitzer/Makefile test_problems/cathermo/DH_graph_bdotak/Makefile bin/install_tsc"
|
||||
|
||||
|
||||
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||
|
|
@ -9306,6 +9306,10 @@ do
|
|||
"test_problems/cathermo/HMW_graph_CpvT/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/HMW_graph_CpvT/Makefile" ;;
|
||||
"test_problems/cathermo/HMW_graph_VvT/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/HMW_graph_VvT/Makefile" ;;
|
||||
"test_problems/cathermo/DH_graph_1/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/DH_graph_1/Makefile" ;;
|
||||
"test_problems/cathermo/DH_graph_acommon/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/DH_graph_acommon/Makefile" ;;
|
||||
"test_problems/cathermo/DH_graph_NM/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/DH_graph_NM/Makefile" ;;
|
||||
"test_problems/cathermo/DH_graph_Pitzer/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/DH_graph_Pitzer/Makefile" ;;
|
||||
"test_problems/cathermo/DH_graph_bdotak/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/DH_graph_bdotak/Makefile" ;;
|
||||
"bin/install_tsc" ) CONFIG_FILES="$CONFIG_FILES bin/install_tsc" ;;
|
||||
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
||||
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
|
||||
|
|
|
|||
|
|
@ -1394,6 +1394,10 @@ AC_OUTPUT(Makefile \
|
|||
test_problems/cathermo/HMW_graph_CpvT/Makefile \
|
||||
test_problems/cathermo/HMW_graph_VvT/Makefile \
|
||||
test_problems/cathermo/DH_graph_1/Makefile \
|
||||
test_problems/cathermo/DH_graph_acommon/Makefile \
|
||||
test_problems/cathermo/DH_graph_NM/Makefile \
|
||||
test_problems/cathermo/DH_graph_Pitzer/Makefile \
|
||||
test_problems/cathermo/DH_graph_bdotak/Makefile \
|
||||
bin/install_tsc \
|
||||
)
|
||||
# )
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ DH_NaCl_dilute.csv
|
|||
DH_graph_1
|
||||
DH_graph_1.log
|
||||
DH_graph_1.d
|
||||
DH_graph_1.out
|
||||
DH_graph_1.csv
|
||||
csvCode.txt
|
||||
diff.out
|
||||
diff_test.out
|
||||
|
|
|
|||
|
|
@ -1,263 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<ctml>
|
||||
|
||||
<phase id="NaCl_electrolyte" dim="3">
|
||||
<state>
|
||||
<temperature units="K"> 300 </temperature>
|
||||
<pressure units="Pa">101325.0</pressure>
|
||||
<soluteMolalities>
|
||||
Na+:9.3549
|
||||
Cl-:9.3549
|
||||
H+:1.0499E-8
|
||||
OH-:1.3765E-6
|
||||
NaCl(aq):0.98492
|
||||
NaOH(aq):3.8836E-6
|
||||
NaH3SiO4(aq):6.8798E-5
|
||||
SiO2(aq):3.0179E-5
|
||||
H3SiO4-:1.0231E-6
|
||||
</soluteMolalities>
|
||||
</state>
|
||||
<!-- thermo model identifies the inherited class
|
||||
from ThermoPhase that will handle the thermodynamics.
|
||||
-->
|
||||
<thermo model="DebyeHuckel">
|
||||
<standardConc model="solvent_volume" />
|
||||
<activityCoefficients model="Bdot_with_variable_a">
|
||||
<!-- A_Debye units = sqrt(kg/gmol)
|
||||
-->
|
||||
<A_Debye> 1.172576 </A_Debye>
|
||||
<!-- B_Debye units = sqrt(kg/gmol)/m
|
||||
-->
|
||||
<B_Debye> 3.28640E9 </B_Debye>
|
||||
<B_dot> 0.0410 </B_dot>
|
||||
<maxIonicStrength> 3.0 </maxIonicStrength>
|
||||
<UseHelgesonFixedForm />
|
||||
<ionicRadius default="4.0" units="Angstroms">
|
||||
Na+:4.0
|
||||
Cl-:3.0
|
||||
H+:9.0
|
||||
OH-:3.5
|
||||
</ionicRadius>
|
||||
</activityCoefficients>
|
||||
<solvent> H2O(L) </solvent>
|
||||
</thermo>
|
||||
<elementArray datasrc="elements.xml"> O H C Fe Si N Na Cl </elementArray>
|
||||
<speciesArray datasrc="#species_waterSolution">
|
||||
H2O(L) Na+ Cl- H+ OH- NaCl(aq) NaOH(aq) SiO2(aq)
|
||||
NaH3SiO4(aq) H3SiO4-
|
||||
</speciesArray>
|
||||
<kinetics model="none" />
|
||||
</phase>
|
||||
|
||||
|
||||
<speciesData id="species_waterSolution">
|
||||
|
||||
<!-- species H2O(L) -->
|
||||
<species name="H2O(L)">
|
||||
<atomArray>H:2 O:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="600.0" Tmin="273.14999999999998" P0="101325.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
7.255750050E+01, -6.624454020E-01,
|
||||
2.561987460E-03, -4.365919230E-06,
|
||||
2.781789810E-09, -4.188671E+04, -2.8827879E+02
|
||||
</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 0.05555555 </molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
<species name="Na+">
|
||||
<atomArray> Na:1 </atomArray>
|
||||
<charge> +1 </charge>
|
||||
<thermo>
|
||||
<Mu0 Pref="101325.0" Tmax="1000.0" Tmin="200.0">
|
||||
<H298 units="kJ/mol"> -240.34 </H298>
|
||||
<numPoints> 2 </numPoints>
|
||||
<floatArray size="2" title="Mu0Values" units="Dimensionless">
|
||||
-103.98186, -103.98186
|
||||
</floatArray>
|
||||
<floatArray size="2" title="Mu0Temperatures">
|
||||
298.15, 333.15
|
||||
</floatArray>
|
||||
</Mu0>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 1.3 </molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
<species name="Cl-">
|
||||
<atomArray> Cl:1 </atomArray>
|
||||
<charge> -1 </charge>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 1.3 </molarVolume>
|
||||
</standardState>
|
||||
<thermo>
|
||||
<Mu0 Pref="101325.0" Tmax="333." Tmin="298.">
|
||||
<H298 units="kJ/mol"> -167.08 </H298>
|
||||
<numPoints> 2 </numPoints>
|
||||
<floatArray size="2" title="Mu0Values" units="Dimensionless">
|
||||
-74.20664, -74.20664
|
||||
</floatArray>
|
||||
<floatArray size="2" title="Mu0Temperatures">
|
||||
298.15, 333.15
|
||||
</floatArray>
|
||||
</Mu0>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<species name="H+">
|
||||
<atomArray> H:1 </atomArray>
|
||||
<charge> +1 </charge>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 0.0 </molarVolume>
|
||||
</standardState>
|
||||
<thermo>
|
||||
<Mu0 Pref="101325.0" Tmax="333." Tmin="298.">
|
||||
<H298 units="cal/mol"> 0.0 </H298>
|
||||
<numPoints> 2 </numPoints>
|
||||
<floatArray size="2" title="Mu0Values" units="Dimensionless">
|
||||
0.0, 0.0
|
||||
</floatArray>
|
||||
<floatArray size="2" title="Mu0Temperatures">
|
||||
298.15, 333.15
|
||||
</floatArray>
|
||||
</Mu0>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<species name="OH-">
|
||||
<atomArray> O:1 H:1 </atomArray>
|
||||
<charge> -1 </charge>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 1.3 </molarVolume>
|
||||
</standardState>
|
||||
<thermo>
|
||||
<Mu0 Pref="101325.0" Tmax="333." Tmin="298.">
|
||||
<H298 units="kJ/mol"> -230.015 </H298>
|
||||
<numPoints> 2 </numPoints>
|
||||
<floatArray size="2" title="Mu0Values" units="Dimensionless">
|
||||
-91.50963 , -85.
|
||||
</floatArray>
|
||||
<floatArray size="2" title="Mu0Temperatures">
|
||||
298.15, 333.15
|
||||
</floatArray>
|
||||
</Mu0>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<species name="NaCl(aq)">
|
||||
<atomArray> Na:1 Cl:1 </atomArray>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 1.3 </molarVolume>
|
||||
</standardState>
|
||||
<stoichIsMods> -1.0 </stoichIsMods>
|
||||
<electrolyteSpeciesType> weakAcidAssociated </electrolyteSpeciesType>
|
||||
<thermo>
|
||||
<Mu0 Pref="101325.0" Tmax="333." Tmin="298.">
|
||||
<H298 units="cal/mol"> -96.03E3 </H298>
|
||||
<numPoints> 2 </numPoints>
|
||||
<!-- -176.188, -176.188 -->
|
||||
<floatArray size="2" title="Mu0Values" units="Dimensionless">
|
||||
-174.5057463, -174.5057463
|
||||
</floatArray>
|
||||
<floatArray size="2" title="Mu0Temperatures">
|
||||
298.15, 333.15
|
||||
</floatArray>
|
||||
</Mu0>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<species name="NaOH(aq)">
|
||||
<atomArray> Na:1 O:1 H:1 </atomArray>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 1.3 </molarVolume>
|
||||
</standardState>
|
||||
<stoichIsMods> -1.0 </stoichIsMods>
|
||||
<electrolyteSpeciesType> weakAcidAssociated </electrolyteSpeciesType>
|
||||
<thermo>
|
||||
<Mu0 Pref="101325.0" Tmax="333." Tmin="298.">
|
||||
<H298 units="kJ/mol"> -472.4865 </H298>
|
||||
<numPoints> 2 </numPoints>
|
||||
<!-- -193.6185, -193.9308 -->
|
||||
<floatArray size="2" title="Mu0Values" units="Dimensionless">
|
||||
-195.02569, -195.02569
|
||||
</floatArray>
|
||||
<floatArray size="2" title="Mu0Temperatures">
|
||||
298.15, 323.15
|
||||
</floatArray>
|
||||
</Mu0>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<species name="SiO2(aq)">
|
||||
<atomArray> Si:1 O:2 </atomArray>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 1.3 </molarVolume>
|
||||
</standardState>
|
||||
<stoichIsMods> 0.0 </stoichIsMods>
|
||||
<electrolyteSpeciesType> nonpolarNeutral </electrolyteSpeciesType>
|
||||
<thermo>
|
||||
<Mu0 Pref="101325.0" Tmax="333." Tmin="298.">
|
||||
<H298 units="kJ/mol"> -890. </H298>
|
||||
<numPoints> 2 </numPoints>
|
||||
<floatArray size="2" title="Mu0Values" units="Dimensionless">
|
||||
-363.2104, -300.
|
||||
</floatArray>
|
||||
<floatArray size="2" title="Mu0Temperatures">
|
||||
298.15, 323.15
|
||||
</floatArray>
|
||||
</Mu0>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<species name="NaH3SiO4(aq)">
|
||||
<atomArray> Na:1 H:3 Si:1 O:4 </atomArray>
|
||||
<charge> 0 </charge>
|
||||
<stoichIsMods> -1.0 </stoichIsMods>
|
||||
<electrolyteSpeciesType> weakAcidAssociated </electrolyteSpeciesType>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 1.3 </molarVolume>
|
||||
</standardState>
|
||||
<thermo>
|
||||
<Mu0 Pref="101325.0" Tmax="333." Tmin="298.">
|
||||
<H298 units="kJ/mol"> -890. </H298>
|
||||
<numPoints> 2 </numPoints>
|
||||
<floatArray size="2" title="Mu0Values" units="Dimensionless">
|
||||
-694.683918 , -300.
|
||||
</floatArray>
|
||||
<floatArray size="2" title="Mu0Temperatures">
|
||||
298.15, 323.15
|
||||
</floatArray>
|
||||
</Mu0>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<species name="H3SiO4-">
|
||||
<atomArray> Si:1 O:4 H:3 </atomArray>
|
||||
<charge> -1 </charge>
|
||||
<stoichIsMods> -1.0 </stoichIsMods>
|
||||
<electrolyteSpeciesType> chargedSpecies </electrolyteSpeciesType>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 1.3 </molarVolume>
|
||||
</standardState>
|
||||
<thermo>
|
||||
<Mu0 Pref="101325.0" Tmax="333." Tmin="298.">
|
||||
<H298 units="cal/mol"> 0.0 </H298>
|
||||
<numPoints> 2 </numPoints>
|
||||
<floatArray size="2" title="Mu0Values" units="Dimensionless">
|
||||
-588.0556 , -450
|
||||
</floatArray>
|
||||
<floatArray size="2" title="Mu0Temperatures">
|
||||
298.15, 333.15
|
||||
</floatArray>
|
||||
</Mu0>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
|
||||
</speciesData>
|
||||
</ctml>
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
Is, sqrtIs, meanAc, log10(meanAC), acMol_Na+,, acMol_Cl-, ac_Water
|
||||
0, 0, 1, 0, 1, 1, 1
|
||||
0.0010203, 0.0319422, 0.96461, -0.0156485, 0.964786, 0.964433, 1
|
||||
0.00408122, 0.0638844, 0.932951, -0.0301413, 0.933588, 0.932314, 1
|
||||
0.00918274, 0.0958266, 0.90451, -0.0435866, 0.90581, 0.903212, 1.00001
|
||||
0.0163249, 0.127769, 0.878865, -0.056078, 0.880969, 0.876765, 1.00002
|
||||
0.0255076, 0.159711, 0.855663, -0.0676974, 0.858671, 0.852665, 1.00004
|
||||
0.0367309, 0.191653, 0.83461, -0.0785164, 0.838588, 0.830651, 1.00007
|
||||
0.0499949, 0.223595, 0.815458, -0.0885983, 0.820448, 0.810499, 1.0001
|
||||
0.0652995, 0.255538, 0.797997, -0.097999, 0.804022, 0.792016, 1.00014
|
||||
0.0826446, 0.28748, 0.782046, -0.106768, 0.789119, 0.775035, 1.00019
|
||||
0.10203, 0.319422, 0.767451, -0.114949, 0.775574, 0.759412, 1.00024
|
||||
0.123457, 0.351364, 0.754079, -0.122583, 0.763248, 0.745021, 1.00031
|
||||
0.146924, 0.383306, 0.741815, -0.129704, 0.752019, 0.73175, 1.00038
|
||||
0.172431, 0.415249, 0.730559, -0.136345, 0.741784, 0.719503, 1.00046
|
||||
0.19998, 0.447191, 0.720222, -0.142534, 0.732454, 0.708194, 1.00054
|
||||
0.229568, 0.479133, 0.710728, -0.148297, 0.723949, 0.697747, 1.00063
|
||||
0.261198, 0.511075, 0.702008, -0.153658, 0.716202, 0.688096, 1.00072
|
||||
0.294868, 0.543017, 0.694003, -0.158638, 0.709151, 0.67918, 1.00082
|
||||
0.330579, 0.57496, 0.686661, -0.163258, 0.702744, 0.670946, 1.00092
|
||||
0.36833, 0.606902, 0.679933, -0.167534, 0.696934, 0.663346, 1.00103
|
||||
0.408122, 0.638844, 0.673777, -0.171484, 0.69168, 0.656338, 1.00114
|
||||
0.449954, 0.670786, 0.668157, -0.175121, 0.686945, 0.649883, 1.00125
|
||||
0.493827, 0.702728, 0.663039, -0.178461, 0.682697, 0.643947, 1.00136
|
||||
0.539741, 0.734671, 0.658392, -0.181516, 0.678905, 0.638499, 1.00147
|
||||
0.587695, 0.766613, 0.654189, -0.184296, 0.675544, 0.63351, 1.00157
|
||||
0.63769, 0.798555, 0.650407, -0.186815, 0.672591, 0.628955, 1.00168
|
||||
0.689726, 0.830497, 0.647023, -0.18908, 0.670024, 0.624812, 1.00178
|
||||
0.743802, 0.862439, 0.644018, -0.191102, 0.667825, 0.621059, 1.00188
|
||||
0.799918, 0.894382, 0.641374, -0.192889, 0.665978, 0.617678, 1.00197
|
||||
0.858076, 0.926324, 0.639074, -0.194449, 0.664467, 0.614651, 1.00205
|
||||
0.918274, 0.958266, 0.637104, -0.19579, 0.663278, 0.611963, 1.00212
|
||||
0.980512, 0.990208, 0.635451, -0.196918, 0.662399, 0.6096, 1.00219
|
||||
1.04479, 1.02215, 0.634103, -0.19784, 0.66182, 0.607548, 1.00224
|
||||
1.11111, 1.05409, 0.63305, -0.198562, 0.66153, 0.605797, 1.00227
|
||||
1.17947, 1.08603, 0.632282, -0.199089, 0.661521, 0.604335, 1.0023
|
||||
1.24987, 1.11798, 0.631789, -0.199428, 0.661785, 0.603153, 1.0023
|
||||
1.32231, 1.14992, 0.631565, -0.199582, 0.662315, 0.602242, 1.00228
|
||||
1.3968, 1.18186, 0.631602, -0.199557, 0.663105, 0.601595, 1.00225
|
||||
1.47332, 1.2138, 0.631893, -0.199356, 0.664149, 0.601203, 1.00219
|
||||
1.55188, 1.24575, 0.632434, -0.198985, 0.665443, 0.601062, 1.0021
|
||||
1.63249, 1.27769, 0.633219, -0.198446, 0.666982, 0.601165, 1.00199
|
||||
1.71513, 1.30963, 0.634244, -0.197744, 0.668763, 0.601506, 1.00185
|
||||
1.79982, 1.34157, 0.635504, -0.196881, 0.670782, 0.602082, 1.00167
|
||||
1.88654, 1.37351, 0.636998, -0.195862, 0.673038, 0.602888, 1.00146
|
||||
1.97531, 1.40546, 0.638721, -0.194689, 0.675527, 0.60392, 1.00122
|
||||
2.06612, 1.4374, 0.640671, -0.193365, 0.678248, 0.605176, 1.00093
|
||||
2.15896, 1.46934, 0.642847, -0.191892, 0.681201, 0.606653, 1.0006
|
||||
2.25385, 1.50128, 0.645247, -0.190274, 0.684384, 0.608348, 1.00022
|
||||
2.35078, 1.53323, 0.647869, -0.188513, 0.687796, 0.61026, 0.9998
|
||||
2.44975, 1.56517, 0.650713, -0.18661, 0.691438, 0.612387, 0.999326
|
||||
2.55076, 1.59711, 0.653779, -0.184569, 0.695309, 0.614729, 0.998798
|
||||
2.65381, 1.62905, 0.657065, -0.182392, 0.699411, 0.617283, 0.998212
|
||||
2.7589, 1.66099, 0.660573, -0.180079, 0.703744, 0.62005, 0.997567
|
||||
2.86603, 1.69294, 0.664302, -0.177634, 0.70831, 0.623029, 0.996858
|
||||
2.97521, 1.72488, 0.668254, -0.175058, 0.713109, 0.626221, 0.996083
|
||||
3.08642, 1.75682, 0.669172, -0.174462, 0.714219, 0.626967, 0.998696
|
||||
3.19967, 1.78876, 0.669172, -0.174462, 0.714219, 0.626967, 1.00236
|
||||
3.31497, 1.82071, 0.669172, -0.174462, 0.714219, 0.626967, 1.00609
|
||||
3.4323, 1.85265, 0.669172, -0.174462, 0.714219, 0.626967, 1.00989
|
||||
3.55168, 1.88459, 0.669172, -0.174462, 0.714219, 0.626967, 1.01375
|
||||
3.67309, 1.91653, 0.669172, -0.174462, 0.714219, 0.626967, 1.01768
|
||||
3.79655, 1.94847, 0.669172, -0.174462, 0.714219, 0.626967, 1.02167
|
||||
3.92205, 1.98042, 0.669172, -0.174462, 0.714219, 0.626967, 1.02573
|
||||
4.04959, 2.01236, 0.669172, -0.174462, 0.714219, 0.626967, 1.02986
|
||||
4.17917, 2.0443, 0.669172, -0.174462, 0.714219, 0.626967, 1.03405
|
||||
4.31078, 2.07624, 0.669172, -0.174462, 0.714219, 0.626967, 1.03831
|
||||
4.44444, 2.10819, 0.669172, -0.174462, 0.714219, 0.626967, 1.04264
|
||||
4.58014, 2.14013, 0.669172, -0.174462, 0.714219, 0.626967, 1.04703
|
||||
4.71789, 2.17207, 0.669172, -0.174462, 0.714219, 0.626967, 1.05149
|
||||
4.85767, 2.20401, 0.669172, -0.174462, 0.714219, 0.626967, 1.05601
|
||||
4.99949, 2.23595, 0.669172, -0.174462, 0.714219, 0.626967, 1.0606
|
||||
5.14335, 2.2679, 0.669172, -0.174462, 0.714219, 0.626967, 1.06525
|
||||
5.28926, 2.29984, 0.669172, -0.174462, 0.714219, 0.626967, 1.06997
|
||||
5.4372, 2.33178, 0.669172, -0.174462, 0.714219, 0.626967, 1.07476
|
||||
5.58718, 2.36372, 0.669172, -0.174462, 0.714219, 0.626967, 1.07961
|
||||
5.73921, 2.39566, 0.669172, -0.174462, 0.714219, 0.626967, 1.08453
|
||||
5.89328, 2.42761, 0.669172, -0.174462, 0.714219, 0.626967, 1.08952
|
||||
6.04938, 2.45955, 0.669172, -0.174462, 0.714219, 0.626967, 1.09457
|
||||
6.20753, 2.49149, 0.669172, -0.174462, 0.714219, 0.626967, 1.09969
|
||||
6.36772, 2.52343, 0.669172, -0.174462, 0.714219, 0.626967, 1.10487
|
||||
6.52995, 2.55538, 0.669172, -0.174462, 0.714219, 0.626967, 1.11012
|
||||
6.69421, 2.58732, 0.669172, -0.174462, 0.714219, 0.626967, 1.11544
|
||||
6.86052, 2.61926, 0.669172, -0.174462, 0.714219, 0.626967, 1.12082
|
||||
7.02887, 2.6512, 0.669172, -0.174462, 0.714219, 0.626967, 1.12626
|
||||
7.19927, 2.68314, 0.669172, -0.174462, 0.714219, 0.626967, 1.13178
|
||||
7.3717, 2.71509, 0.669172, -0.174462, 0.714219, 0.626967, 1.13736
|
||||
7.54617, 2.74703, 0.669172, -0.174462, 0.714219, 0.626967, 1.143
|
||||
7.72268, 2.77897, 0.669172, -0.174462, 0.714219, 0.626967, 1.14871
|
||||
7.90123, 2.81091, 0.669172, -0.174462, 0.714219, 0.626967, 1.15449
|
||||
8.08183, 2.84286, 0.669172, -0.174462, 0.714219, 0.626967, 1.16034
|
||||
8.26446, 2.8748, 0.669172, -0.174462, 0.714219, 0.626967, 1.16625
|
||||
8.44914, 2.90674, 0.669172, -0.174462, 0.714219, 0.626967, 1.17222
|
||||
8.63585, 2.93868, 0.669172, -0.174462, 0.714219, 0.626967, 1.17826
|
||||
8.82461, 2.97062, 0.669172, -0.174462, 0.714219, 0.626967, 1.18437
|
||||
9.01541, 3.00257, 0.669172, -0.174462, 0.714219, 0.626967, 1.19054
|
||||
9.20824, 3.03451, 0.669172, -0.174462, 0.714219, 0.626967, 1.19678
|
||||
9.40312, 3.06645, 0.669172, -0.174462, 0.714219, 0.626967, 1.20309
|
||||
9.60004, 3.09839, 0.669172, -0.174462, 0.714219, 0.626967, 1.20946
|
||||
9.799, 3.13034, 0.669172, -0.174462, 0.714219, 0.626967, 1.2159
|
||||
10, 3.16228, 0.669172, -0.174462, 0.714219, 0.626967, 1.2224
|
||||
|
|
|
@ -23,23 +23,17 @@ if test ! -x $prog ; then
|
|||
exit -1
|
||||
fi
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_graph_1.out
|
||||
/bin/rm -f test.out test.diff DH_graph_1.csv
|
||||
|
||||
echo 'Testing the DH dilute act calculation - act vs I'
|
||||
/bin/rm -f DH_graph_1.out
|
||||
$prog DH_NaCl_dilute.xml > DH_graph_1.out
|
||||
# echo 'Testing the DH dilute act calculation - act vs I'
|
||||
$prog DH_NaCl_dilute.xml > DH_graph_1.csv
|
||||
retnStat=$?
|
||||
echo 'Making a comparison with the good saved solution: '
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
diff DH_graph_1.out DH_NaCl_dilute_blessed.csv > diff.out
|
||||
diff DH_graph_1.csv DH_NaCl_dilute_blessed.csv > diff.out
|
||||
zres=$?
|
||||
cat diff.out
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
echo 'End of comparison'
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo 'test dilute passed'
|
||||
echo "successful diff comparison on $prog dilute test"
|
||||
else
|
||||
echo 'test dilute failed'
|
||||
echo "unsuccessful diff comparison on $prog dilute test"
|
||||
temp_success="1"
|
||||
if [ $retnStat != "0" ]
|
||||
then
|
||||
|
|
@ -47,129 +41,11 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_NaCl_acommon.csv
|
||||
|
||||
echo 'Testing the DH dilute act calculation - act vs I'
|
||||
$prog DH_NaCl_acommon.xml > DH_NaCl_acommon.csv
|
||||
retnStat=$?
|
||||
echo 'Making a comparison with the good saved solution: '
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
diff DH_NaCl_acommon.csv DH_NaCl_acommon_blessed.csv > diff.out
|
||||
zres=$?
|
||||
cat diff.out
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
echo 'End of comparison'
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo 'test acommon passed'
|
||||
else
|
||||
echo 'test acommon failed'
|
||||
temp_success="1"
|
||||
if [ $retnStat != "0" ]
|
||||
then
|
||||
echo "$prog returned with bad status, $retnStat, check output"
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_NaCl_acommon.csv
|
||||
|
||||
echo 'Testing the DH dilute act calculation - act vs I'
|
||||
$prog DH_NaCl_acommon.xml > DH_NaCl_acommon.csv
|
||||
retnStat=$?
|
||||
echo 'Making a comparison with the good saved solution: '
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
diff DH_NaCl_acommon.csv DH_NaCl_acommon_blessed.csv > diff.out
|
||||
zres=$?
|
||||
cat diff.out
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
echo 'End of comparison'
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo 'test acommon passed'
|
||||
else
|
||||
echo 'test acommon failed'
|
||||
temp_success="1"
|
||||
if [ $retnStat != "0" ]
|
||||
then
|
||||
echo "$prog returned with bad status, $retnStat, check output"
|
||||
fi
|
||||
fi
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_NaCl_bdotak.csv
|
||||
|
||||
echo 'Testing the DH bdotak act calculation - act vs I'
|
||||
$prog DH_NaCl_bdotak.xml > DH_NaCl_bdotak.csv
|
||||
retnStat=$?
|
||||
echo 'Making a comparison with the good saved solution: '
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
diff DH_NaCl_bdotak.csv DH_NaCl_bdotak_blessed.csv > diff.out
|
||||
zres=$?
|
||||
cat diff.out
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
echo 'End of comparison'
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo 'test bdotak passed'
|
||||
else
|
||||
echo 'test bdotak failed'
|
||||
temp_success="1"
|
||||
if [ $retnStat != "0" ]
|
||||
then
|
||||
echo "$prog returned with bad status, $retnStat, check output"
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_NaCl_NM.csv
|
||||
|
||||
echo 'Testing the DH NM act calculation - act vs I'
|
||||
$prog DH_NaCl_NM.xml > DH_NaCl_NM.csv
|
||||
retnStat=$?
|
||||
echo 'Making a comparison with the good saved solution: '
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
diff DH_NaCl_NM.csv DH_NaCl_NM_blessed.csv > diff.out
|
||||
zres=$?
|
||||
cat diff.out
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
echo 'End of comparison'
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo 'test NM passed'
|
||||
else
|
||||
echo 'test NM failed'
|
||||
temp_success="1"
|
||||
if [ $retnStat != "0" ]
|
||||
then
|
||||
echo "$prog returned with bad status, $retnStat, check output"
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_NaCl_Pitzer.csv
|
||||
|
||||
echo 'Testing the DH Pitzer act calculation - act vs I'
|
||||
$prog DH_NaCl_Pitzer.xml > DH_NaCl_Pitzer.csv
|
||||
retnStat=$?
|
||||
echo 'Making a comparison with the good saved solution: '
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
diff DH_NaCl_Pitzer.csv DH_NaCl_Pitzer_blessed.csv > diff.out
|
||||
zres=$?
|
||||
cat diff.out
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
echo 'End of comparison'
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo 'test Pitzer passed'
|
||||
else
|
||||
echo 'test Pitzer failed'
|
||||
temp_success="1"
|
||||
if [ $retnStat != "0" ]
|
||||
then
|
||||
echo "$prog returned with bad status, $retnStat, check output"
|
||||
fi
|
||||
fi
|
||||
##########################################################################
|
||||
if test $temp_success = "0" ; then
|
||||
echo 'Overall DH_graph_1 test passed'
|
||||
echo "PASSED" > csvCode.txt
|
||||
else
|
||||
echo 'Overall DH_graph_1 test failed'
|
||||
echo "FAILED" > csvCode.txt
|
||||
fi
|
||||
|
|
|
|||
7
test_problems/cathermo/DH_graph_NM/.cvsignore
Normal file
7
test_problems/cathermo/DH_graph_NM/.cvsignore
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
.depends
|
||||
DH_NaCl_NM.csv
|
||||
DH_graph_1
|
||||
DH_graph_1.d
|
||||
DH_graph_1.log
|
||||
Makefile
|
||||
output.txt
|
||||
148
test_problems/cathermo/DH_graph_NM/DH_graph_1.cpp
Normal file
148
test_problems/cathermo/DH_graph_NM/DH_graph_1.cpp
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
*
|
||||
* @file DH_graph_1
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Author$
|
||||
* $Date$
|
||||
* $Revision$
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef SRCDIRTREE
|
||||
#include "ct_defs.h"
|
||||
#include "logger.h"
|
||||
#include "DebyeHuckel.h"
|
||||
#else
|
||||
#include "cantera/Cantera.h"
|
||||
#include "cantera/kernel/logger.h"
|
||||
#include "cantera/kernel/thermo/DebyeHuckel.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
class fileLog: public Logger {
|
||||
public:
|
||||
fileLog(string fName) {
|
||||
m_fName = fName;
|
||||
m_fs.open(fName.c_str());
|
||||
}
|
||||
|
||||
virtual void write(const string& msg) {
|
||||
m_fs << msg;
|
||||
m_fs << endl;
|
||||
}
|
||||
|
||||
virtual ~fileLog() {
|
||||
m_fs.close();
|
||||
}
|
||||
|
||||
string m_fName;
|
||||
ofstream m_fs;
|
||||
|
||||
};
|
||||
|
||||
void printUsage() {
|
||||
cout << "usage: DH_test " << endl;
|
||||
cout <<" -> Everything is hardwired" << endl;
|
||||
}
|
||||
|
||||
void pAtable(DebyeHuckel *DH) {
|
||||
int nsp = DH->nSpecies();
|
||||
double acMol[100];
|
||||
double mf[100];
|
||||
double activities[100];
|
||||
double moll[100];
|
||||
|
||||
DH->getMolalityActivityCoefficients(acMol);
|
||||
DH->getMoleFractions(mf);
|
||||
DH->getActivities(activities);
|
||||
DH->getMolalities(moll);
|
||||
string sName;
|
||||
printf(" Name Activity ActCoeffMolal "
|
||||
" MoleFract Molality\n");
|
||||
for (int k = 0; k < nsp; k++) {
|
||||
sName = DH->speciesName(k);
|
||||
printf("%16s %13g %13g %13g %13g\n",
|
||||
sName.c_str(), activities[k], acMol[k], mf[k], moll[k]);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
int retn = 0;
|
||||
int i;
|
||||
string fName = "DH_graph_1.log";
|
||||
fileLog *fl = new fileLog(fName);
|
||||
try {
|
||||
|
||||
char iFile[80];
|
||||
strcpy(iFile, "DH_NaCl.xml");
|
||||
if (argc > 1) {
|
||||
strcpy(iFile, argv[1]);
|
||||
}
|
||||
setLogger(fl);
|
||||
|
||||
DebyeHuckel *DH = new DebyeHuckel(iFile, "NaCl_electrolyte");
|
||||
|
||||
int nsp = DH->nSpecies();
|
||||
double acMol[100];
|
||||
double mf[100];
|
||||
double moll[100];
|
||||
DH->getMoleFractions(mf);
|
||||
string sName;
|
||||
|
||||
DH->setState_TP(298.15, 1.01325E5);
|
||||
|
||||
int i1 = DH->speciesIndex("Na+");
|
||||
int i2 = DH->speciesIndex("Cl-");
|
||||
int i3 = DH->speciesIndex("H2O(L)");
|
||||
for (i = 1; i < nsp; i++) {
|
||||
moll[i] = 0.0;
|
||||
}
|
||||
DH->setMolalities(moll);
|
||||
double Itop = 10.;
|
||||
double Ibot = 0.0;
|
||||
double ISQRTtop = sqrt(Itop);
|
||||
double ISQRTbot = sqrt(Ibot);
|
||||
double ISQRT;
|
||||
double Is = 0.0;
|
||||
int its = 100;
|
||||
printf(" Is, sqrtIs, meanAc,"
|
||||
" log10(meanAC), acMol_Na+,"
|
||||
", acMol_Cl-, ac_Water\n");
|
||||
for (i = 0; i < its; i++) {
|
||||
ISQRT = ISQRTtop*((double)i)/(its - 1.0)
|
||||
+ ISQRTbot*(1.0 - (double)i/(its - 1.0));
|
||||
Is = ISQRT * ISQRT;
|
||||
moll[i1] = Is;
|
||||
moll[i2] = Is;
|
||||
DH->setMolalities(moll);
|
||||
DH->getMolalityActivityCoefficients(acMol);
|
||||
double meanAC = sqrt(acMol[i1] * acMol[i2]);
|
||||
printf("%15g, %15g, %15g, %15g, %15g, %15g, %15g\n",
|
||||
Is, ISQRT, meanAC, log10(meanAC),
|
||||
acMol[i1], acMol[i2], acMol[i3]);
|
||||
}
|
||||
|
||||
|
||||
delete DH;
|
||||
DH = 0;
|
||||
/*
|
||||
* This delete the file logger amongst other things.
|
||||
*/
|
||||
Cantera::appdelete();
|
||||
|
||||
return retn;
|
||||
|
||||
} catch (CanteraError) {
|
||||
showErrors();
|
||||
if (fl) {
|
||||
delete fl;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
112
test_problems/cathermo/DH_graph_NM/Makefile.in
Normal file
112
test_problems/cathermo/DH_graph_NM/Makefile.in
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
#!/bin/sh
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Makefile to compile and link a C++ application to
|
||||
# Cantera.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# addition to suffixes
|
||||
.SUFFIXES : .d
|
||||
|
||||
# the name of the executable program to be created
|
||||
PROG_NAME = DH_graph_1
|
||||
|
||||
# the object files to be linked together. List those generated from Fortran
|
||||
# and from C/C++ separately
|
||||
OBJS = DH_graph_1.o
|
||||
|
||||
# Location of the current build. Will assume that tests are run
|
||||
# in the source directory tree location
|
||||
src_dir_tree = 1
|
||||
|
||||
# additional flags to be passed to the linker. If your program
|
||||
# requires other external libraries, put them here
|
||||
LINK_OPTIONS = @EXTRA_LINK@
|
||||
|
||||
#############################################################################
|
||||
|
||||
# Check to see whether we are in the msvc++ environment
|
||||
os_is_win = @OS_IS_WIN@
|
||||
|
||||
# Fortran libraries
|
||||
FORT_LIBS = @FLIBS@
|
||||
|
||||
# the C++ compiler
|
||||
CXX = @CXX@
|
||||
|
||||
# C++ compile flags
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CXX_FLAGS = -DSRCDIRTREE @CXXFLAGS@
|
||||
else
|
||||
CXX_FLAGS = @CXXFLAGS@
|
||||
endif
|
||||
|
||||
# Ending C++ linking libraries
|
||||
LCXX_END_LIBS = @LCXX_END_LIBS@
|
||||
|
||||
# the directory where the Cantera libraries are located
|
||||
CANTERA_LIBDIR=@buildlib@
|
||||
|
||||
# required Cantera libraries
|
||||
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# the directory where Cantera include files may be found.
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CANTERA_INCDIR=../../../Cantera/src
|
||||
INCLUDES=-I$(CANTERA_INCDIR) -I$(CANTERA_INCDIR)/thermo
|
||||
else
|
||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
||||
INCLUDES=-I$(CANTERA_INCDIR) -I$(CANTERA_INCDIR)/kernel
|
||||
endif
|
||||
|
||||
# flags passed to the C++ compiler/linker for the linking step
|
||||
LCXX_FLAGS = -L$(CANTERA_LIBDIR) @LOCAL_LIB_DIRS@ @CXXFLAGS@
|
||||
|
||||
# How to compile C++ source files to object files
|
||||
.@CXX_EXT@.@OBJ_EXT@:
|
||||
$(CXX) -c $< $(INCLUDES) $(CXX_FLAGS)
|
||||
|
||||
# How to compile the dependency file
|
||||
.cpp.d:
|
||||
@CXX_DEPENDS@ $(INCLUDES) $(CXX_FLAGS) $*.cpp > $*.d
|
||||
|
||||
# List of dependency files to be created
|
||||
DEPENDS=$(OBJS:.o=.d)
|
||||
|
||||
# Program Name
|
||||
PROGRAM = $(PROG_NAME)$(EXE_EXT)
|
||||
|
||||
all: $(PROGRAM) .depends
|
||||
|
||||
$(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libcantera.a \
|
||||
$(CANTERA_LIBDIR)/libcaThermo.a .depends
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(LINK_OPTIONS) \
|
||||
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(LCXX_END_LIBS)
|
||||
|
||||
# depends target -> forces recalculation of dependencies
|
||||
depends:
|
||||
@MAKE@ .depends
|
||||
|
||||
.depends: $(DEPENDS)
|
||||
cat $(DEPENDS) > .depends
|
||||
|
||||
# Do the test -> For the windows vc++ environment, we have to skip checking on
|
||||
# whether the program is uptodate, because we don't utilize make
|
||||
# in that environment to build programs.
|
||||
test:
|
||||
ifeq ($(os_is_win), 1)
|
||||
else
|
||||
@ @MAKE@ -s $(PROGRAM)
|
||||
endif
|
||||
@ ./runtest
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(PROGRAM) $(DEPENDS) .depends
|
||||
../../../bin/rm_cvsignore
|
||||
(if test -d SunWS_cache ; then \
|
||||
$(RM) -rf SunWS_cache ; \
|
||||
fi )
|
||||
|
||||
40
test_problems/cathermo/DH_graph_NM/runtest
Executable file
40
test_problems/cathermo/DH_graph_NM/runtest
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# run_test
|
||||
#
|
||||
##########################################################################
|
||||
# A couple of validity checks
|
||||
if test ! $# -eq 0 ; then
|
||||
echo 'usage: runtest'
|
||||
echo ' '
|
||||
exit -1
|
||||
fi
|
||||
|
||||
temp_success="0"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
##########################################################################
|
||||
CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA
|
||||
|
||||
CANTERA_BIN=${CANTERA_BIN:=../../../bin}
|
||||
|
||||
prog=DH_graph_1
|
||||
if test ! -x $prog ; then
|
||||
echo $prog ' does not exist'
|
||||
exit -1
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_NaCl_NM.csv
|
||||
|
||||
$prog DH_NaCl_NM.xml > DH_NaCl_NM.csv
|
||||
retnStat=$?
|
||||
diff DH_NaCl_NM.csv DH_NaCl_NM_blessed.csv > output.txt
|
||||
zres=$?
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo "successful diff comparison on $prog NM test"
|
||||
else
|
||||
echo "unsuccessful diff comparison on $prog NM test"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
||||
17
test_problems/cathermo/DH_graph_Pitzer/.cvsignore
Normal file
17
test_problems/cathermo/DH_graph_Pitzer/.cvsignore
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Makefile
|
||||
DH_NaCl_NM.csv
|
||||
DH_NaCl.csv
|
||||
DH_NaCl_Pitzer.csv
|
||||
DH_NaCl_acommon.csv
|
||||
DH_NaCl_bdotak.csv
|
||||
DH_NaCl_dilute.csv
|
||||
DH_graph_1
|
||||
DH_graph_1.log
|
||||
DH_graph_1.d
|
||||
DH_graph_1.out
|
||||
csvCode.txt
|
||||
diff.out
|
||||
diff_test.out
|
||||
table.csv
|
||||
.depends
|
||||
output.txt
|
||||
148
test_problems/cathermo/DH_graph_Pitzer/DH_graph_1.cpp
Normal file
148
test_problems/cathermo/DH_graph_Pitzer/DH_graph_1.cpp
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
*
|
||||
* @file DH_graph_1
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Author$
|
||||
* $Date$
|
||||
* $Revision$
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef SRCDIRTREE
|
||||
#include "ct_defs.h"
|
||||
#include "logger.h"
|
||||
#include "DebyeHuckel.h"
|
||||
#else
|
||||
#include "cantera/Cantera.h"
|
||||
#include "cantera/kernel/logger.h"
|
||||
#include "cantera/kernel/thermo/DebyeHuckel.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
class fileLog: public Logger {
|
||||
public:
|
||||
fileLog(string fName) {
|
||||
m_fName = fName;
|
||||
m_fs.open(fName.c_str());
|
||||
}
|
||||
|
||||
virtual void write(const string& msg) {
|
||||
m_fs << msg;
|
||||
m_fs << endl;
|
||||
}
|
||||
|
||||
virtual ~fileLog() {
|
||||
m_fs.close();
|
||||
}
|
||||
|
||||
string m_fName;
|
||||
ofstream m_fs;
|
||||
|
||||
};
|
||||
|
||||
void printUsage() {
|
||||
cout << "usage: DH_test " << endl;
|
||||
cout <<" -> Everything is hardwired" << endl;
|
||||
}
|
||||
|
||||
void pAtable(DebyeHuckel *DH) {
|
||||
int nsp = DH->nSpecies();
|
||||
double acMol[100];
|
||||
double mf[100];
|
||||
double activities[100];
|
||||
double moll[100];
|
||||
|
||||
DH->getMolalityActivityCoefficients(acMol);
|
||||
DH->getMoleFractions(mf);
|
||||
DH->getActivities(activities);
|
||||
DH->getMolalities(moll);
|
||||
string sName;
|
||||
printf(" Name Activity ActCoeffMolal "
|
||||
" MoleFract Molality\n");
|
||||
for (int k = 0; k < nsp; k++) {
|
||||
sName = DH->speciesName(k);
|
||||
printf("%16s %13g %13g %13g %13g\n",
|
||||
sName.c_str(), activities[k], acMol[k], mf[k], moll[k]);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
int retn = 0;
|
||||
int i;
|
||||
string fName = "DH_graph_1.log";
|
||||
fileLog *fl = new fileLog(fName);
|
||||
try {
|
||||
|
||||
char iFile[80];
|
||||
strcpy(iFile, "DH_NaCl.xml");
|
||||
if (argc > 1) {
|
||||
strcpy(iFile, argv[1]);
|
||||
}
|
||||
setLogger(fl);
|
||||
|
||||
DebyeHuckel *DH = new DebyeHuckel(iFile, "NaCl_electrolyte");
|
||||
|
||||
int nsp = DH->nSpecies();
|
||||
double acMol[100];
|
||||
double mf[100];
|
||||
double moll[100];
|
||||
DH->getMoleFractions(mf);
|
||||
string sName;
|
||||
|
||||
DH->setState_TP(298.15, 1.01325E5);
|
||||
|
||||
int i1 = DH->speciesIndex("Na+");
|
||||
int i2 = DH->speciesIndex("Cl-");
|
||||
int i3 = DH->speciesIndex("H2O(L)");
|
||||
for (i = 1; i < nsp; i++) {
|
||||
moll[i] = 0.0;
|
||||
}
|
||||
DH->setMolalities(moll);
|
||||
double Itop = 10.;
|
||||
double Ibot = 0.0;
|
||||
double ISQRTtop = sqrt(Itop);
|
||||
double ISQRTbot = sqrt(Ibot);
|
||||
double ISQRT;
|
||||
double Is = 0.0;
|
||||
int its = 100;
|
||||
printf(" Is, sqrtIs, meanAc,"
|
||||
" log10(meanAC), acMol_Na+,"
|
||||
", acMol_Cl-, ac_Water\n");
|
||||
for (i = 0; i < its; i++) {
|
||||
ISQRT = ISQRTtop*((double)i)/(its - 1.0)
|
||||
+ ISQRTbot*(1.0 - (double)i/(its - 1.0));
|
||||
Is = ISQRT * ISQRT;
|
||||
moll[i1] = Is;
|
||||
moll[i2] = Is;
|
||||
DH->setMolalities(moll);
|
||||
DH->getMolalityActivityCoefficients(acMol);
|
||||
double meanAC = sqrt(acMol[i1] * acMol[i2]);
|
||||
printf("%15g, %15g, %15g, %15g, %15g, %15g, %15g\n",
|
||||
Is, ISQRT, meanAC, log10(meanAC),
|
||||
acMol[i1], acMol[i2], acMol[i3]);
|
||||
}
|
||||
|
||||
|
||||
delete DH;
|
||||
DH = 0;
|
||||
/*
|
||||
* This delete the file logger amongst other things.
|
||||
*/
|
||||
Cantera::appdelete();
|
||||
|
||||
return retn;
|
||||
|
||||
} catch (CanteraError) {
|
||||
showErrors();
|
||||
if (fl) {
|
||||
delete fl;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
112
test_problems/cathermo/DH_graph_Pitzer/Makefile.in
Normal file
112
test_problems/cathermo/DH_graph_Pitzer/Makefile.in
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
#!/bin/sh
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Makefile to compile and link a C++ application to
|
||||
# Cantera.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# addition to suffixes
|
||||
.SUFFIXES : .d
|
||||
|
||||
# the name of the executable program to be created
|
||||
PROG_NAME = DH_graph_1
|
||||
|
||||
# the object files to be linked together. List those generated from Fortran
|
||||
# and from C/C++ separately
|
||||
OBJS = DH_graph_1.o
|
||||
|
||||
# Location of the current build. Will assume that tests are run
|
||||
# in the source directory tree location
|
||||
src_dir_tree = 1
|
||||
|
||||
# additional flags to be passed to the linker. If your program
|
||||
# requires other external libraries, put them here
|
||||
LINK_OPTIONS = @EXTRA_LINK@
|
||||
|
||||
#############################################################################
|
||||
|
||||
# Check to see whether we are in the msvc++ environment
|
||||
os_is_win = @OS_IS_WIN@
|
||||
|
||||
# Fortran libraries
|
||||
FORT_LIBS = @FLIBS@
|
||||
|
||||
# the C++ compiler
|
||||
CXX = @CXX@
|
||||
|
||||
# C++ compile flags
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CXX_FLAGS = -DSRCDIRTREE @CXXFLAGS@
|
||||
else
|
||||
CXX_FLAGS = @CXXFLAGS@
|
||||
endif
|
||||
|
||||
# Ending C++ linking libraries
|
||||
LCXX_END_LIBS = @LCXX_END_LIBS@
|
||||
|
||||
# the directory where the Cantera libraries are located
|
||||
CANTERA_LIBDIR=@buildlib@
|
||||
|
||||
# required Cantera libraries
|
||||
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# the directory where Cantera include files may be found.
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CANTERA_INCDIR=../../../Cantera/src
|
||||
INCLUDES=-I$(CANTERA_INCDIR) -I$(CANTERA_INCDIR)/thermo
|
||||
else
|
||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
||||
INCLUDES=-I$(CANTERA_INCDIR) -I$(CANTERA_INCDIR)/kernel
|
||||
endif
|
||||
|
||||
# flags passed to the C++ compiler/linker for the linking step
|
||||
LCXX_FLAGS = -L$(CANTERA_LIBDIR) @LOCAL_LIB_DIRS@ @CXXFLAGS@
|
||||
|
||||
# How to compile C++ source files to object files
|
||||
.@CXX_EXT@.@OBJ_EXT@:
|
||||
$(CXX) -c $< $(INCLUDES) $(CXX_FLAGS)
|
||||
|
||||
# How to compile the dependency file
|
||||
.cpp.d:
|
||||
@CXX_DEPENDS@ $(INCLUDES) $(CXX_FLAGS) $*.cpp > $*.d
|
||||
|
||||
# List of dependency files to be created
|
||||
DEPENDS=$(OBJS:.o=.d)
|
||||
|
||||
# Program Name
|
||||
PROGRAM = $(PROG_NAME)$(EXE_EXT)
|
||||
|
||||
all: $(PROGRAM) .depends
|
||||
|
||||
$(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libcantera.a \
|
||||
$(CANTERA_LIBDIR)/libcaThermo.a .depends
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(LINK_OPTIONS) \
|
||||
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(LCXX_END_LIBS)
|
||||
|
||||
# depends target -> forces recalculation of dependencies
|
||||
depends:
|
||||
@MAKE@ .depends
|
||||
|
||||
.depends: $(DEPENDS)
|
||||
cat $(DEPENDS) > .depends
|
||||
|
||||
# Do the test -> For the windows vc++ environment, we have to skip checking on
|
||||
# whether the program is uptodate, because we don't utilize make
|
||||
# in that environment to build programs.
|
||||
test:
|
||||
ifeq ($(os_is_win), 1)
|
||||
else
|
||||
@ @MAKE@ -s $(PROGRAM)
|
||||
endif
|
||||
@ ./runtest
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(PROGRAM) $(DEPENDS) .depends
|
||||
../../../bin/rm_cvsignore
|
||||
(if test -d SunWS_cache ; then \
|
||||
$(RM) -rf SunWS_cache ; \
|
||||
fi )
|
||||
|
||||
40
test_problems/cathermo/DH_graph_Pitzer/runtest
Executable file
40
test_problems/cathermo/DH_graph_Pitzer/runtest
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# run_test
|
||||
#
|
||||
##########################################################################
|
||||
# A couple of validity checks
|
||||
if test ! $# -eq 0 ; then
|
||||
echo 'usage: runtest'
|
||||
echo ' '
|
||||
exit -1
|
||||
fi
|
||||
|
||||
temp_success="0"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
##########################################################################
|
||||
CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA
|
||||
|
||||
CANTERA_BIN=${CANTERA_BIN:=../../../bin}
|
||||
|
||||
prog=DH_graph_1
|
||||
if test ! -x $prog ; then
|
||||
echo $prog ' does not exist'
|
||||
exit -1
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_NaCl_Pitzer.csv
|
||||
|
||||
$prog DH_NaCl_Pitzer.xml > DH_NaCl_Pitzer.csv
|
||||
retnStat=$?
|
||||
diff DH_NaCl_Pitzer.csv DH_NaCl_Pitzer_blessed.csv > output.txt
|
||||
zres=$?
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo "successful diff comparison on $prog Pitzer test"
|
||||
else
|
||||
echo "unsuccessful diff comparison on $prog Pitzer test"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
||||
8
test_problems/cathermo/DH_graph_acommon/.cvsignore
Normal file
8
test_problems/cathermo/DH_graph_acommon/.cvsignore
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.depends
|
||||
DH_NaCl_acommon.csv
|
||||
DH_graph_1
|
||||
DH_graph_1.d
|
||||
DH_graph_1.log
|
||||
Makefile
|
||||
output.txt
|
||||
|
||||
148
test_problems/cathermo/DH_graph_acommon/DH_graph_1.cpp
Normal file
148
test_problems/cathermo/DH_graph_acommon/DH_graph_1.cpp
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
*
|
||||
* @file DH_graph_1
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Author$
|
||||
* $Date$
|
||||
* $Revision$
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef SRCDIRTREE
|
||||
#include "ct_defs.h"
|
||||
#include "logger.h"
|
||||
#include "DebyeHuckel.h"
|
||||
#else
|
||||
#include "cantera/Cantera.h"
|
||||
#include "cantera/kernel/logger.h"
|
||||
#include "cantera/kernel/thermo/DebyeHuckel.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
class fileLog: public Logger {
|
||||
public:
|
||||
fileLog(string fName) {
|
||||
m_fName = fName;
|
||||
m_fs.open(fName.c_str());
|
||||
}
|
||||
|
||||
virtual void write(const string& msg) {
|
||||
m_fs << msg;
|
||||
m_fs << endl;
|
||||
}
|
||||
|
||||
virtual ~fileLog() {
|
||||
m_fs.close();
|
||||
}
|
||||
|
||||
string m_fName;
|
||||
ofstream m_fs;
|
||||
|
||||
};
|
||||
|
||||
void printUsage() {
|
||||
cout << "usage: DH_test " << endl;
|
||||
cout <<" -> Everything is hardwired" << endl;
|
||||
}
|
||||
|
||||
void pAtable(DebyeHuckel *DH) {
|
||||
int nsp = DH->nSpecies();
|
||||
double acMol[100];
|
||||
double mf[100];
|
||||
double activities[100];
|
||||
double moll[100];
|
||||
|
||||
DH->getMolalityActivityCoefficients(acMol);
|
||||
DH->getMoleFractions(mf);
|
||||
DH->getActivities(activities);
|
||||
DH->getMolalities(moll);
|
||||
string sName;
|
||||
printf(" Name Activity ActCoeffMolal "
|
||||
" MoleFract Molality\n");
|
||||
for (int k = 0; k < nsp; k++) {
|
||||
sName = DH->speciesName(k);
|
||||
printf("%16s %13g %13g %13g %13g\n",
|
||||
sName.c_str(), activities[k], acMol[k], mf[k], moll[k]);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
int retn = 0;
|
||||
int i;
|
||||
string fName = "DH_graph_1.log";
|
||||
fileLog *fl = new fileLog(fName);
|
||||
try {
|
||||
|
||||
char iFile[80];
|
||||
strcpy(iFile, "DH_NaCl.xml");
|
||||
if (argc > 1) {
|
||||
strcpy(iFile, argv[1]);
|
||||
}
|
||||
setLogger(fl);
|
||||
|
||||
DebyeHuckel *DH = new DebyeHuckel(iFile, "NaCl_electrolyte");
|
||||
|
||||
int nsp = DH->nSpecies();
|
||||
double acMol[100];
|
||||
double mf[100];
|
||||
double moll[100];
|
||||
DH->getMoleFractions(mf);
|
||||
string sName;
|
||||
|
||||
DH->setState_TP(298.15, 1.01325E5);
|
||||
|
||||
int i1 = DH->speciesIndex("Na+");
|
||||
int i2 = DH->speciesIndex("Cl-");
|
||||
int i3 = DH->speciesIndex("H2O(L)");
|
||||
for (i = 1; i < nsp; i++) {
|
||||
moll[i] = 0.0;
|
||||
}
|
||||
DH->setMolalities(moll);
|
||||
double Itop = 10.;
|
||||
double Ibot = 0.0;
|
||||
double ISQRTtop = sqrt(Itop);
|
||||
double ISQRTbot = sqrt(Ibot);
|
||||
double ISQRT;
|
||||
double Is = 0.0;
|
||||
int its = 100;
|
||||
printf(" Is, sqrtIs, meanAc,"
|
||||
" log10(meanAC), acMol_Na+,"
|
||||
", acMol_Cl-, ac_Water\n");
|
||||
for (i = 0; i < its; i++) {
|
||||
ISQRT = ISQRTtop*((double)i)/(its - 1.0)
|
||||
+ ISQRTbot*(1.0 - (double)i/(its - 1.0));
|
||||
Is = ISQRT * ISQRT;
|
||||
moll[i1] = Is;
|
||||
moll[i2] = Is;
|
||||
DH->setMolalities(moll);
|
||||
DH->getMolalityActivityCoefficients(acMol);
|
||||
double meanAC = sqrt(acMol[i1] * acMol[i2]);
|
||||
printf("%15g, %15g, %15g, %15g, %15g, %15g, %15g\n",
|
||||
Is, ISQRT, meanAC, log10(meanAC),
|
||||
acMol[i1], acMol[i2], acMol[i3]);
|
||||
}
|
||||
|
||||
|
||||
delete DH;
|
||||
DH = 0;
|
||||
/*
|
||||
* This delete the file logger amongst other things.
|
||||
*/
|
||||
Cantera::appdelete();
|
||||
|
||||
return retn;
|
||||
|
||||
} catch (CanteraError) {
|
||||
showErrors();
|
||||
if (fl) {
|
||||
delete fl;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
112
test_problems/cathermo/DH_graph_acommon/Makefile.in
Normal file
112
test_problems/cathermo/DH_graph_acommon/Makefile.in
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
#!/bin/sh
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Makefile to compile and link a C++ application to
|
||||
# Cantera.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# addition to suffixes
|
||||
.SUFFIXES : .d
|
||||
|
||||
# the name of the executable program to be created
|
||||
PROG_NAME = DH_graph_1
|
||||
|
||||
# the object files to be linked together. List those generated from Fortran
|
||||
# and from C/C++ separately
|
||||
OBJS = DH_graph_1.o
|
||||
|
||||
# Location of the current build. Will assume that tests are run
|
||||
# in the source directory tree location
|
||||
src_dir_tree = 1
|
||||
|
||||
# additional flags to be passed to the linker. If your program
|
||||
# requires other external libraries, put them here
|
||||
LINK_OPTIONS = @EXTRA_LINK@
|
||||
|
||||
#############################################################################
|
||||
|
||||
# Check to see whether we are in the msvc++ environment
|
||||
os_is_win = @OS_IS_WIN@
|
||||
|
||||
# Fortran libraries
|
||||
FORT_LIBS = @FLIBS@
|
||||
|
||||
# the C++ compiler
|
||||
CXX = @CXX@
|
||||
|
||||
# C++ compile flags
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CXX_FLAGS = -DSRCDIRTREE @CXXFLAGS@
|
||||
else
|
||||
CXX_FLAGS = @CXXFLAGS@
|
||||
endif
|
||||
|
||||
# Ending C++ linking libraries
|
||||
LCXX_END_LIBS = @LCXX_END_LIBS@
|
||||
|
||||
# the directory where the Cantera libraries are located
|
||||
CANTERA_LIBDIR=@buildlib@
|
||||
|
||||
# required Cantera libraries
|
||||
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# the directory where Cantera include files may be found.
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CANTERA_INCDIR=../../../Cantera/src
|
||||
INCLUDES=-I$(CANTERA_INCDIR) -I$(CANTERA_INCDIR)/thermo
|
||||
else
|
||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
||||
INCLUDES=-I$(CANTERA_INCDIR) -I$(CANTERA_INCDIR)/kernel
|
||||
endif
|
||||
|
||||
# flags passed to the C++ compiler/linker for the linking step
|
||||
LCXX_FLAGS = -L$(CANTERA_LIBDIR) @LOCAL_LIB_DIRS@ @CXXFLAGS@
|
||||
|
||||
# How to compile C++ source files to object files
|
||||
.@CXX_EXT@.@OBJ_EXT@:
|
||||
$(CXX) -c $< $(INCLUDES) $(CXX_FLAGS)
|
||||
|
||||
# How to compile the dependency file
|
||||
.cpp.d:
|
||||
@CXX_DEPENDS@ $(INCLUDES) $(CXX_FLAGS) $*.cpp > $*.d
|
||||
|
||||
# List of dependency files to be created
|
||||
DEPENDS=$(OBJS:.o=.d)
|
||||
|
||||
# Program Name
|
||||
PROGRAM = $(PROG_NAME)$(EXE_EXT)
|
||||
|
||||
all: $(PROGRAM) .depends
|
||||
|
||||
$(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libcantera.a \
|
||||
$(CANTERA_LIBDIR)/libcaThermo.a .depends
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(LINK_OPTIONS) \
|
||||
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(LCXX_END_LIBS)
|
||||
|
||||
# depends target -> forces recalculation of dependencies
|
||||
depends:
|
||||
@MAKE@ .depends
|
||||
|
||||
.depends: $(DEPENDS)
|
||||
cat $(DEPENDS) > .depends
|
||||
|
||||
# Do the test -> For the windows vc++ environment, we have to skip checking on
|
||||
# whether the program is uptodate, because we don't utilize make
|
||||
# in that environment to build programs.
|
||||
test:
|
||||
ifeq ($(os_is_win), 1)
|
||||
else
|
||||
@ @MAKE@ -s $(PROGRAM)
|
||||
endif
|
||||
@ ./runtest
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(PROGRAM) $(DEPENDS) .depends
|
||||
../../../bin/rm_cvsignore
|
||||
(if test -d SunWS_cache ; then \
|
||||
$(RM) -rf SunWS_cache ; \
|
||||
fi )
|
||||
|
||||
40
test_problems/cathermo/DH_graph_acommon/runtest
Executable file
40
test_problems/cathermo/DH_graph_acommon/runtest
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# run_test
|
||||
#
|
||||
##########################################################################
|
||||
# A couple of validity checks
|
||||
if test ! $# -eq 0 ; then
|
||||
echo 'usage: runtest'
|
||||
echo ' '
|
||||
exit -1
|
||||
fi
|
||||
|
||||
temp_success="0"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
##########################################################################
|
||||
CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA
|
||||
|
||||
CANTERA_BIN=${CANTERA_BIN:=../../../bin}
|
||||
|
||||
prog=DH_graph_1
|
||||
if test ! -x $prog ; then
|
||||
echo $prog ' does not exist'
|
||||
exit -1
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_NaCl_acommon.csv
|
||||
|
||||
$prog DH_NaCl_acommon.xml > DH_NaCl_acommon.csv
|
||||
retnStat=$?
|
||||
diff DH_NaCl_acommon.csv DH_NaCl_acommon_blessed.csv > output.txt
|
||||
zres=$?
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo "successful diff comparison on $prog acommon test"
|
||||
else
|
||||
echo "unsuccessful diff comparison on $prog acommon test"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
||||
7
test_problems/cathermo/DH_graph_bdotak/.cvsignore
Normal file
7
test_problems/cathermo/DH_graph_bdotak/.cvsignore
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
.depends
|
||||
DH_NaCl_bdotak.csv
|
||||
DH_graph_1
|
||||
DH_graph_1.d
|
||||
DH_graph_1.log
|
||||
Makefile
|
||||
output.txt
|
||||
148
test_problems/cathermo/DH_graph_bdotak/DH_graph_1.cpp
Normal file
148
test_problems/cathermo/DH_graph_bdotak/DH_graph_1.cpp
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
*
|
||||
* @file DH_graph_1
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Author$
|
||||
* $Date$
|
||||
* $Revision$
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef SRCDIRTREE
|
||||
#include "ct_defs.h"
|
||||
#include "logger.h"
|
||||
#include "DebyeHuckel.h"
|
||||
#else
|
||||
#include "cantera/Cantera.h"
|
||||
#include "cantera/kernel/logger.h"
|
||||
#include "cantera/kernel/thermo/DebyeHuckel.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
class fileLog: public Logger {
|
||||
public:
|
||||
fileLog(string fName) {
|
||||
m_fName = fName;
|
||||
m_fs.open(fName.c_str());
|
||||
}
|
||||
|
||||
virtual void write(const string& msg) {
|
||||
m_fs << msg;
|
||||
m_fs << endl;
|
||||
}
|
||||
|
||||
virtual ~fileLog() {
|
||||
m_fs.close();
|
||||
}
|
||||
|
||||
string m_fName;
|
||||
ofstream m_fs;
|
||||
|
||||
};
|
||||
|
||||
void printUsage() {
|
||||
cout << "usage: DH_test " << endl;
|
||||
cout <<" -> Everything is hardwired" << endl;
|
||||
}
|
||||
|
||||
void pAtable(DebyeHuckel *DH) {
|
||||
int nsp = DH->nSpecies();
|
||||
double acMol[100];
|
||||
double mf[100];
|
||||
double activities[100];
|
||||
double moll[100];
|
||||
|
||||
DH->getMolalityActivityCoefficients(acMol);
|
||||
DH->getMoleFractions(mf);
|
||||
DH->getActivities(activities);
|
||||
DH->getMolalities(moll);
|
||||
string sName;
|
||||
printf(" Name Activity ActCoeffMolal "
|
||||
" MoleFract Molality\n");
|
||||
for (int k = 0; k < nsp; k++) {
|
||||
sName = DH->speciesName(k);
|
||||
printf("%16s %13g %13g %13g %13g\n",
|
||||
sName.c_str(), activities[k], acMol[k], mf[k], moll[k]);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
int retn = 0;
|
||||
int i;
|
||||
string fName = "DH_graph_1.log";
|
||||
fileLog *fl = new fileLog(fName);
|
||||
try {
|
||||
|
||||
char iFile[80];
|
||||
strcpy(iFile, "DH_NaCl.xml");
|
||||
if (argc > 1) {
|
||||
strcpy(iFile, argv[1]);
|
||||
}
|
||||
setLogger(fl);
|
||||
|
||||
DebyeHuckel *DH = new DebyeHuckel(iFile, "NaCl_electrolyte");
|
||||
|
||||
int nsp = DH->nSpecies();
|
||||
double acMol[100];
|
||||
double mf[100];
|
||||
double moll[100];
|
||||
DH->getMoleFractions(mf);
|
||||
string sName;
|
||||
|
||||
DH->setState_TP(298.15, 1.01325E5);
|
||||
|
||||
int i1 = DH->speciesIndex("Na+");
|
||||
int i2 = DH->speciesIndex("Cl-");
|
||||
int i3 = DH->speciesIndex("H2O(L)");
|
||||
for (i = 1; i < nsp; i++) {
|
||||
moll[i] = 0.0;
|
||||
}
|
||||
DH->setMolalities(moll);
|
||||
double Itop = 10.;
|
||||
double Ibot = 0.0;
|
||||
double ISQRTtop = sqrt(Itop);
|
||||
double ISQRTbot = sqrt(Ibot);
|
||||
double ISQRT;
|
||||
double Is = 0.0;
|
||||
int its = 100;
|
||||
printf(" Is, sqrtIs, meanAc,"
|
||||
" log10(meanAC), acMol_Na+,"
|
||||
", acMol_Cl-, ac_Water\n");
|
||||
for (i = 0; i < its; i++) {
|
||||
ISQRT = ISQRTtop*((double)i)/(its - 1.0)
|
||||
+ ISQRTbot*(1.0 - (double)i/(its - 1.0));
|
||||
Is = ISQRT * ISQRT;
|
||||
moll[i1] = Is;
|
||||
moll[i2] = Is;
|
||||
DH->setMolalities(moll);
|
||||
DH->getMolalityActivityCoefficients(acMol);
|
||||
double meanAC = sqrt(acMol[i1] * acMol[i2]);
|
||||
printf("%15g, %15g, %15g, %15g, %15g, %15g, %15g\n",
|
||||
Is, ISQRT, meanAC, log10(meanAC),
|
||||
acMol[i1], acMol[i2], acMol[i3]);
|
||||
}
|
||||
|
||||
|
||||
delete DH;
|
||||
DH = 0;
|
||||
/*
|
||||
* This delete the file logger amongst other things.
|
||||
*/
|
||||
Cantera::appdelete();
|
||||
|
||||
return retn;
|
||||
|
||||
} catch (CanteraError) {
|
||||
showErrors();
|
||||
if (fl) {
|
||||
delete fl;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
112
test_problems/cathermo/DH_graph_bdotak/Makefile.in
Normal file
112
test_problems/cathermo/DH_graph_bdotak/Makefile.in
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
#!/bin/sh
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Makefile to compile and link a C++ application to
|
||||
# Cantera.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# addition to suffixes
|
||||
.SUFFIXES : .d
|
||||
|
||||
# the name of the executable program to be created
|
||||
PROG_NAME = DH_graph_1
|
||||
|
||||
# the object files to be linked together. List those generated from Fortran
|
||||
# and from C/C++ separately
|
||||
OBJS = DH_graph_1.o
|
||||
|
||||
# Location of the current build. Will assume that tests are run
|
||||
# in the source directory tree location
|
||||
src_dir_tree = 1
|
||||
|
||||
# additional flags to be passed to the linker. If your program
|
||||
# requires other external libraries, put them here
|
||||
LINK_OPTIONS = @EXTRA_LINK@
|
||||
|
||||
#############################################################################
|
||||
|
||||
# Check to see whether we are in the msvc++ environment
|
||||
os_is_win = @OS_IS_WIN@
|
||||
|
||||
# Fortran libraries
|
||||
FORT_LIBS = @FLIBS@
|
||||
|
||||
# the C++ compiler
|
||||
CXX = @CXX@
|
||||
|
||||
# C++ compile flags
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CXX_FLAGS = -DSRCDIRTREE @CXXFLAGS@
|
||||
else
|
||||
CXX_FLAGS = @CXXFLAGS@
|
||||
endif
|
||||
|
||||
# Ending C++ linking libraries
|
||||
LCXX_END_LIBS = @LCXX_END_LIBS@
|
||||
|
||||
# the directory where the Cantera libraries are located
|
||||
CANTERA_LIBDIR=@buildlib@
|
||||
|
||||
# required Cantera libraries
|
||||
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# the directory where Cantera include files may be found.
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CANTERA_INCDIR=../../../Cantera/src
|
||||
INCLUDES=-I$(CANTERA_INCDIR) -I$(CANTERA_INCDIR)/thermo
|
||||
else
|
||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
||||
INCLUDES=-I$(CANTERA_INCDIR) -I$(CANTERA_INCDIR)/kernel
|
||||
endif
|
||||
|
||||
# flags passed to the C++ compiler/linker for the linking step
|
||||
LCXX_FLAGS = -L$(CANTERA_LIBDIR) @LOCAL_LIB_DIRS@ @CXXFLAGS@
|
||||
|
||||
# How to compile C++ source files to object files
|
||||
.@CXX_EXT@.@OBJ_EXT@:
|
||||
$(CXX) -c $< $(INCLUDES) $(CXX_FLAGS)
|
||||
|
||||
# How to compile the dependency file
|
||||
.cpp.d:
|
||||
@CXX_DEPENDS@ $(INCLUDES) $(CXX_FLAGS) $*.cpp > $*.d
|
||||
|
||||
# List of dependency files to be created
|
||||
DEPENDS=$(OBJS:.o=.d)
|
||||
|
||||
# Program Name
|
||||
PROGRAM = $(PROG_NAME)$(EXE_EXT)
|
||||
|
||||
all: $(PROGRAM) .depends
|
||||
|
||||
$(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libcantera.a \
|
||||
$(CANTERA_LIBDIR)/libcaThermo.a .depends
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(LINK_OPTIONS) \
|
||||
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(LCXX_END_LIBS)
|
||||
|
||||
# depends target -> forces recalculation of dependencies
|
||||
depends:
|
||||
@MAKE@ .depends
|
||||
|
||||
.depends: $(DEPENDS)
|
||||
cat $(DEPENDS) > .depends
|
||||
|
||||
# Do the test -> For the windows vc++ environment, we have to skip checking on
|
||||
# whether the program is uptodate, because we don't utilize make
|
||||
# in that environment to build programs.
|
||||
test:
|
||||
ifeq ($(os_is_win), 1)
|
||||
else
|
||||
@ @MAKE@ -s $(PROGRAM)
|
||||
endif
|
||||
@ ./runtest
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(PROGRAM) $(DEPENDS) .depends
|
||||
../../../bin/rm_cvsignore
|
||||
(if test -d SunWS_cache ; then \
|
||||
$(RM) -rf SunWS_cache ; \
|
||||
fi )
|
||||
|
||||
40
test_problems/cathermo/DH_graph_bdotak/runtest
Executable file
40
test_problems/cathermo/DH_graph_bdotak/runtest
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# run_test
|
||||
#
|
||||
##########################################################################
|
||||
# A couple of validity checks
|
||||
if test ! $# -eq 0 ; then
|
||||
echo 'usage: runtest'
|
||||
echo ' '
|
||||
exit -1
|
||||
fi
|
||||
|
||||
temp_success="0"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
##########################################################################
|
||||
CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA
|
||||
|
||||
CANTERA_BIN=${CANTERA_BIN:=../../../bin}
|
||||
|
||||
prog=DH_graph_1
|
||||
if test ! -x $prog ; then
|
||||
echo $prog ' does not exist'
|
||||
exit -1
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff DH_NaCl_bdotak.csv
|
||||
|
||||
$prog DH_NaCl_bdotak.xml > DH_NaCl_bdotak.csv
|
||||
retnStat=$?
|
||||
diff DH_NaCl_bdotak.csv DH_NaCl_bdotak_blessed.csv > output.txt
|
||||
zres=$?
|
||||
if test "$zres" = "0" -a "$retnStat" = "0"; then
|
||||
echo "successful diff comparison on $prog bdotak test"
|
||||
else
|
||||
echo "unsuccessful diff comparison on $prog bdotak test"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
||||
|
|
@ -28,21 +28,14 @@ then
|
|||
temp_success="1"
|
||||
echo "$prog returned with bad status, $retnStat, check output"
|
||||
fi
|
||||
echo 'Making a comparison with the good saved solution: '
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
diff T298.csv T298_blessed.csv > test.diff
|
||||
zres=$?
|
||||
cat test.diff
|
||||
diff T523.csv T523_blessed.csv > test2.diff
|
||||
zres2=$?
|
||||
cat test2.diff
|
||||
echo '--------------------------------------------------------------------------------'
|
||||
echo 'End of comparison'
|
||||
if test "$zres" = "0" ; then
|
||||
if test "$zres2" = "0" ; then
|
||||
echo 'test passed'
|
||||
hhh="1"
|
||||
else
|
||||
echo 'test 1 passed, test 2 failed'
|
||||
temp_success="1"
|
||||
fi
|
||||
else
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ void pAtable(HMWSoln *HMW) {
|
|||
double activities[100];
|
||||
double moll[100];
|
||||
|
||||
HMW->m_debugCalc = 1;
|
||||
if (CHECK_DEBUG_MODE == 1) {
|
||||
HMW->m_debugCalc = 1;
|
||||
}
|
||||
HMW->getMolalityActivityCoefficients(acMol);
|
||||
HMW->getMoleFractions(mf);
|
||||
HMW->getActivities(activities);
|
||||
|
|
|
|||
|
|
@ -36,11 +36,19 @@ FORT_LIBS = @FLIBS@
|
|||
# the C++ compiler
|
||||
CXX = @CXX@
|
||||
|
||||
debug_mode = @CANTERA_DEBUG_MODE@
|
||||
ifeq ($(debug_mode), 1)
|
||||
DEBUG_FLAG=-DDEBUG_MODE
|
||||
else
|
||||
DEBUG_FLAG=
|
||||
endif
|
||||
|
||||
|
||||
# C++ compile flags
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CXX_FLAGS = -DSRCDIRTREE @CXXFLAGS@
|
||||
CXX_FLAGS = -DSRCDIRTREE @CXXFLAGS@ $(DEBUG_FLAG)
|
||||
else
|
||||
CXX_FLAGS = @CXXFLAGS@
|
||||
CXX_FLAGS = @CXXFLAGS@ $(DEBUG_FLAG)
|
||||
endif
|
||||
|
||||
# Ending C++ linking libraries
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
#
|
||||
temp_success="1"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
|
||||
##########################################################################
|
||||
prog=HMW_test_1
|
||||
|
|
@ -11,7 +10,8 @@ if test ! -x $prog ; then
|
|||
exit -1
|
||||
fi
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff output.txt
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
/bin/rm -f test.out test.diff output.txt diff_test.out
|
||||
/bin/rm -f CheckDebug.txt output_bc.txt
|
||||
|
||||
#################################################################
|
||||
|
|
|
|||
|
|
@ -7,3 +7,4 @@ output.txt
|
|||
outputa.txt
|
||||
table.csv
|
||||
csvCode.txt
|
||||
output_bc.txt
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
int CHECK_DEBUG_MODE = 0;
|
||||
|
||||
void printUsage() {
|
||||
cout << "usage: HMW_test_1 " << endl;
|
||||
cout <<" -> Everything is hardwired" << endl;
|
||||
|
|
@ -78,9 +80,20 @@ int main(int argc, char **argv)
|
|||
moll[1] += sum;
|
||||
|
||||
HMW->setState_TPM(Temp, OneAtm, moll);
|
||||
|
||||
#ifdef DEBUG_MODE
|
||||
HMW->m_debugCalc = true;
|
||||
CHECK_DEBUG_MODE = 1;
|
||||
#endif
|
||||
if (CHECK_DEBUG_MODE == 1) {
|
||||
HMW->m_debugCalc = 1;
|
||||
if (HMW->debugPrinting()) {
|
||||
FILE *ff = fopen("CheckDebug.txt", "w");
|
||||
fprintf(ff,"%1d\n", 1);
|
||||
fclose(ff);
|
||||
}
|
||||
HMW->m_debugCalc = 1;
|
||||
}
|
||||
|
||||
printf(" Temperature = %g K\n", Temp);
|
||||
HMW->printCoeffs();
|
||||
pAtable(HMW);
|
||||
|
|
|
|||
53
test_problems/cathermo/HMW_test_3/output_noD_blessed.txt
Normal file
53
test_problems/cathermo/HMW_test_3/output_noD_blessed.txt
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
a1 = 3.04284e-10
|
||||
a2 = 3.04284e-10
|
||||
Temperature = 423.15 K
|
||||
Index Name MoleF Molality Charge
|
||||
0 H2O(L) 8.1982292e-01 5.5508435e+01 0.0
|
||||
1 Cl- 9.0088519e-02 6.0996986e+00 -1.0
|
||||
2 H+ 3.1943127e-11 2.1628000e-09 1.0
|
||||
3 Na+ 9.0088540e-02 6.0997000e+00 1.0
|
||||
4 OH- 2.0643106e-08 1.3977000e-06 -1.0
|
||||
|
||||
Species Species beta0MX beta1MX beta2MX CphiMX alphaMX thetaij
|
||||
Cl- H+ 0.17750 0.29450 0.00000 0.00080 2.00000 0.00000
|
||||
Cl- Na+ 0.10037 0.37071 0.00000 -0.00457 2.00000 0.00000
|
||||
Cl- OH- 0.00000 0.00000 0.00000 0.00000 0.00000 -0.05000
|
||||
H+ Na+ 0.00000 0.00000 0.00000 0.00000 0.00000 0.03600
|
||||
H+ OH- 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
|
||||
Na+ OH- 0.08640 0.25300 0.00000 0.00440 2.00000 0.00000
|
||||
|
||||
Species Species Species psi
|
||||
Cl- H+ Na+ -0.00400
|
||||
Cl- Na+ H+ -0.00400
|
||||
Cl- Na+ OH- -0.00600
|
||||
Cl- OH- Na+ -0.00600
|
||||
H+ Cl- Na+ -0.00400
|
||||
H+ Na+ Cl- -0.00400
|
||||
Na+ Cl- H+ -0.00400
|
||||
Na+ Cl- OH- -0.00600
|
||||
Na+ H+ Cl- -0.00400
|
||||
Na+ OH- Cl- -0.00600
|
||||
OH- Cl- Na+ -0.00600
|
||||
OH- Na+ Cl- -0.00600
|
||||
Name Activity ActCoeffMolal MoleFract Molality
|
||||
H2O(L) 0.765816 0.934123 0.819823 55.5084
|
||||
Cl- 6.2164 1.01913 0.0900885 6.0997
|
||||
H+ 8.57276e-09 3.96373 3.19431e-11 2.1628e-09
|
||||
Na+ 6.21641 1.01913 0.0900885 6.0997
|
||||
OH- 6.51352e-07 0.466017 2.06431e-08 1.3977e-06
|
||||
Species Standard chemical potentials (kJ/gmol)
|
||||
------------------------------------------------------------
|
||||
H2O(L) -317.175857
|
||||
Cl- -186.014783
|
||||
H+ 0.0017225
|
||||
Na+ -441.615962
|
||||
OH- -322.000801
|
||||
------------------------------------------------------------
|
||||
Some DeltaSS values: Delta(mu_0)
|
||||
NaCl(S): Na+ + Cl- -> NaCl(S): 195.0003 kJ/gmol
|
||||
: 78.66216 (dimensionless)
|
||||
: 34.16254 (dimensionless/ln10)
|
||||
OH-: H2O(L) - H+ -> OH-: -4.823222 kJ/gmol
|
||||
: -1.945664 (dimensionless)
|
||||
: -0.8449909 (dimensionless/ln10)
|
||||
------------------------------------------------------------
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
#
|
||||
temp_success="1"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
|
||||
##########################################################################
|
||||
prog=HMW_test_3
|
||||
|
|
@ -11,7 +10,9 @@ if test ! -x $prog ; then
|
|||
exit -1
|
||||
fi
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff output.txt
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
/bin/rm -f test.out test.diff output.txt diff_test.out
|
||||
/bin/rm -f CheckDebug.txt output_bc.txt
|
||||
|
||||
#################################################################
|
||||
#
|
||||
|
|
@ -29,7 +30,14 @@ then
|
|||
fi
|
||||
|
||||
$CANTERA_BIN/exp3to2.sh output.txt > outputa.txt
|
||||
diff -w outputa.txt output_blessed.txt > diff_test.out
|
||||
if [ -f CheckDebug.txt ]
|
||||
then
|
||||
cp output_blessed.txt output_bc.txt
|
||||
else
|
||||
cp output_noD_blessed.txt output_bc.txt
|
||||
fi
|
||||
|
||||
diff -w outputa.txt output_bc.txt > diff_test.out
|
||||
retnStat=$?
|
||||
if [ $retnStat = "0" ]
|
||||
then
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ ifeq ($(test_electrolytes),1)
|
|||
cd HMW_test_1; @MAKE@ all
|
||||
cd HMW_test_3; @MAKE@ all
|
||||
cd DH_graph_1; @MAKE@ all
|
||||
cd DH_graph_acommon; @MAKE@ all
|
||||
cd DH_graph_bdotak; @MAKE@ all
|
||||
cd DH_graph_NM; @MAKE@ all
|
||||
cd DH_graph_Pitzer; @MAKE@ all
|
||||
endif
|
||||
|
||||
test:
|
||||
|
|
@ -49,6 +53,10 @@ ifeq ($(test_electrolytes),1)
|
|||
cd HMW_test_1; @MAKE@ -s test
|
||||
cd HMW_test_3; @MAKE@ -s test
|
||||
cd DH_graph_1; @MAKE@ -s test
|
||||
cd DH_graph_acommon; @MAKE@ -s test
|
||||
cd DH_graph_bdotak; @MAKE@ -s test
|
||||
cd DH_graph_NM; @MAKE@ -s test
|
||||
cd DH_graph_Pitzer; @MAKE@ -s test
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
|
@ -69,6 +77,10 @@ clean:
|
|||
cd HMW_test_1; @MAKE@ clean
|
||||
cd HMW_test_3; @MAKE@ clean
|
||||
cd DH_graph_1; @MAKE@ clean
|
||||
cd DH_graph_acommon; @MAKE@ clean
|
||||
cd DH_graph_bdotak; @MAKE@ clean
|
||||
cd DH_graph_NM; @MAKE@ clean
|
||||
cd DH_graph_Pitzer; @MAKE@ clean
|
||||
|
||||
depends:
|
||||
ifeq ($(test_issp),1)
|
||||
|
|
@ -90,4 +102,8 @@ ifeq ($(test_electrolytes),1)
|
|||
cd HMW_test_1; @MAKE@ depends
|
||||
cd HMW_test_3; @MAKE@ depends
|
||||
cd DH_graph_1; @MAKE@ depends
|
||||
cd DH_graph_acommon; @MAKE@ depends
|
||||
cd DH_graph_bdotak; @MAKE@ depends
|
||||
cd DH_graph_NM; @MAKE@ depends
|
||||
cd DH_graph_Pitzer; @MAKE@ depends
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ molar intEnergy = 0.013282 J kg-1
|
|||
molar entropy = 93.636 J kg-1 K-1
|
||||
molar gibbs = -3.8986e+07 J kg-1
|
||||
molar Cp = 28836 J kg-1 K-1
|
||||
mixture density = 0.001 kg m-3
|
||||
molar density = 5.5339e-05 kmol m-3
|
||||
mixture density = 12.058 kg m-3
|
||||
molar density = 0.66727 kmol m-3
|
||||
mean molecular weight = 18.07 kg kmol-1
|
||||
Printout of standard state properties
|
||||
Name mu_i H_i_SS S_i_SS Cp_i_SS Vol_i_SS
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue