Reaktoro  v2.0.0
A unified framework for modeling chemically reactive systems
EquilibriumConditions Class Reference

The class used to define conditions to be satisfied at chemical equilibrium. More...

#include <EquilibriumConditions.hpp>

Public Member Functions

 EquilibriumConditions (const EquilibriumSpecs &specs)
 Construct an EquilibriumConditions object.
 
auto temperature (real value, String unit="K") -> void
 Specify the temperature of the system at chemical equilibrium. More...
 
auto pressure (real value, String unit="Pa") -> void
 Specify the pressure of the system at chemical equilibrium. More...
 
auto volume (real value, String unit="m3") -> void
 Specify the volume of the system at chemical equilibrium. More...
 
auto internalEnergy (real value, String unit="J") -> void
 Specify the internal energy of the system at chemical equilibrium. More...
 
auto enthalpy (real value, String unit="J") -> void
 Specify the enthalpy of the system at chemical equilibrium. More...
 
auto gibbsEnergy (real value, String unit="J") -> void
 Specify the Gibbs energy of the system at chemical equilibrium. More...
 
auto helmholtzEnergy (real value, String unit="J") -> void
 Specify the Helmholtz energy of the system at chemical equilibrium. More...
 
auto entropy (real value, String unit="J/K") -> void
 Specify the entropy of the system at chemical equilibrium. More...
 
auto charge (real value, String unit="mol") -> void
 Specify the electric charge at chemical equilibrium. More...
 
auto elementAmount (const StringOrIndex &element, real value, String unit="mol") -> void
 Specify the amount of an element at chemical equilibrium. More...
 
auto elementAmountInPhase (const StringOrIndex &element, const StringOrIndex &phase, real value, String unit="mol") -> void
 Specify the amount of an element in a phase at chemical equilibrium. More...
 
auto elementMass (const StringOrIndex &element, real value, String unit="kg") -> void
 Specify the mass of an element at chemical equilibrium. More...
 
auto elementMassInPhase (const StringOrIndex &element, const StringOrIndex &phase, real value, String unit="kg") -> void
 Specify the mass of an element in a phase at chemical equilibrium. More...
 
auto phaseAmount (const StringOrIndex &phase, real value, String unit="mol") -> void
 Specify the amount of a phase at chemical equilibrium. More...
 
auto phaseMass (const StringOrIndex &phase, real value, String unit="kg") -> void
 Specify the mass of a phase at chemical equilibrium. More...
 
auto phaseVolume (const StringOrIndex &phase, real value, String unit="m3") -> void
 Specify the volume of a phase at chemical equilibrium. More...
 
auto chemicalPotential (String substance, real value, String unit="J/mol") -> void
 Specify the chemical potential of a substance at chemical equilibrium. More...
 
auto lnActivity (String species, real value) -> void
 Specify the ln activity of a species at chemical equilibrium. More...
 
auto lgActivity (String species, real value) -> void
 Specify the lg activity of a species at chemical equilibrium. More...
 
auto activity (String species, real value) -> void
 Specify the activity of a species at chemical equilibrium. More...
 
auto fugacity (String species, real value, String unit="bar") -> void
 Specify the fugacity of a gaseous species at chemical equilibrium. More...
 
auto pH (real value) -> void
 Specify the pH at chemical equilibrium. More...
 
auto pMg (real value) -> void
 Specify the pMg at chemical equilibrium. More...
 
auto pE (real value) -> void
 Specify the pE at chemical equilibrium. More...
 
auto Eh (real value, String unit="V") -> void
 Specify the Eh at chemical equilibrium. More...
 
auto setLowerBoundTemperature (double value, String unit="K") -> void
 Set the lower bound for temperature during the equilibrium calculation.
 
auto setUpperBoundTemperature (double value, String unit="K") -> void
 Set the upper bound for temperature during the equilibrium calculation.
 
auto setLowerBoundPressure (double value, String unit="Pa") -> void
 Set the lower bound for pressure during the equilibrium calculation.
 
auto setUpperBoundPressure (double value, String unit="Pa") -> void
 Set the upper bound for pressure during the equilibrium calculation.
 
auto setLowerBoundTitrant (String substance, double value, String unit="mol") -> void
 Set the lower bound for the amount of a titrant during the equilibrium calculation.
 
auto setUpperBoundTitrant (String substance, double value, String unit="mol") -> void
 Set the upper bound for the amount of a titrant during the equilibrium calculation.
 
