46 if (m_thermo ==
nullptr) {
48 "Specified kinetics manager does not represent a surface "
49 "kinetics mechanism.");
62 copy(cov, cov + m_cov.size(), m_cov.begin());
79 copy(m_cov.begin(), m_cov.end(), cov);
91 throw CanteraError(
"ReactorSurface::addSensitivityReaction",
92 "Reaction number out of range ({})", i);
95 m_kinetics->
reaction(i)->equation(), 1.0, 1.0);
96 m_params.emplace_back(
102 for (
auto& p : m_params) {
104 m_kinetics->
setMultiplier(p.local, p.value*params[p.global]);
110 for (
auto& p : m_params) {
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
Header file for class ReactorSurface.
Header for a simple thermodynamics model of a surface phase derived from ThermoPhase,...
Base class for exceptions thrown by Cantera classes.
Public interface for kinetics managers.
double multiplier(size_t i) const
The current value of the multiplier for reaction i.
ThermoPhase & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism.
shared_ptr< Reaction > reaction(size_t i)
Return the Reaction object for reaction i.
size_t nReactions() const
Number of reactions in the reaction mechanism.
virtual void setMultiplier(size_t i, double f)
Set the multiplier for reaction i to f.
size_t nSpecies() const
Returns the number of species in the phase.
virtual void setTemperature(double temp)
Set the internally stored temperature of the phase (K).
Base class for stirred reactors.
double temperature() const
Returns the current temperature (K) of the reactor's contents.
ReactorNet & network()
The ReactorNet that this reactor belongs to.
size_t registerSensitivityParameter(const string &name, double value, double scale)
Used by Reactor and Wall objects to register the addition of sensitivity parameters so that the React...
bool m_defaultNameSet
true if default name has been previously set.
double area() const
Returns the surface area [m^2].
void setReactor(ReactorBase *reactor)
Set the reactor that this Surface interacts with.
void setSensitivityParameters(const double *params)
Set reaction rate multipliers.
virtual string type() const
String indicating the wall model implemented.
bool setDefaultName(map< string, int > &counts)
Set the default name of a wall. Returns false if it was previously set.
void getCoverages(double *cov) const
Get the surface coverages.
void setArea(double a)
Set the surface area [m^2].
void resetSensitivityParameters()
Set reaction rate multipliers back to their initial values.
void syncState()
Set the coverages and temperature in the surface phase object to the values for this surface.
string m_name
Reactor surface name.
void setCoverages(const double *cov)
Set the surface coverages.
void setKinetics(Kinetics *kin)
Set the InterfaceKinetics object for this surface.
void addSensitivityReaction(size_t i)
Enable calculation of sensitivities with respect to the rate constant for reaction i.
A simple thermodynamic model for a surface phase, assuming an ideal solution model.
void setCoveragesNoNorm(const double *theta)
Set the surface site fractions to a specified state.
void getCoverages(double *theta) const
Return a vector of surface coverages.
void setCoveragesByName(const string &cov)
Set the coverages from a string of colon-separated name:value pairs.
Namespace for the Cantera kernel.
map< string, double > Composition
Map from string names to doubles.