ChemicalState.hpp
326 auto elementAmountInPhase(std::string element, std::string phase, std::string units) const -> double;
337 auto elementAmountInSpecies(Index ielement, const Indices& ispecies, std::string units) const -> double;
auto properties() const -> ChemicalProperties
Return the chemical properties of the system.
Definition: ChemicalState.cpp:771
auto indices(const std::vector< std::string > &names, const NamedValues &values) -> Indices
Return the indices of some entries in a container.
Definition: SetUtils.hxx:59
auto index(const T &value, const std::vector< T > &values) -> Index
Find the index of a value in a container of values.
Definition: SetUtils.hxx:21
auto speciesDualPotentials() const -> VectorConstRef
Return the dual potentials of the species (in units of J/mol)
Definition: ChemicalState.cpp:671
auto amount(double value, Index nspecies, Index ispecies) -> ChemicalScalarBase< double, decltype(tr(unit(nspecies, ispecies)))>
Return a ChemicalScalar representation of a mole amount of a species.
Definition: ChemicalScalar.hpp:233
A class to represent a system and its attributes and properties.
Definition: ChemicalSystem.hpp:38
auto scaleFluidVolume(double volume) -> void
Scale the fluid volume of the chemical system.
Definition: ChemicalState.cpp:596
auto setSpeciesAmounts(double val) -> void
Set the molar amounts of the species with a single value (in units of mol)
Definition: ChemicalState.cpp:501
Provides a computational representation of the state of a multiphase chemical system.
Definition: ChemicalState.hpp:61
auto speciesAmount(Index index) const -> double
Return the molar mass of a chemical species (in units of mol)
Definition: ChemicalState.cpp:651
auto scaleVolume(double volume) -> void
Scale the volume of the chemical system by adjusting the molar amounts of all species equally.
Definition: ChemicalState.cpp:616
auto elementDualPotentials() const -> VectorConstRef
Return the dual potentials of the elements (in units of J/mol).
Definition: ChemicalState.cpp:741
auto setElementDualPotentials(VectorConstRef y) -> void
Set the dual potentials of the elements (in units of J/mol).
Definition: ChemicalState.cpp:561
auto operator=(ChemicalState other) -> ChemicalState &
Assign a ChemicalState instance to this instance.
Definition: ChemicalState.cpp:475
auto phaseStabilityIndices() const -> Vector
Return the stability indices of the phases with respect to chemical equilibrium.
Definition: ChemicalState.cpp:766
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto setSpeciesMass(Index index, double mass) -> void
Set the mass of a species (in units of kg)
Definition: ChemicalState.cpp:536
auto setSpeciesAmount(Index index, double amount) -> void
Set the molar amount of a species (in units of mol)
Definition: ChemicalState.cpp:516
auto elementAmountsInSpecies(const Indices &indices) const -> Vector
Return the molar amounts of the elements in a set of species (in units of mol)
Definition: ChemicalState.cpp:686
ChemicalState()=delete
Disable the default ChemicalState constructor.
auto speciesAmounts() const -> VectorConstRef
Return the molar amounts of the species (in units of mol)
Definition: ChemicalState.cpp:641
auto elementAmounts() const -> Vector
Return the molar amounts of the elements (in units of mol)
Definition: ChemicalState.cpp:676
A class for querying thermodynamic and chemical properties of a chemical system.
Definition: ChemicalProperties.hpp:33
auto setPressure(double val) -> void
Set the pressure of the chemical state (in units of Pa)
Definition: ChemicalState.cpp:491
auto setTemperature(double val) -> void
Set the temperature of the chemical state (in units of K)
Definition: ChemicalState.cpp:481
auto output(std::ostream &out, int precision=6) const -> void
Output the ChemicalState instance to a stream.
Definition: ChemicalState.cpp:776
auto scaleSpeciesAmounts(double scalar) -> void
Scale the molar amounts of the species by a given scalar.
Definition: ChemicalState.cpp:566
auto system() const -> const ChemicalSystem &
Return the chemical system instance.
Definition: ChemicalState.cpp:626
auto scaleSpeciesAmountsInPhase(Index index, double scalar) -> void
Scale the molar amounts of the species in a phase by a given scalar.
Definition: ChemicalState.cpp:571
std::vector< Index > Indices
Define a type that represents a collection of indices.
Definition: Index.hpp:29
auto temperature() const -> double
Return the temperature of the chemical state (in units of K)
Definition: ChemicalState.cpp:631
auto elementAmountInSpecies(Index ielement, const Indices &ispecies) const -> double
Return the molar amount of an element in a set of species (in units of mol).
Definition: ChemicalState.cpp:731
auto elementAmount(Index index) const -> double
Return the molar amount of an element (in units of mol)
Definition: ChemicalState.cpp:691
auto pressure() const -> double
Return the pressure of the chemical state (in units of Pa)
Definition: ChemicalState.cpp:636
auto scalePhaseVolume(Index index, double volume) -> void
Scale the volume of a phase by adjusting the molar amounts of its species.
Definition: ChemicalState.cpp:576
auto elementAmountsInPhase(Index index) const -> Vector
Return the molar amounts of the elements in a phase (in units of mol)
Definition: ChemicalState.cpp:681
auto scaleSolidVolume(double volume) -> void
Scale the solid volume of the chemical system.
Definition: ChemicalState.cpp:606
Eigen::Ref< const Eigen::VectorXd > VectorConstRef
< Alias to Eigen type Ref<VectorXd>.
Definition: Matrix.hpp:31
auto phaseAmount(Index index) const -> double
Return the molar amount of a phase (in units of mol).
Definition: ChemicalState.cpp:746
auto elementAmountInPhase(Index ielement, Index iphase) const -> double
Return the molar amount of an element in a given phase (in units of mol).
Definition: ChemicalState.cpp:711
auto setSpeciesDualPotentials(VectorConstRef z) -> void
Set the dual potentials of the species (in units of J/mol).
Definition: ChemicalState.cpp:556