auto set (const String &input, const real &val) -> void
 Set the input variable with name input to the value in val. More...
 
auto system () const -> const ChemicalSystem &
 Return the chemical system associated with the equilibrium conditions.
 
auto inputNames () const -> const Strings &
 Return the names of the input variables associated with the equilibrium conditions.
 
auto inputValues () const -> VectorXrConstRef
 Return the values of the input variables associated with the equilibrium conditions.
 
auto lowerBoundsControlVariablesP () const -> VectorXdConstRef
 Return the specified lower bounds for the p control variables.
 
auto upperBoundsControlVariablesP () const -> VectorXdConstRef
 Return the specified upper bounds for the p control variables.
 

Detailed Description

The class used to define conditions to be satisfied at chemical equilibrium.

Member Function Documentation

◆ temperature()

auto temperature ( real  value,
String  unit = "K" 
) -> void

Specify the temperature of the system at chemical equilibrium.

Parameters
valueThe temperature of the system
unitThe unit of the temperature value (must be convertible to K)

◆ pressure()

auto pressure ( real  value,
String  unit = "Pa" 
) -> void

Specify the pressure of the system at chemical equilibrium.

Parameters
valueThe pressure of the system
unitThe unit of the pressure value (must be convertible to Pa)

◆ volume()

auto volume ( real  value,
String  unit = "m3" 
) -> void

Specify the volume of the system at chemical equilibrium.

Parameters
valueThe volume of the system
unitThe unit of the volume value (must be convertible to m3)

◆ internalEnergy()

auto internalEnergy ( real  value,
String  unit = "J" 
) -> void

Specify the internal energy of the system at chemical equilibrium.

Parameters
valueThe internal energy of the system
unitThe unit of the internal energy value (must be convertible to J)

◆ enthalpy()

auto enthalpy ( real  value,
String  unit = "J" 
) -> void

Specify the enthalpy of the system at chemical equilibrium.

Parameters
valueThe enthalpy of the system
unitThe unit of the enthalpy value (must be convertible to J)

◆ gibbsEnergy()

auto gibbsEnergy ( real  value,
String  unit = "J" 
) -> void

Specify the Gibbs energy of the system at chemical equilibrium.

Parameters
valueThe Gibbs energy of the system
unitThe unit of the Gibbs energy value (must be convertible to J)

◆ helmholtzEnergy()

auto helmholtzEnergy ( real  value,
String  unit = "J" 
) -> void

Specify the Helmholtz energy of the system at chemical equilibrium.

Parameters
valueThe Helmholtz energy of the system
unitThe unit of the Helmholtz energy value (must be convertible to J)

◆ entropy()

auto entropy ( real  value,
String  unit = "J/K" 
) -> void

Specify the entropy of the system at chemical equilibrium.

Parameters
valueThe entropy of the system
unitThe unit of the entropy value (must be convertible to J/K)

◆ charge()

auto charge ( real  value,
String  unit = "mol" 
) -> void

Specify the electric charge at chemical equilibrium.

Parameters
valueThe electric charge amount in the system
unitThe unit of the electric charge value (must be convertible to mol)

◆ elementAmount()

auto elementAmount ( const StringOrIndex element,
real  value,
String  unit = "mol" 
) -> void

Specify the amount of an element at chemical equilibrium.

Parameters
elementThe name or index of the element in the system
valueThe amount of an element in the system
unitThe unit of the element amount value (must be convertible to mol)

◆ elementAmountInPhase()

auto elementAmountInPhase ( const StringOrIndex element,
const StringOrIndex phase,
real  value,
String  unit = "mol" 
) -> void

Specify the amount of an element in a phase at chemical equilibrium.

Parameters
elementThe name or index of the element in the system
phaseThe name or index of the phase in the system
valueThe amount of an element in a phase
unitThe unit of the element amount value (must be convertible to mol)

◆ elementMass()

auto elementMass ( const StringOrIndex element,
real  value,
String  unit = "kg" 
) -> void

Specify the mass of an element at chemical equilibrium.

Parameters
elementThe name or index of the element in the system
valueThe mass of an element in the system
unitThe unit of the element mass value (must be convertible to kg)

◆ elementMassInPhase()

auto elementMassInPhase ( const StringOrIndex element,
const StringOrIndex phase,
real  value,
String  unit = "kg" 
) -> void

Specify the mass of an element in a phase at chemical equilibrium.

