GeneralMixture.hpp
173 auto GeneralMixture<SpeciesType>::indexSpeciesAny(const std::vector<std::string>& names) const -> Index
220 auto GeneralMixture<SpeciesType>::state(Temperature T, Pressure P, VectorConstRef n) const -> MixtureState
Provide a base of implementation for the mixture classes.
Definition: GeneralMixture.hpp:58
auto state(Temperature T, Pressure P, VectorConstRef n) const -> MixtureState
Calculate the state of the mixture.
Definition: GeneralMixture.hpp:220
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 names(const NamedValues &values) -> std::vector< std::string >
Return the names of the entries in a container.
Definition: Utils.hxx:22
auto name() const -> std::string
Return the name of the mixture.
Definition: GeneralMixture.hpp:149
ChemicalVector x
The mole fractions of the species in the mixture and their partial derivatives.
Definition: GeneralMixture.hpp:45
Temperature T
The temperature of the mixture (in units of K)
Definition: GeneralMixture.hpp:39
auto indexAny(const Names &names, const NamedValues &values) -> Index
Return the index of the first entry in a container of named values with any of the given names.
Definition: SetUtils.hxx:47
auto species() const -> const std::vector< SpeciesType > &
Return the species that compose the mixture.
Definition: GeneralMixture.hpp:155
GeneralMixture(const std::vector< SpeciesType > &species)
Construct a GeneralMixture instance with given species.
Definition: GeneralMixture.hpp:128
auto namesSpecies() const -> std::vector< std::string >
Return the names of the species in the mixture.
Definition: GeneralMixture.hpp:179
auto charge(const std::string &formula) -> double
Extract the electrical charge of a chemical formula.
Definition: ElementUtils.cpp:197
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto numSpecies() const -> unsigned
Return the number of species in the mixture.
Definition: GeneralMixture.hpp:143
A type that describes temperature in units of K.
Definition: ThermoScalar.hpp:177
N ddn
The matrix of partial mole derivatives of the chemical scalars.
Definition: ChemicalVector.hpp:63
auto moleFractions(Composition n) -> ChemicalVector
Return the mole fractions of the species.
Definition: Utils.hpp:45
A type used to describe the state of a mixture.
Definition: GeneralMixture.hpp:37
auto setName(std::string name) -> void
Set the name of the mixture.
Definition: GeneralMixture.hpp:137
auto moleFractions(VectorConstRef n) const -> ChemicalVector
Calculates the mole fractions of the species and their partial derivatives.
Definition: GeneralMixture.hpp:198
V val
The vector of chemical scalars.
Definition: ChemicalVector.hpp:54
Pressure P
The pressure of the mixture (in units of Pa)
Definition: GeneralMixture.hpp:42
auto charges(const ChargedValues &values) -> Vector
Return the electrical charges of all species in a list of species.
auto chargesSpecies() const -> Vector
Return the charges of the species in the mixture.
Definition: GeneralMixture.hpp:188
GeneralMixture()
Construct a default GeneralMixture instance.
Definition: GeneralMixture.hpp:124
Eigen::Ref< const Eigen::VectorXd > VectorConstRef
< Alias to Eigen type Ref<VectorXd>.
Definition: Matrix.hpp:31
auto indexSpeciesAny(const std::vector< std::string > &names) const -> Index
Return the index of the first species in the mixture with any of the given names.
Definition: GeneralMixture.hpp:173
auto indexSpecies(const std::string &name) const -> Index
Return the index of a species in the mixture.
Definition: GeneralMixture.hpp:167
virtual ~GeneralMixture()
Destroy the instance.
Definition: GeneralMixture.hpp:133