Reaktoro  v2.1.1
A unified framework for modeling chemically reactive systems
ControlVariableP Struct Reference

Used to define a p control variable in a chemical equilibrium problem. More...

#include <EquilibriumSpecs.hpp>

Collaboration diagram for ControlVariableP:
[legend]

Public Types

using ChemicalPotentialFn = Fn< real(ChemicalProps const &props, real const &pk)>
 The signature of functions that evaluate the chemical potential of a species in terms of a p control variable. More...
 

Public Attributes

String name
 The unique name for this p control variable (required).
 
ChemicalFormula substance
 The chemical formula of the substance associated to this p control variable (optional).
 
Index ispecies = Index(-1)
 The index of the species whose chemical potential is unknown and defined in terms of this p control variable (optional).
 
ChemicalPotentialFn fn
 The function that introduces association between this p control variable and the chemical potential of a species (optional).
 

Detailed Description

Used to define a p control variable in a chemical equilibrium problem.

p control variables are more versatile than q control variables. They can be used to designate temperature and/or pressure as unknowns. They can be used to represent the amounts of substances (titrants) for which the chemical system is open to. And they can also be used to specify that the chemical potential of a species or a model parameter are unknowns to be resolved along with all others.

Member Typedef Documentation

◆ ChemicalPotentialFn

using ChemicalPotentialFn = Fn<real(ChemicalProps const& props, real const& pk)>

The signature of functions that evaluate the chemical potential of a species in terms of a p control variable.

Parameters
propsThe current chemical properties of the system in the equilibrium calculation.
pkThe current value of the corresponding p control variable during the equilibrium calculation.

The documentation for this struct was generated from the following file: