Reaktoro  A unified framework for modeling chemically reactive systems
Reaktoro::MineralPhase Class Reference

## Detailed Description

Class that defines an mineral phase.

#include <MineralPhase.hpp>

Inheritance diagram for Reaktoro::MineralPhase:
Collaboration diagram for Reaktoro::MineralPhase:

## Public Member Functions

MineralPhase ()
Construct a default MineralPhase instance.

MineralPhase (const MineralMixture &mixture)
Construct a MineralPhase instance with given mineral mixture.

MineralPhase (const MineralSpecies &species)
Construct a MineralPhase instance with given species.

auto setChemicalModelIdeal () -> MineralPhase &
Set the chemical model of the phase with the ideal solution model.

auto setChemicalModelRedlichKister (double a0, double a1, double a2) -> MineralPhase &
Set the chemical model of the phase with the Redlich-Kister solid solution binary model. More...

auto mixture () const -> const MineralMixture &
Return the MineralMixture instance.

Public Member Functions inherited from Reaktoro::Phase
Phase ()
Construct a default Phase instance.

auto setName (std::string name) -> void
Set the name of the phase.

auto setType (PhaseType type) -> void
Set the type of the phase.

auto setSpecies (const std::vector< Species > &species) -> void
Set the species of the phase.

auto setThermoModel (const PhaseThermoModel &model) -> void
Set the function that calculates the standard thermodynamic properties of the phase.

auto setChemicalModel (const PhaseChemicalModel &model) -> void
Set the function that calculates the chemical properties of the phase.

auto numElements () const -> unsigned
Return the number of elements in the phase.

auto numSpecies () const -> unsigned
Return the number of species in the phase.

auto name () const -> std::string
Return the name of the phase.

auto type () const -> PhaseType
Return the type of the phase.

auto elements () const -> const std::vector< Element > &
Return the elements of the phase.

auto elements () -> std::vector< Element > &
Return the elements of the phase.

auto species () const -> const std::vector< Species > &
Return the species of the phase.

auto species () -> std::vector< Species > &
Return the species of the phase.

auto species (Index index) const -> const Species &
Return the species of the phase with a given index.

auto isFluid () const -> bool
Return true if the state of matter of the phase is fluid, i.e., liquid, gas, or plasma.

auto isSolid () const -> bool
Return true if the phase type is solid.

auto thermoModel () const -> const PhaseThermoModel &
Return the thermodynamic model function of the phase. More...

auto chemicalModel () const -> const PhaseChemicalModel &
Return the chemical model function of the phase. More...

auto indexSpecies (std::string name) const -> Index
Return the index of a species in the phase. More...

auto indexSpeciesWithError (std::string name) const -> Index
Return the index of a species in the system. More...

auto indexSpeciesAny (const std::vector< std::string > &names) const -> Index
Return the index of the first species in the phase with any of the given names. More...

auto indexSpeciesAnyWithError (const std::vector< std::string > &names) const -> Index
Return the index of the first species in the phase with any of the given names. More...

auto properties (double T, double P) const -> PhaseThermoProperties
Return the calculated standard thermodynamic properties of the species.

auto properties (double T, double P, const Vector &n) const -> PhaseChemicalProperties
Return the calculated chemical properties of the phase and its species.

## Member Function Documentation

 auto Reaktoro::MineralPhase::setChemicalModelRedlichKister ( double a0, double a1, double a2 ) -> MineralPhase&

Set the chemical model of the phase with the Redlich-Kister solid solution binary model.

The Redlich-Kister model calculates the activity coefficient of the end-members in a solid solution using the equations:

$\ln\gamma_{1}=x_{2}^{2}[a_{0}+a_{1}(3x_{1}-x_{2})+a_{2}(x_{1}-x_{2})(5x_{1}-x_{2})]$

and

$\ln\gamma_{2}=x_{1}^{2}[a_{0}-a_{1}(3x_{2}-x_{1})+a_{2}(x_{2}-x_{1})(5x_{2}-x_{1})]$

. The parameters $$a_0$$, $$a_1$$, and $$a_2$$ must be provided. Set them to zero if not needed.

Parameters
 a0 The Redlich-Kister parameter a0 a1 The Redlich-Kister parameter a1 a2 The Redlich-Kister parameter a2

The documentation for this class was generated from the following files:
• Reaktoro/Thermodynamics/Phases/MineralPhase.hpp
• Reaktoro/Thermodynamics/Phases/MineralPhase.cpp