20 warn_deprecated(
"class PDSS_IonsFromNeutral",
"To be removed after Cantera 3.0");
28void PDSS_IonsFromNeutral::setNeutralSpeciesMultiplier(
const string& species,
double mult)
30 neutralSpeciesMultipliers_[species] = mult;
34void PDSS_IonsFromNeutral::setSpecialSpecies(
bool special) {
41 eosNode[
"model"] =
"ions-from-neutral-molecule";
43 eosNode[
"special-species"] =
true;
45 if (!neutralSpeciesMultipliers_.empty()) {
46 eosNode[
"multipliers"] = neutralSpeciesMultipliers_;
57 for (
const auto& [species, multiplier] :
m_input[
"multipliers"].asMap<
double>()) {
58 setNeutralSpeciesMultiplier(species, multiplier);
66 for (
auto [species, multiplier] : neutralSpeciesMultipliers_) {
76 for (
size_t i = 0; i <
numMult_; i++) {
92 for (
size_t i = 0; i <
numMult_; i++) {
97 val -= 2.0 * log(2.0);
106 for (
size_t i = 0; i <
numMult_; i++) {
111 val += 2.0 * log(2.0);
120 for (
size_t i = 0; i <
numMult_; i++) {
131 for (
size_t i = 0; i <
numMult_; i++) {
147 for (
size_t i = 0; i <
numMult_; i++) {
152 val += 2.0 * log(2.0);
161 for (
size_t i = 0; i <
numMult_; i++) {
172 for (
size_t i = 0; i <
numMult_; i++) {
177 val -= 2.0 * log(2.0);
186 for (
size_t i = 0; i <
numMult_; i++) {
197 for (
size_t i = 0; i <
numMult_; i++) {
Header for intermediate ThermoPhase object for phases which consist of ions whose thermodynamics is c...
Declarations for the class PDSS_IonsFromNeutral ( which handles calculations for a single ion in a fl...
A map of string keys to values whose type can vary at runtime.
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
bool getBool(const string &key, bool default_) const
If key exists, return it as a bool, otherwise return default_.
The IonsFromNeutralVPSSTP is a derived class of ThermoPhase that handles the specification of the che...
double molarVolume() const override
Return the molar volume at standard state.
void setParent(VPStandardStateTP *phase, size_t k) override
Set the parent VPStandardStateTP object of this PDSS object.
PDSS_IonsFromNeutral()
Default constructor.
double gibbs_RT_ref() const override
Return the molar Gibbs free energy divided by RT at reference pressure.
size_t numMult_
Number of neutral molecule species that make up the stoichiometric vector for this species,...
double cp_R() const override
Return the molar const pressure heat capacity divided by RT.
void initThermo() override
Initialization routine.
vector< double > tmpNM
Vector of length equal to the number of species in the neutral molecule phase.
vector< size_t > idNeutralMoleculeVec
Vector of species indices in the neutral molecule ThermoPhase.
double entropy_R_ref() const override
Return the molar entropy divided by R at reference pressure.
double enthalpy_RT_ref() const override
Return the molar enthalpy divided by RT at reference pressure.
void getParameters(AnyMap &eosNode) const override
Store the parameters needed to reconstruct a copy of this PDSS object.
double intEnergy_mole() const override
Return the molar internal Energy in units of J kmol-1.
shared_ptr< ThermoPhase > neutralMoleculePhase_
Pointer to the Neutral Molecule ThermoPhase object.
void setState_TP(double temp, double pres) override
Set the internal temperature and pressure.
double entropy_R() const override
Return the standard state entropy divided by RT.
double enthalpy_RT() const override
Return the standard state molar enthalpy divided by RT.
double density() const override
Return the standard state density at standard state.
bool add2RTln2_
Add 2RTln2 to the entropy and Gibbs free energies for this species.
double molarVolume_ref() const override
Return the molar volume at reference pressure.
double gibbs_RT() const override
Return the molar Gibbs free energy divided by RT.
vector< double > factorVec
Stoichiometric coefficient for this species using the Neutral Molecule Species in the vector idNeutra...
double cp_R_ref() const override
Return the molar heat capacity divided by R at reference pressure.
double m_h0_RT
Reference state enthalpy divided by RT.
virtual void initThermo()
Initialization routine.
double m_p0
Reference state pressure of the species.
double m_temp
Current temperature used by the PDSS object.
double m_pres
State of the system - pressure.
double m_maxTemp
Maximum temperature.
double m_minTemp
Minimum temperature.
double m_mw
Molecular Weight of the species.
AnyMap m_input
Input data supplied via setParameters.
virtual void getParameters(AnyMap &eosNode) const
Store the parameters needed to reconstruct a copy of this PDSS object.
This is a filter class for ThermoPhase that implements some preparatory steps for efficiently handlin...
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
const double GasConstant
Universal Gas Constant [J/kmol/K].
Namespace for the Cantera kernel.
void warn_deprecated(const string &source, const AnyBase &node, const string &message)
A deprecation warning for syntax in an input file.
Contains declarations for string manipulation functions within Cantera.