Parameters
elementThe name or index of the element in the system
phaseThe name or index of the phase in the system
valueThe mass of an element in a phase
unitThe unit of the element mass value (must be convertible to kg)

◆ phaseAmount()

auto phaseAmount ( const StringOrIndex phase,
real  value,
String  unit = "mol" 
) -> void

Specify the amount of a phase at chemical equilibrium.

Parameters
phaseThe name or index of the phase in the system
valueThe amount of a phase in the system
unitThe unit of the phase amount value (must be convertible to mol)

◆ phaseMass()

auto phaseMass ( const StringOrIndex phase,
real  value,
String  unit = "kg" 
) -> void

Specify the mass of a phase at chemical equilibrium.

Parameters
phaseThe name or index of the phase in the system
valueThe mass of a phase in the system
unitThe unit of the phase mass value (must be convertible to kg)

◆ phaseVolume()

auto phaseVolume ( const StringOrIndex phase,
real  value,
String  unit = "m3" 
) -> void

Specify the volume of a phase at chemical equilibrium.

Parameters
phaseThe name or index of the phase in the system
valueThe volume of a phase in the system
unitThe unit of the phase volume value (must be convertible to m3)

◆ chemicalPotential()

auto chemicalPotential ( String  substance,
real  value,
String  unit = "J/mol" 
) -> void

Specify the chemical potential of a substance at chemical equilibrium.

Parameters
substanceThe chemical formula of the substance.
valueThe constrained chemical potential value.
unitThe unit for the constrained chemical potential value (must be convertible to J/mol).
Warning
An error is thrown if the specifications for the chemical equilibrium calculation
do not consider a chemical potential constraint for the substance.

◆ lnActivity()

auto lnActivity ( String  species,
real  value 
) -> void

Specify the ln activity of a species at chemical equilibrium.

Parameters
speciesThe name of the chemical species.
valueThe constrained ln activity value.
Warning
An error is thrown if the specifications for the chemical equilibrium calculation
do not consider an activity constraint for the species.

◆ lgActivity()

auto lgActivity ( String  species,
real  value 
) -> void

Specify the lg activity of a species at chemical equilibrium.

Parameters
speciesThe name of the chemical species.
valueThe constrained lg activity value.
Warning
An error is thrown if the specifications for the chemical equilibrium calculation
do not consider an activity constraint for the species.

◆ activity()

auto activity ( String  species,
real  value 
) -> void

Specify the activity of a species at chemical equilibrium.

Parameters
speciesThe name of the chemical species.
valueThe constrained activity value.
Warning
An error is thrown if the specifications for the chemical equilibrium calculation
do not consider an activity constraint for the species.

◆ fugacity()

auto fugacity ( String  species,
real  value,
String  unit = "bar" 
) -> void

Specify the fugacity of a gaseous species at chemical equilibrium.

Parameters
speciesThe name of the gaseous species.
valueThe constrained fugacity value.
unitThe unit for the constrained fugacity value (must be convertible to Pa; default is bar).
Warning
An error is thrown if the specifications for the chemical equilibrium calculation
do not consider a fugacity constraint for the gas.

◆ pH()

auto pH ( real  value) -> void

Specify the pH at chemical equilibrium.

Parameters
valueThe constrained value for pH.
Warning
An error is thrown if the specifications for the chemical equilibrium calculation
do not consider a pH constraint.

◆ pMg()

auto pMg ( real  value) -> void

Specify the pMg at chemical equilibrium.

Parameters
valueThe constrained value for pMg.
Warning
An error is thrown if the specifications for the chemical equilibrium calculation
do not consider a pMg constraint.

◆ pE()

auto pE ( real  value) -> void

Specify the pE at chemical equilibrium.

Parameters
valueThe constrained value for pE.
Warning
An error is thrown if the specifications for the chemical equilibrium calculation
do not consider a pE constraint.

◆ Eh()

auto Eh ( real  value,
String  unit = "V" 
) -> void

Specify the Eh at chemical equilibrium.

Parameters
valueThe constrained value for Eh.
unitThe unit of the constrained value for Eh (must be convertible to V).
Warning
An error is thrown if the specifications for the chemical equilibrium calculation
do not consider an Eh constraint.

◆ set()

auto set ( const String input,
const real val 
) -> void

Set the input variable with name input to the value in val.

Warning
An error is thrown if there are no input variables with name input.

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