Cantera  3.0.0
Loading...
Searching...
No Matches
MaskellSolidSolnPhase.h
Go to the documentation of this file.
1/**
2 * @file MaskellSolidSolnPhase.h Header file for a solid solution model
3 * following Maskell, Shaw, and Tye. Electrochimica Acta 1982
4 *
5 * This class inherits from the %Cantera class ThermoPhase and implements a
6 * non-ideal solid solution model with incompressible thermodynamics.
7 */
8
9// This file is part of Cantera. See License.txt in the top-level directory or
10// at https://cantera.org/license.txt for license and copyright information.
11
12#ifndef CT_MASKELLSOLIDSOLNPHASE_H
13#define CT_MASKELLSOLIDSOLNPHASE_H
14
15#include "VPStandardStateTP.h"
16
17namespace Cantera
18{
19/**
20 * Class MaskellSolidSolnPhase represents a condensed phase non-ideal solution
21 * with 2 species following the thermodynamic model described in Maskell, Shaw,
22 * and Tye, Manganese Dioxide Electrode -- IX, Electrochimica Acta 28(2) pp
23 * 231-235, 1983.
24 *
25 * @ingroup thermoprops
26 *
27 * @deprecated To be removed after %Cantera 3.0. This class has numerous thermodynamic
28 * inconsistencies. See https://github.com/Cantera/cantera/issues/1321.
29 */
31{
32public:
34
35 string type() const override {
36 return "MaskellSolidsoln";
37 }
38
39 Units standardConcentrationUnits() const override { return Units(1.0); }
40 void getActivityConcentrations(double* c) const override;
41 double standardConcentration(size_t k=0) const override { return 1.0; }
42 double logStandardConc(size_t k=0) const override { return 0.0; }
43
44 //! @name Molar Thermodynamic Properties of the Solution
45 //! @{
46
47 double enthalpy_mole() const override;
48 double entropy_mole() const override;
49
50 //! @}
51 //! @name Mechanical Equation of State Properties
52 //!
53 //! In this equation of state implementation, the density is a function only
54 //! of the mole fractions. Therefore, it can't be an independent variable.
55 //! Instead, the pressure is used as the independent variable. Functions
56 //! which try to set the thermodynamic state by calling setDensity() will
57 //! cause an exception to be thrown.
58 //! @{
59
60 /**
61 * Pressure. Units: Pa.
62 * For this incompressible system, we return the internally stored
63 * independent value of the pressure.
64 */
65 double pressure() const override {
66 return m_Pcurrent;
67 }
68
69 /**
70 * Set the pressure at constant temperature. Units: Pa. This method sets a
71 * constant within the object. The mass density is not a function of
72 * pressure.
73 *
74 * @param p Input Pressure (Pa)
75 */
76 void setPressure(double p) override;
77
78 void calcDensity() override;
79
80 //! @}
81 //! @name Chemical Potentials and Activities
82 //! @{
83
84 void getActivityCoefficients(double* ac) const override;
85 void getChemPotentials(double* mu) const override;
86 //! @deprecated To be removed after %Cantera 3.0. Use getChemPotentials() instead.
87 void getChemPotentials_RT(double* mu) const override;
88
89 //! @}
90 //! @name Partial Molar Properties of the Solution
91 //! @{
92
93 void getPartialMolarEnthalpies(double* hbar) const override;
94 void getPartialMolarEntropies(double* sbar) const override;
95 void getPartialMolarCp(double* cpbar) const override;
96 void getPartialMolarVolumes(double* vbar) const override;
97 void getPureGibbs(double* gpure) const override;
98 void getStandardChemPotentials(double* mu) const override;
99
100 //! @}
101 //! @name Utility Functions
102 //! @{
103
104 void initThermo() override;
105 void getParameters(AnyMap& phaseNode) const override;
106
107 void set_h_mix(const double hmix) { h_mixing = hmix; }
108
109 //! Set the product Species. Must be called after species have been added.
110 void setProductSpecies(const string& name);
111 //! @}
112
113private:
114 /**
115 * m_Pcurrent = The current pressure. Since the density isn't a function of
116 * pressure, but only of the mole fractions, we need to independently
117 * specify the pressure.
118 */
120
121 //! Value of the enthalpy change on mixing due to protons changing from type
122 //! B to type A configurations.
123 double h_mixing = 0.0;
124
125 //! Index of the species whose mole fraction defines the extent of reduction r
127 int reactant_species_index = -1;
128
129 // Functions to calculate some of the pieces of the mixing terms.
130 double s() const;
131 double fm(const double r) const;
132 double p(const double r) const;
133};
134}
135
136#endif
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
Class MaskellSolidSolnPhase represents a condensed phase non-ideal solution with 2 species following ...
double enthalpy_mole() const override
Molar enthalpy. Units: J/kmol.
double logStandardConc(size_t k=0) const override
Natural logarithm of the standard concentration of the kth species.
void getPartialMolarEnthalpies(double *hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
void getChemPotentials(double *mu) const override
Get the species chemical potentials. Units: J/kmol.
double pressure() const override
Pressure.
double h_mixing
Value of the enthalpy change on mixing due to protons changing from type B to type A configurations.
void getStandardChemPotentials(double *mu) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
void getParameters(AnyMap &phaseNode) const override
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
string type() const override
String indicating the thermodynamic model implemented.
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
void getActivityConcentrations(double *c) const override
This method returns an array of generalized concentrations.
void setPressure(double p) override
Set the pressure at constant temperature.
void getPartialMolarVolumes(double *vbar) const override
Return an array of partial molar volumes for the species in the mixture.
void getPureGibbs(double *gpure) const override
Get the Gibbs functions for the standard state of the species at the current T and P of the solution.
int product_species_index
Index of the species whose mole fraction defines the extent of reduction r.
double entropy_mole() const override
Molar entropy. Units: J/kmol/K.
void calcDensity() override
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
Units standardConcentrationUnits() const override
Returns the units of the "standard concentration" for this phase.
void getPartialMolarCp(double *cpbar) const override
Return an array of partial molar heat capacities for the species in the mixture.
void setProductSpecies(const string &name)
Set the product Species. Must be called after species have been added.
double standardConcentration(size_t k=0) const override
Return the standard concentration for the kth species.
void getChemPotentials_RT(double *mu) const override
void getActivityCoefficients(double *ac) const override
Get the array of non-dimensional molar-based activity coefficients at the current solution temperatur...
void getPartialMolarEntropies(double *sbar) const override
Returns an array of partial molar entropies of the species in the solution.
double m_Pcurrent
m_Pcurrent = The current pressure.
string name() const
Return the name of the phase.
Definition Phase.cpp:20
A representation of the units associated with a dimensional quantity.
Definition Units.h:35
This is a filter class for ThermoPhase that implements some preparatory steps for efficiently handlin...
const double OneAtm
One atmosphere [Pa].
Definition ct_defs.h:96
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564