Removed some deprecated code
This commit is contained in:
parent
8b6c9a0bf7
commit
cfe5824a7d
31 changed files with 20 additions and 519 deletions
|
|
@ -654,16 +654,6 @@ public:
|
|||
*/
|
||||
size_t VP_ID_;
|
||||
|
||||
//! ID of the surface or volume domain in which the
|
||||
//! this phase exists
|
||||
/*!
|
||||
* This ventures into the idea of installing a physical location
|
||||
* into a thermodynamics program. This unknown is currently not
|
||||
* being used.
|
||||
* @deprecated
|
||||
*/
|
||||
int Domain_ID;
|
||||
|
||||
//! If true, this phase consists of a single species
|
||||
bool m_singleSpecies;
|
||||
|
||||
|
|
|
|||
|
|
@ -1043,9 +1043,8 @@ protected:
|
|||
|
||||
//! Phase Index where reactions are assumed to be taking place
|
||||
/*!
|
||||
* We calculate this by assuming that the phase with the lowest dimensionality is the phase where reactions
|
||||
* are taking place
|
||||
* @deprecated
|
||||
* We calculate this by assuming that the phase with the lowest
|
||||
* dimensionality is the phase where reactions are taking place.
|
||||
*/
|
||||
size_t m_rxnphase;
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ public:
|
|||
protected:
|
||||
std::vector<R> m_rates;
|
||||
std::vector<size_t> m_rxn;
|
||||
vector_fp m_const; //!< @deprecated not used
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -282,17 +282,6 @@ public:
|
|||
return m_g0_RT;
|
||||
}
|
||||
|
||||
//! Returns a reference to the vector of exponentials of the nondimensional
|
||||
//! Gibbs Free Energies of the reference state at the current temperature
|
||||
//! of the solution and the reference pressure for the species.
|
||||
const vector_fp& expGibbs_RT() const {
|
||||
_updateThermo();
|
||||
for (size_t k = 0; k != m_kk; k++) {
|
||||
m_expg0_RT[k] = std::exp(m_g0_RT[k]);
|
||||
}
|
||||
return m_expg0_RT;
|
||||
}
|
||||
|
||||
//! Returns a reference to the vector of nondimensional
|
||||
//! entropies of the reference state at the current temperature
|
||||
//! of the solution and the reference pressure for each species.
|
||||
|
|
@ -444,12 +433,6 @@ protected:
|
|||
//! Temporary storage for dimensionless reference state entropies
|
||||
mutable vector_fp m_s0_R;
|
||||
|
||||
//! currently unsed
|
||||
/*!
|
||||
* @deprecated
|
||||
*/
|
||||
mutable vector_fp m_expg0_RT;
|
||||
|
||||
//! Currently unused
|
||||
/*
|
||||
* @deprecated
|
||||
|
|
|
|||
|
|
@ -205,15 +205,6 @@ public:
|
|||
doublereal& maxTemp,
|
||||
doublereal& refPressure) const;
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param index Species index
|
||||
* @param c Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
* @deprecated
|
||||
*/
|
||||
DEPRECATED(virtual void modifyParams(size_t index, doublereal* c));
|
||||
|
||||
#ifdef H298MODIFY_CAPABILITY
|
||||
|
||||
virtual doublereal reportOneHf298(int k) const;
|
||||
|
|
|
|||
|
|
@ -2128,19 +2128,6 @@ public:
|
|||
*/
|
||||
virtual void initThermoXML(XML_Node& phaseNode, std::string id);
|
||||
|
||||
//! Report the molar volume of species k
|
||||
/*!
|
||||
*
|
||||
* units - \f$ m^3 kmol^-1 \f$
|
||||
*
|
||||
* @param k species index
|
||||
*
|
||||
* @deprecated
|
||||
* The getPartialMolarVolumes() expression is more precise.
|
||||
*/
|
||||
DEPRECATED(double speciesMolarVolume(int k) const);
|
||||
|
||||
|
||||
//! Value of the Debye Huckel constant as a function of temperature
|
||||
//! and pressure.
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -380,25 +380,10 @@ public:
|
|||
//! @return Returns the molecular weight of species \c k.
|
||||
doublereal molecularWeight(size_t k) const;
|
||||
|
||||
//! Return the Molar mass of species \c k
|
||||
//! Alternate name for molecular weight.
|
||||
//! @param k index for species
|
||||
//! @return Return the molar mass of species k kg/kmol.
|
||||
//! @deprecated use molecularWeight instead
|
||||
doublereal molarMass(size_t k) const {
|
||||
return molecularWeight(k);
|
||||
}
|
||||
|
||||
//! Copy the vector of molecular weights into vector weights.
|
||||
//! @param weights Output vector of molecular weights (kg/kmol)
|
||||
void getMolecularWeights(vector_fp& weights) const;
|
||||
|
||||
//! Copy the vector of molecular weights into array weights.
|
||||
//! @param iwt Unused.
|
||||
//! @param weights Output array of molecular weights (kg/kmol)
|
||||
//! @deprecated
|
||||
DEPRECATED(void getMolecularWeights(int iwt, doublereal* weights) const);
|
||||
|
||||
//! Copy the vector of molecular weights into array weights.
|
||||
//! @param weights Output array of molecular weights (kg/kmol)
|
||||
void getMolecularWeights(doublereal* weights) const;
|
||||
|
|
@ -698,17 +683,10 @@ public:
|
|||
virtual bool ready() const;
|
||||
|
||||
//! Return the State Mole Fraction Number
|
||||
DEPRECATED(int stateMFNumber() const) {
|
||||
int stateMFNumber() const {
|
||||
return m_stateNum;
|
||||
}
|
||||
|
||||
//! Every time the mole fractions have changed, this routine will increment
|
||||
//! the stateMFNumber
|
||||
//! @param forceChange If this is true then the stateMFNumber always
|
||||
//! changes. This defaults to false.
|
||||
//! @deprecated
|
||||
DEPRECATED(void stateMFChangeCalc(bool forceChange = false));
|
||||
|
||||
protected:
|
||||
//! @internal Initialize.
|
||||
//! Make a local copy of the vector of molecular weights, and resize the
|
||||
|
|
@ -740,8 +718,8 @@ protected:
|
|||
vector_fp m_speciesSize;
|
||||
|
||||
vector_fp m_speciesCharge; //!< Vector of species charges. length m_kk.
|
||||
private:
|
||||
|
||||
private:
|
||||
XML_Node* m_xml; //!< XML node containing the XML info for this phase
|
||||
|
||||
//! ID of the phase. This is the value of the ID attribute of the XML
|
||||
|
|
@ -774,7 +752,6 @@ private:
|
|||
|
||||
//! State Change variable. Whenever the mole fraction vector changes,
|
||||
//! this int is incremented.
|
||||
//! @deprecated
|
||||
int m_stateNum;
|
||||
|
||||
//! Boolean indicating whether the number of species has been frozen.
|
||||
|
|
|
|||
|
|
@ -348,31 +348,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* The thermo parameterization for a single species is overwritten.
|
||||
*
|
||||
* @param index Species index
|
||||
* @param c Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
* Must be length >= 4.
|
||||
* @deprecated
|
||||
*/
|
||||
DEPRECATED(virtual void modifyParams(size_t index, doublereal* c)) {
|
||||
size_t loc = m_loc[index];
|
||||
if (loc == npos) {
|
||||
throw CanteraError("SimpleThermo::modifyParams",
|
||||
"modifying parameters for species which hasn't been set yet");
|
||||
}
|
||||
/*
|
||||
* Change the data
|
||||
*/
|
||||
m_t0[loc] = c[0];
|
||||
m_h0_R[loc] = c[1] / GasConstant;
|
||||
m_s0_R[loc] = c[2] / GasConstant;
|
||||
m_cp0_R[loc] = c[3] / GasConstant;
|
||||
}
|
||||
|
||||
#ifdef H298MODIFY_CAPABILITY
|
||||
|
||||
virtual doublereal reportOneHf298(int k) const {
|
||||
|
|
|
|||
|
|
@ -354,15 +354,6 @@ public:
|
|||
doublereal& maxTemp,
|
||||
doublereal& refPressure) const =0;
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param index Species index
|
||||
* @param c Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
* @deprecated
|
||||
*/
|
||||
DEPRECATED(virtual void modifyParams(size_t index, doublereal* c)) = 0;
|
||||
|
||||
#ifdef H298MODIFY_CAPABILITY
|
||||
//! Report the 298 K Heat of Formation of the standard state of one species (J kmol-1)
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -147,22 +147,6 @@ public:
|
|||
*/
|
||||
SpeciesThermo* newSpeciesThermo(std::vector<XML_Node*> & spDataNodeList) const;
|
||||
|
||||
//! Create a new species property manager for the reference state
|
||||
/*!
|
||||
* This routine will look through species nodes. It will discover what
|
||||
* each species needs for its species property managers. Then,
|
||||
* it will malloc and return the proper species property manager to use.
|
||||
*
|
||||
*
|
||||
* @param spDataNodeList This vector contains a list
|
||||
* of species XML nodes that will be in the phase
|
||||
*
|
||||
* @return Returns the pointer to the newly malloced
|
||||
* species property manager for the reference state
|
||||
* @deprecated Essentially never used
|
||||
*/
|
||||
DEPRECATED(SpeciesThermo* newSpeciesThermoOpt(std::vector<XML_Node*> & spDataNodeList) const);
|
||||
|
||||
//! Install a species thermodynamic property parameterization
|
||||
//! for the reference state for one species into a species thermo manager.
|
||||
/*!
|
||||
|
|
@ -274,10 +258,9 @@ SpeciesThermo* newSpeciesThermoMgr(std::string& stype,
|
|||
*
|
||||
* @param f Pointer to a SpeciesThermoFactory. optional parameter.
|
||||
* Defaults to NULL.
|
||||
* @param opt Boolean defaults to false.
|
||||
*/
|
||||
SpeciesThermo* newSpeciesThermoMgr(std::vector<XML_Node*> spDataNodeList,
|
||||
SpeciesThermoFactory* f=0, bool opt=false);
|
||||
SpeciesThermoFactory* f=0);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
// Copyright 2001 California Institute of Technology
|
||||
|
||||
#include "cantera/base/ct_defs.h"
|
||||
#include "speciesThermoTypes.h"
|
||||
|
||||
#ifndef CT_SPECIESTHERMOINTERPTYPE_H
|
||||
|
|
|
|||
|
|
@ -21,29 +21,6 @@ namespace Cantera
|
|||
{
|
||||
/////////////////////// Exceptions //////////////////////////////
|
||||
|
||||
//! Exception thrown if species reference pressures don't match.
|
||||
/*!
|
||||
* @ingroup mgrsrefcalc
|
||||
* @deprecated unused
|
||||
*/
|
||||
class RefPressureMismatch : public CanteraError
|
||||
{
|
||||
public:
|
||||
//! constructor
|
||||
/*!
|
||||
* @param proc name of the procecdure
|
||||
* @param prnew reference pressure
|
||||
* @param prold old reference pressure
|
||||
*/
|
||||
RefPressureMismatch(std::string proc, doublereal prnew,
|
||||
doublereal prold) : CanteraError(proc,
|
||||
"Species reference pressure ("
|
||||
+ fp2str(prnew) + ") does not match previously-defined "
|
||||
+ "reference pressure (" + fp2str(prold) + ")") {}
|
||||
//! destructor
|
||||
virtual ~RefPressureMismatch() throw() {}
|
||||
};
|
||||
|
||||
//! Unknown species thermo manager string error
|
||||
/*!
|
||||
* @ingroup mgrsrefcalc
|
||||
|
|
@ -250,15 +227,6 @@ public:
|
|||
doublereal& maxTemp,
|
||||
doublereal& refPressure) const;
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param index Species index
|
||||
* @param c Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
* @deprecated
|
||||
*/
|
||||
DEPRECATED(virtual void modifyParams(size_t index, doublereal* c));
|
||||
|
||||
#ifdef H298MODIFY_CAPABILITY
|
||||
|
||||
virtual doublereal reportOneHf298(int k) const {
|
||||
|
|
@ -374,19 +342,5 @@ SpeciesThermoDuo<T1, T2>::reportParams(size_t index, int& type,
|
|||
}
|
||||
}
|
||||
|
||||
template<class T1, class T2>
|
||||
void
|
||||
SpeciesThermoDuo<T1, T2>::modifyParams(size_t index, doublereal* c)
|
||||
{
|
||||
int ctype = reportType(index);
|
||||
if (ctype == m_thermo1.ID) {
|
||||
m_thermo1.modifyParams(index, c);
|
||||
} else if (ctype == m_thermo2.ID) {
|
||||
m_thermo2.modifyParams(index, c);
|
||||
} else {
|
||||
throw CanteraError("modifyParams", "confused");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -362,11 +362,6 @@ public:
|
|||
return -1.0;
|
||||
}
|
||||
|
||||
/// @deprecated
|
||||
virtual void updateDensity() {
|
||||
deprecatedMethod("ThermoPhase","updateDensity","");
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Electric Potential
|
||||
|
|
@ -1669,17 +1664,6 @@ private:
|
|||
//! typedef for the ThermoPhase class
|
||||
typedef ThermoPhase thermo_t;
|
||||
|
||||
//! Format a summary of the mixture state for output.
|
||||
/*!
|
||||
* @param th ThermoPhase object to create a report about
|
||||
* @param show_thermo Boolean indicating whether the thermo functions
|
||||
* of the phase should be written out
|
||||
*
|
||||
* @return Returns a string containing the report
|
||||
* @deprecated use "th.report(show_thermo)" instead
|
||||
*/
|
||||
DEPRECATED(std::string report(const ThermoPhase& th, const bool show_thermo = true));
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,10 +9,6 @@
|
|||
#ifndef SPECIES_THERMO_TYPES_H
|
||||
#define SPECIES_THERMO_TYPES_H
|
||||
|
||||
#include "cantera/base/ct_defs.h"
|
||||
#include "cantera/base/global.h"
|
||||
#include "cantera/base/stringUtils.h"
|
||||
|
||||
//! Constant Cp
|
||||
#define CONSTANT_CP 1
|
||||
|
||||
|
|
@ -72,26 +68,6 @@
|
|||
//! A general object is called with the pressure set at the reference state.
|
||||
#define PDSS_TYPE 37
|
||||
|
||||
namespace Cantera
|
||||
{
|
||||
|
||||
//! Error for unknown thermo parameterization
|
||||
struct UnknownThermoParam {
|
||||
//! Constructor
|
||||
/*!
|
||||
* @param thermotype Integer specifying the thermo parameterization
|
||||
*
|
||||
* @deprecated This class is unused?
|
||||
*/
|
||||
DEPRECATED(UnknownThermoParam(int thermotype)) {
|
||||
writelog(std::string("\n ### ERROR ### \n") +
|
||||
"Unknown species thermo parameterization ("
|
||||
+ int2str(thermotype) + ")\n\n");
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,52 +19,7 @@
|
|||
namespace Cantera
|
||||
{
|
||||
|
||||
//====================================================================================================================
|
||||
//! Transport solve options
|
||||
//! @deprecated GMRES option is unimplemented.
|
||||
enum TRANSOLVE_TYPE {
|
||||
//! Solve the dense matrix via a gmres iteration
|
||||
TRANSOLVE_GMRES = 1,
|
||||
//! Solve the dense matrix via an LU gauss elimination
|
||||
TRANSOLVE_LU
|
||||
};
|
||||
//====================================================================================================================
|
||||
class GasTransportParams;
|
||||
//====================================================================================================================
|
||||
//! Class L_Matrix is used to represent the "L" matrix.
|
||||
/*!
|
||||
* This class is used instead of DenseMatrix so that a version of mult can be
|
||||
* used that knows about the structure of the L matrix,
|
||||
* specifically that the upper-right and lower-left blocks are
|
||||
* zero.
|
||||
* @ingroup transportProps
|
||||
*/
|
||||
class L_Matrix : public DenseMatrix
|
||||
{
|
||||
public:
|
||||
|
||||
//! default constructor
|
||||
L_Matrix() {}
|
||||
|
||||
//! destructor
|
||||
virtual ~L_Matrix() {}
|
||||
|
||||
//! Conduct a multiply with the Dense matrix
|
||||
/*!
|
||||
* This method is used by GMRES to multiply the L matrix by a
|
||||
* vector b. The L matrix has a 3x3 block structure, where each
|
||||
* block is a K x K matrix. The elements of the upper-right and
|
||||
* lower-left blocks are all zero. This method is defined so
|
||||
* that the multiplication only involves the seven non-zero
|
||||
* blocks.
|
||||
*
|
||||
* @param b
|
||||
* @param prod
|
||||
* @deprecated GMRES method is not implemented
|
||||
*/
|
||||
DEPRECATED(virtual void mult(const doublereal* b, doublereal* prod) const);
|
||||
};
|
||||
|
||||
|
||||
//====================================================================================================================
|
||||
//! Class MultiTransport implements multicomponent transport
|
||||
|
|
@ -178,21 +133,6 @@ public:
|
|||
const doublereal* state2, doublereal delta,
|
||||
doublereal* fluxes);
|
||||
|
||||
//! Set the solution method for inverting the L matrix
|
||||
/*!
|
||||
* @param method enum TRANSOLVE_TYPE Either use direct or TRANSOLVE_GMRES
|
||||
* @deprecated GMRES option is unimplemented.
|
||||
*/
|
||||
DEPRECATED(virtual void setSolutionMethod(TRANSOLVE_TYPE method));
|
||||
|
||||
//! Set the options for the GMRES solution
|
||||
/*!
|
||||
* @param m set the mgmres param
|
||||
* @param eps Set the eps parameter
|
||||
* @deprecated GMRES option is unimplemented.
|
||||
*/
|
||||
DEPRECATED(virtual void setOptions_GMRES(int m, doublereal eps));
|
||||
|
||||
//! Initialize the transport operator with parameters from GasTransportParams object
|
||||
/*!
|
||||
* @param tr input GasTransportParams object
|
||||
|
|
@ -262,16 +202,12 @@ private:
|
|||
doublereal m_lambda;
|
||||
|
||||
// L matrix quantities
|
||||
L_Matrix m_Lmatrix;
|
||||
DenseMatrix m_Lmatrix;
|
||||
DenseMatrix m_aa;
|
||||
//DenseMatrix m_Lmatrix;
|
||||
vector_fp m_a;
|
||||
vector_fp m_b;
|
||||
|
||||
bool m_gmres; //!< @deprecated
|
||||
int m_mgmres; //!< @deprecated
|
||||
doublereal m_eps_gmres; //!< @deprecated
|
||||
|
||||
// work space
|
||||
vector_fp m_spwork1, m_spwork2, m_spwork3;
|
||||
|
||||
|
|
|
|||
|
|
@ -336,8 +336,6 @@ public:
|
|||
* k = j * nsp + i
|
||||
*
|
||||
* The size of mobRat must be at least equal to nsp*nsp
|
||||
*
|
||||
* @deprecated This doesn't seem to be the essential input; it should just be the mobility.
|
||||
*/
|
||||
DEPRECATED(virtual void mobilityRatio(double* mobRat)) {
|
||||
err("mobilityRatio");
|
||||
|
|
|
|||
|
|
@ -61,15 +61,6 @@ void demoprog()
|
|||
}
|
||||
printf("\n ");
|
||||
|
||||
// modify coefficient A6 of the low-temperature polynomial
|
||||
// Note that since we are not modifying the high-temperature
|
||||
// polynomial, a warning will be printed about a discontinuity
|
||||
// in enthalpy at Tmid.
|
||||
c[LOW_A6] += 1.0e4;
|
||||
sp.modifyParams(n, c);
|
||||
|
||||
sp.reportParams(n, type, c, minTemp, maxTemp, refPressure);
|
||||
|
||||
// print the modified NASA coefficients
|
||||
printf("\n\n %s (modified):", gas.speciesName(n).c_str());
|
||||
printf("\n ");
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include "cantera/base/ct_defs.h"
|
||||
#include "cantera/thermo/mix_defs.h"
|
||||
#include "cantera/base/clockWC.h"
|
||||
#include "cantera/base/stringUtils.h"
|
||||
#include "cantera/thermo/ThermoPhase.h"
|
||||
#include "cantera/thermo/speciesThermoTypes.h"
|
||||
#include "cantera/thermo/IdealSolidSolnPhase.h"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ namespace VCSnonideal
|
|||
vcs_VolPhase::vcs_VolPhase(VCS_SOLVE* owningSolverObject) :
|
||||
m_owningSolverObject(0),
|
||||
VP_ID_(npos),
|
||||
Domain_ID(-1),
|
||||
m_singleSpecies(true),
|
||||
m_gasPhase(false),
|
||||
m_eqnState(VCS_EOS_CONSTANT),
|
||||
|
|
@ -97,7 +96,6 @@ vcs_VolPhase::~vcs_VolPhase()
|
|||
vcs_VolPhase::vcs_VolPhase(const vcs_VolPhase& b) :
|
||||
m_owningSolverObject(b.m_owningSolverObject),
|
||||
VP_ID_(b.VP_ID_),
|
||||
Domain_ID(b.Domain_ID),
|
||||
m_singleSpecies(b.m_singleSpecies),
|
||||
m_gasPhase(b.m_gasPhase),
|
||||
m_eqnState(b.m_eqnState),
|
||||
|
|
@ -152,7 +150,6 @@ vcs_VolPhase& vcs_VolPhase::operator=(const vcs_VolPhase& b)
|
|||
// m_owningSolverObject = b.m_owningSolverObject;
|
||||
|
||||
VP_ID_ = b.VP_ID_;
|
||||
Domain_ID = b.Domain_ID;
|
||||
m_singleSpecies = b.m_singleSpecies;
|
||||
m_gasPhase = b.m_gasPhase;
|
||||
m_eqnState = b.m_eqnState;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include "cantera/equil/equil.h"
|
||||
|
||||
#include "cantera/base/ct_defs.h"
|
||||
#include "cantera/base/stringUtils.h"
|
||||
#include "cantera/thermo/mix_defs.h"
|
||||
#include "cantera/thermo/speciesThermoTypes.h"
|
||||
#include "cantera/thermo/IdealSolidSolnPhase.h"
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ ConstDensityThermo& ConstDensityThermo::operator=(const ConstDensityThermo& righ
|
|||
m_cp0_R = right.m_cp0_R;
|
||||
m_g0_RT = right.m_g0_RT;
|
||||
m_s0_R = right.m_s0_R;
|
||||
m_expg0_RT = right.m_expg0_RT;
|
||||
m_pe = right.m_pe;
|
||||
m_pp = right.m_pp;
|
||||
|
||||
|
|
@ -167,7 +166,6 @@ void ConstDensityThermo::initThermo()
|
|||
|
||||
m_h0_RT.resize(m_kk);
|
||||
m_g0_RT.resize(m_kk);
|
||||
m_expg0_RT.resize(m_kk);
|
||||
m_cp0_R.resize(m_kk);
|
||||
m_s0_R.resize(m_kk);
|
||||
m_pe.resize(m_kk, 0.0);
|
||||
|
|
|
|||
|
|
@ -292,22 +292,6 @@ reportParams(size_t index, int& type, doublereal* const c,
|
|||
}
|
||||
}
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param index Species index
|
||||
* @param c Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
void GeneralSpeciesThermo::
|
||||
modifyParams(size_t index, doublereal* c)
|
||||
{
|
||||
SpeciesThermoInterpType* sp = m_sp[index];
|
||||
if (sp) {
|
||||
sp->modifyParameters(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the lowest temperature at which the thermodynamic
|
||||
* parameterization is valid. If no argument is supplied, the
|
||||
|
|
|
|||
|
|
@ -1425,21 +1425,6 @@ doublereal HMWSoln::satPressure(doublereal t) const
|
|||
return pres;
|
||||
}
|
||||
|
||||
/*
|
||||
* Report the molar volume of species k
|
||||
*
|
||||
* units - \f$ m^3 kmol^-1 \f$
|
||||
*/
|
||||
double HMWSoln::speciesMolarVolume(int k) const
|
||||
{
|
||||
double vol = m_speciesSize[k];
|
||||
if (k == 0) {
|
||||
double dd = m_waterSS->density();
|
||||
vol = molecularWeight(0)/dd;
|
||||
}
|
||||
return vol;
|
||||
}
|
||||
|
||||
/*
|
||||
* A_Debye_TP() (virtual)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "cantera/thermo/SpeciesThermo.h"
|
||||
#include "cantera/base/xml.h"
|
||||
#include "cantera/base/ctml.h"
|
||||
#include "cantera/base/stringUtils.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ctml;
|
||||
|
|
|
|||
|
|
@ -426,40 +426,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* This utility function modifies the array of coefficients.
|
||||
* The array is the same as that returned by reportParams, so
|
||||
* a call can first be made to reportParams to populate the
|
||||
* array, and then modifyParams can be called to alter
|
||||
* selected values. For the NASA object, there are 15
|
||||
* coefficients.
|
||||
|
||||
* @param index Species index
|
||||
* @param c Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
virtual void modifyParams(size_t index, doublereal* c) {
|
||||
int type = reportType(index);
|
||||
if (type == NASA) {
|
||||
size_t grp = m_group_map[index];
|
||||
size_t pos = m_posInGroup_map[index];
|
||||
std::vector<NasaPoly1> &mlg = m_low[grp-1];
|
||||
std::vector<NasaPoly1> &mhg = m_high[grp-1];
|
||||
NasaPoly1* lowPoly = &(mlg[pos]);
|
||||
NasaPoly1* highPoly = &(mhg[pos]);
|
||||
doublereal tmid = lowPoly->maxTemp();
|
||||
if (c[0] != tmid) {
|
||||
throw CanteraError(" ", "Tmid cannot be changed");
|
||||
}
|
||||
lowPoly->modifyParameters(c + 1);
|
||||
highPoly->modifyParameters(c + 8);
|
||||
checkContinuity(m_name[index], c[0], c + 1, c + 8);
|
||||
} else {
|
||||
throw CanteraError(" ", "confused");
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef H298MODIFY_CAPABILITY
|
||||
virtual doublereal reportOneHf298(const int k) const {
|
||||
|
||||
|
|
|
|||
|
|
@ -112,16 +112,6 @@ Phase::~Phase()
|
|||
}
|
||||
}
|
||||
|
||||
inline void Phase::stateMFChangeCalc(bool forcerChange)
|
||||
{
|
||||
// Right now we assume that the mole fractions have changed every time
|
||||
// the function is called
|
||||
m_stateNum++;
|
||||
if (m_stateNum > 1000000) {
|
||||
m_stateNum = -10000000;
|
||||
}
|
||||
}
|
||||
|
||||
XML_Node& Phase::xml()
|
||||
{
|
||||
return *m_xml;
|
||||
|
|
@ -342,9 +332,7 @@ void Phase::setMoleFractions(const doublereal* const x)
|
|||
* Calculate the normalized molecular weight
|
||||
*/
|
||||
m_mmw = sum/norm;
|
||||
|
||||
// Call a routine to determine whether state has changed.
|
||||
stateMFChangeCalc();
|
||||
m_stateNum++;
|
||||
}
|
||||
|
||||
void Phase::setMoleFractions_NoNorm(const doublereal* const x)
|
||||
|
|
@ -354,9 +342,7 @@ void Phase::setMoleFractions_NoNorm(const doublereal* const x)
|
|||
transform(x, x + m_kk, m_ym.begin(), timesConstant<double>(rmmw));
|
||||
transform(m_ym.begin(), m_ym.begin() + m_kk, m_molwts.begin(),
|
||||
m_y.begin(), multiplies<double>());
|
||||
|
||||
// Call a routine to determine whether state has changed.
|
||||
stateMFChangeCalc();
|
||||
m_stateNum++;
|
||||
}
|
||||
|
||||
void Phase::setMoleFractionsByName(compositionMap& xMap)
|
||||
|
|
@ -395,9 +381,7 @@ void Phase::setMassFractions(const doublereal* const y)
|
|||
transform(m_y.begin(), m_y.end(), m_rmolwts.begin(),
|
||||
m_ym.begin(), multiplies<double>());
|
||||
m_mmw = 1.0 / accumulate(m_ym.begin(), m_ym.end(), 0.0);
|
||||
|
||||
// Call a routine to determine whether state has changed.
|
||||
stateMFChangeCalc();
|
||||
m_stateNum++;
|
||||
}
|
||||
|
||||
void Phase::setMassFractions_NoNorm(const doublereal* const y)
|
||||
|
|
@ -408,9 +392,7 @@ void Phase::setMassFractions_NoNorm(const doublereal* const y)
|
|||
multiplies<double>());
|
||||
sum = accumulate(m_ym.begin(), m_ym.end(), 0.0);
|
||||
m_mmw = 1.0/sum;
|
||||
|
||||
// Call a routine to determine whether state has changed.
|
||||
stateMFChangeCalc();
|
||||
m_stateNum++;
|
||||
}
|
||||
|
||||
void Phase::setMassFractionsByName(compositionMap& yMap)
|
||||
|
|
@ -518,12 +500,6 @@ void Phase::getMolecularWeights(vector_fp& weights) const
|
|||
copy(mw.begin(), mw.end(), weights.begin());
|
||||
}
|
||||
|
||||
void Phase::getMolecularWeights(int iwt, doublereal* weights) const
|
||||
{
|
||||
const vector_fp& mw = molecularWeights();
|
||||
copy(mw.begin(), mw.end(), weights);
|
||||
}
|
||||
|
||||
void Phase::getMolecularWeights(doublereal* weights) const
|
||||
{
|
||||
const vector_fp& mw = molecularWeights();
|
||||
|
|
@ -619,9 +595,7 @@ void Phase::setConcentrations(const doublereal* const conc)
|
|||
m_ym[k] = m_y[k] * rsum;
|
||||
m_y[k] = m_ym[k] * m_molwts[k]; // m_y is now the mass fraction
|
||||
}
|
||||
|
||||
// Call a routine to determine whether state has changed.
|
||||
stateMFChangeCalc();
|
||||
m_stateNum++;
|
||||
}
|
||||
|
||||
doublereal Phase::molarDensity() const
|
||||
|
|
|
|||
|
|
@ -425,35 +425,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param index Species index
|
||||
* @param c Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
virtual void modifyParams(size_t index, doublereal* c) {
|
||||
int type = reportType(index);
|
||||
if (type == SHOMATE) {
|
||||
size_t grp = m_group_map[index];
|
||||
size_t pos = m_posInGroup_map[index];
|
||||
std::vector<ShomatePoly> &mlg = m_low[grp-1];
|
||||
std::vector<ShomatePoly> &mhg = m_high[grp-1];
|
||||
ShomatePoly* lowPoly = &(mlg[pos]);
|
||||
ShomatePoly* highPoly = &(mhg[pos]);
|
||||
doublereal tmid = lowPoly->maxTemp();
|
||||
if (fabs(c[0] - tmid) > 0.001) {
|
||||
throw CanteraError("modifyParams", "can't change mid temp");
|
||||
}
|
||||
|
||||
lowPoly->modifyParameters(c + 1);
|
||||
|
||||
highPoly->modifyParameters(c + 8);
|
||||
|
||||
} else {
|
||||
throw CanteraError(" ", "confused");
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef H298MODIFY_CAPABILITY
|
||||
|
||||
virtual doublereal reportOneHf298(int k) const {
|
||||
|
|
|
|||
|
|
@ -166,28 +166,6 @@ SpeciesThermo* SpeciesThermoFactory::newSpeciesThermo(std::vector<XML_Node*> & s
|
|||
+ SHOMATE*ishomate + SIMPLE*isimple);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @todo is this used?
|
||||
*/
|
||||
SpeciesThermo* SpeciesThermoFactory::
|
||||
newSpeciesThermoOpt(std::vector<XML_Node*> & spDataNodeList) const
|
||||
{
|
||||
int inasa = 0, ishomate = 0, isimple = 0, iother = 0;
|
||||
try {
|
||||
getSpeciesThermoTypes(spDataNodeList, inasa, ishomate, isimple, iother);
|
||||
} catch (UnknownSpeciesThermoModel) {
|
||||
iother = 1;
|
||||
popError();
|
||||
}
|
||||
|
||||
if (iother) {
|
||||
return new GeneralSpeciesThermo();
|
||||
}
|
||||
return newSpeciesThermo(NASA*inasa
|
||||
+ SHOMATE*ishomate + SIMPLE*isimple);
|
||||
}
|
||||
|
||||
SpeciesThermo* SpeciesThermoFactory::newSpeciesThermo(int type) const
|
||||
{
|
||||
switch (type) {
|
||||
|
|
@ -908,18 +886,12 @@ SpeciesThermo* newSpeciesThermoMgr(std::string& stype,
|
|||
* @param opt Boolean defaults to false.
|
||||
*/
|
||||
SpeciesThermo* newSpeciesThermoMgr(std::vector<XML_Node*> spData_nodes,
|
||||
SpeciesThermoFactory* f, bool opt)
|
||||
SpeciesThermoFactory* f)
|
||||
{
|
||||
if (f == 0) {
|
||||
f = SpeciesThermoFactory::factory();
|
||||
}
|
||||
SpeciesThermo* sptherm;
|
||||
if (opt) {
|
||||
sptherm = f->newSpeciesThermoOpt(spData_nodes);
|
||||
} else {
|
||||
sptherm = f->newSpeciesThermo(spData_nodes);
|
||||
}
|
||||
return sptherm;
|
||||
return f->newSpeciesThermo(spData_nodes);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,9 +49,10 @@
|
|||
#include "cantera/thermo/IdealMolalSoln.h"
|
||||
#include "cantera/thermo/MolarityIonicVPSSTP.h"
|
||||
#include "cantera/thermo/MixedSolventElectrolyte.h"
|
||||
|
||||
#include "cantera/thermo/IdealSolnGasVPSS.h"
|
||||
|
||||
#include "cantera/base/stringUtils.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
using namespace std;
|
||||
|
|
@ -64,9 +65,6 @@ ThermoFactory* ThermoFactory::s_factory = 0;
|
|||
mutex_t ThermoFactory::thermo_mutex;
|
||||
|
||||
//! Define the number of %ThermoPhase types for use in this factory routine
|
||||
/*!
|
||||
* @deprecated This entire structure could be replaced with a std::map
|
||||
*/
|
||||
static int ntypes = 23;
|
||||
|
||||
//! Define the string name of the %ThermoPhase types that are handled by this factory routine
|
||||
|
|
|
|||
|
|
@ -1501,9 +1501,4 @@ void ThermoPhase::reportCSV(std::ofstream& csvFile) const
|
|||
}
|
||||
}
|
||||
|
||||
std::string report(const ThermoPhase& th, const bool show_thermo)
|
||||
{
|
||||
return th.report(show_thermo);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,33 +53,6 @@ inline doublereal Frot(doublereal tr, doublereal sqtr)
|
|||
return 1.0 + c1*sqtr + c2*tr + c3*sqtr*tr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method is used by GMRES to multiply the L matrix by a
|
||||
* vector b. The L matrix has a 3x3 block structure, where each
|
||||
* block is a K x K matrix. The elements of the upper-right and
|
||||
* lower-left blocks are all zero. This method is defined so
|
||||
* that the multiplication only involves the seven non-zero
|
||||
* blocks.
|
||||
*/
|
||||
void L_Matrix::mult(const doublereal* b, doublereal* prod) const
|
||||
{
|
||||
integer n = static_cast<int>(nRows())/3;
|
||||
integer n2 = 2*n;
|
||||
integer n3 = 3*n;
|
||||
ct_dgemv(ctlapack::ColMajor, ctlapack::NoTranspose, n, n2, 1.0,
|
||||
DATA_PTR(data()), static_cast<int>(nRows()), b, 1, 0.0, prod, 1);
|
||||
ct_dgemv(ctlapack::ColMajor, ctlapack::NoTranspose, n, n3, 1.0,
|
||||
DATA_PTR(data()) + n, static_cast<int>(nRows()),
|
||||
b, 1, 0.0, prod+n, 1);
|
||||
ct_dgemv(ctlapack::ColMajor, ctlapack::NoTranspose, n, n, 1.0,
|
||||
DATA_PTR(data()) + n*n3 + n2, static_cast<int>(nRows()),
|
||||
b + n, 1, 0.0, prod+n2, 1);
|
||||
for (int i = 0; i < n; i++) {
|
||||
prod[i + n2] += b[i + n2] * value(i + n2, i + n2);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////// class MultiTransport methods //////////////
|
||||
|
||||
MultiTransport::MultiTransport(thermo_t* thermo)
|
||||
|
|
@ -132,13 +105,6 @@ bool MultiTransport::initGas(GasTransportParams& tr)
|
|||
|
||||
m_thermal_tlast = 0.0;
|
||||
|
||||
// use LU decomposition by default
|
||||
m_gmres = false;
|
||||
|
||||
// default GMRES parameters
|
||||
m_mgmres = 100;
|
||||
m_eps_gmres = 1.e-4;
|
||||
|
||||
// some work space
|
||||
m_spwork1.resize(m_nsp);
|
||||
m_spwork2.resize(m_nsp);
|
||||
|
|
@ -546,30 +512,7 @@ void MultiTransport::getMolarFluxes(const doublereal* const state1,
|
|||
fluxes[k] /= m_mw[k];
|
||||
}
|
||||
}
|
||||
//====================================================================================================================
|
||||
// Set the solution method for inverting the L matrix
|
||||
/*
|
||||
* @param method enum TRANSOLVE_TYPE Either use direct or TRANSOLVE_GMRES
|
||||
*/
|
||||
void MultiTransport::setSolutionMethod(TRANSOLVE_TYPE method)
|
||||
{
|
||||
if (method == TRANSOLVE_GMRES) {
|
||||
m_gmres = true;
|
||||
} else {
|
||||
m_gmres = false;
|
||||
}
|
||||
}
|
||||
//====================================================================================================================
|
||||
void MultiTransport::setOptions_GMRES(int m, doublereal eps)
|
||||
{
|
||||
if (m > 0) {
|
||||
m_mgmres = m;
|
||||
}
|
||||
if (eps > 0.0) {
|
||||
m_eps_gmres = eps;
|
||||
}
|
||||
}
|
||||
//====================================================================================================================
|
||||
|
||||
void MultiTransport::getMultiDiffCoeffs(const size_t ld, doublereal* const d)
|
||||
{
|
||||
doublereal p = pressure_ig();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue