Material.hpp
173 auto equilibrate(const EquilibriumRestrictions& restrictions, const EquilibriumOptions& options) -> ChemicalState;
179 auto equilibrate(double T, Chars unitT, double P, Chars unitP, const EquilibriumOptions& options) -> ChemicalState;
182 auto equilibrate(double T, Chars unitT, double P, Chars unitP, const EquilibriumRestrictions& restrictions) -> ChemicalState;
185 auto equilibrate(double T, Chars unitT, double P, Chars unitP, const EquilibriumRestrictions& restrictions, const EquilibriumOptions& options) -> ChemicalState;
A type used to represent the chemical formula of a chemical species.
Definition: ChemicalFormula.hpp:27
The class used to represent a chemical system and its attributes and properties.
Definition: ChemicalSystem.hpp:70
The class used to define reactivity restrictions in a chemical equilibrium calculation.
Definition: EquilibriumRestrictions.hpp:28
A type used to represent a material composed of one or more substances.
Definition: Material.hpp:34
auto addMaterialAmount(Material const &material, double amount) -> void
Add a given amount of another material in this material.
auto molarMass() const -> double
Return the molar mass of the material as the ratio of its mass and amount (in kg/mol).
auto addSpeciesAmount(StringOrIndex const &species, double amount, Chars unit) -> void
Add a given amount of an existing species in the chemical system to the material.
auto addSubstanceMass(ChemicalFormula const &substance, double mass, Chars unit) -> void
Add a given mass of a substance to the material.
auto scaleAmount(double value, Chars unit) -> void
Scale the amount of the material to a desired value.
auto addMaterialAmount(Material const &material, double amount, Chars unit) -> void
Add a given amount of another material in this material.
auto mass() const -> double
Return the mass of the material as the sum of its substance masses (in kg).
auto amount() const -> double
Return the amount of the material as the sum of its substance amounts (in mol).
auto species() const -> const Pairs< Index, double > &
Return the chemical species (as indices) and their amounts in this material.
auto result() const -> const EquilibriumResult &
Return the result of the chemical equilibrium calculation performed by equilibrate.
auto addSubstanceAmount(ChemicalFormula const &substance, double amount, Chars unit) -> void
Add a given amount of a substance to the material.
auto elementAmounts() const -> ArrayXd
Return the accumulated amounts of elements in the material.
auto add(String const &substance, double value, Chars unit) -> void
Add a given amount or mass of a substance or existing species to the material.
auto addMaterialMass(Material const &material, double mass, Chars unit) -> void
Add a given mass of another material in this material.
auto scaleMass(double value, Chars unit) -> void
Scale the mass of the material to a desired value.
auto addSpeciesAmount(StringOrIndex const &species, double amount) -> void
Add a given amount of an existing species in the chemical system to the material.
auto substances() const -> const Pairs< ChemicalFormula, double > &
Return the substances and their amounts in this material.
auto charge() const -> double
Return the accumulated electric charge in the material.
auto initialState(double T, double P) const -> ChemicalState
Return the initial chemical state that is used in the chemical equilibrium calculation performed by e...
auto add(Material const &material, double value, Chars unit) -> void
Add a given amount or mass of another material in this material.
auto with(double value, Chars unit) const -> Material
Return a copy of this material with scaled amount or mass.
auto componentAmounts() const -> ArrayXd
Return the accumulated amounts of elements and electric charge in the material.
auto addSpeciesMass(StringOrIndex const &species, double mass, Chars unit) -> void
Add a given mass of an existing species in the chemical system to the material.
auto scale(double value, Chars unit) -> void
Scale the amount or mass of the material to a desired value.
auto equilibrate() -> ChemicalState
Perform a chemical equilibrium calculation on this material at 25 °C and 1 bar.
auto system() const -> const ChemicalSystem &
Return the underlying chemical system in this material.
auto addSubstanceAmount(ChemicalFormula const &substance, double amount) -> void
Add a given amount of a substance to the material.
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
Vec< Pair< T, U > > Pairs
Convenient alias for std::vector<std::pair<T, U>>.
Definition: Types.hpp:90
auto unit(Index rows, Index i) -> decltype(VectorXd::Unit(rows, i))
Return an expression of a unit vector.
Definition: Matrix.hpp:546
std::variant< Index, int, std::string > StringOrIndex
The type used to accept either a name or an index.
Definition: Types.hpp:58
The options for the equilibrium calculations.
Definition: EquilibriumOptions.hpp:43
A type used to describe the result of an equilibrium calculation.
Definition: EquilibriumResult.hpp:28