21 #include <Reaktoro/Common/Matrix.hpp>
22 #include <Reaktoro/Common/Types.hpp>
23 #include <Reaktoro/Core/AggregateState.hpp>
26 #include <Reaktoro/Extensions/Phreeqc/PhreeqcLegacy.hpp>
38 namespace PhreeqcUtils {
44 auto load(PHREEQC& phreeqc,
String database) -> void;
51 auto execute(PHREEQC& phreeqc,
String input,
String output) -> void;
57 auto findElement(
const PHREEQC& phreeqc,
String name) -> PhreeqcElement*;
63 auto findSpecies(
const PHREEQC& phreeqc,
String name) -> PhreeqcSpecies*;
69 auto findPhase(
const PHREEQC& phreeqc,
String name) -> PhreeqcPhase*;
72 auto isAqueousSpecies(
const PhreeqcSpecies* species) -> bool;
75 auto isGaseousSpecies(
const PhreeqcPhase* phase) -> bool;
78 auto isMineralSpecies(
const PhreeqcPhase* phase) -> bool;
81 auto isExchangeSpecies(
const PhreeqcSpecies* species) -> bool;
84 auto isSurfaceSpecies(
const PhreeqcSpecies* species) -> bool;
88 auto symbol(
const PhreeqcElement* species) ->
String;
92 auto name(
const PhreeqcElement* species) ->
String;
96 auto molarMass(
const PhreeqcElement* species) -> double;
100 auto name(
const PhreeqcPhase* phase) ->
String;
104 auto name(
const PhreeqcSpecies* species) ->
String;
108 auto name(
const PhreeqcPhase* phase) ->
String;
112 auto formula(
const PhreeqcSpecies* species) ->
String;
116 auto formula(
const PhreeqcPhase* phase) ->
String;
120 auto elements(
const PhreeqcSpecies* species) -> Map<PhreeqcElement*, double>;
124 auto elements(
const PhreeqcPhase* phase) -> Map<PhreeqcElement*, double>;
128 auto charge(
const PhreeqcSpecies* species) -> double;
132 auto charge(
const PhreeqcPhase* phase) -> double;
136 auto aggregateState(
const PhreeqcSpecies* species) ->
AggregateState;
145 auto stoichiometry(
const PhreeqcSpecies* species,
String name) -> double;
150 auto stoichiometry(
const PhreeqcPhase* phase,
String name) -> double;
156 auto reactionEquation(
const PhreeqcSpecies* species) -> Pairs<String, double>;
161 auto reactionEquation(
const PhreeqcPhase* phase) -> Pairs<String, double>;
168 auto reactants(
const PhreeqcSpecies* species) -> Pairs<PhreeqcSpecies*, double>;
175 auto reactants(
const PhreeqcPhase* phase) -> Pairs<PhreeqcSpecies*, double>;
179 auto isMasterSpecies(
const PhreeqcSpecies* species) -> bool;
183 auto isMasterSpecies(
const PhreeqcPhase* phase) -> bool;
188 auto index(
String name,
const Vec<PhreeqcSpecies*>& species) -> std::size_t;
193 auto index(
String name,
const Vec<PhreeqcPhase*>& phases) -> std::size_t;
197 auto activeAqueousSpecies(
const PHREEQC& phreeqc) -> Vec<PhreeqcSpecies*>;
200 auto activeExchangeSpecies(
const PHREEQC& phreeqc) -> Vec<PhreeqcSpecies*>;
205 auto activeProductSpecies(
const PHREEQC& phreeqc) -> Vec<PhreeqcSpecies*>;
209 auto activeGaseousSpecies(
const PHREEQC& phreeqc) -> Vec<PhreeqcPhase*>;
213 auto activePhasesInEquilibriumPhases(
const PHREEQC& phreeqc) -> Vec<PhreeqcPhase*>;
217 auto activePhasesInSaturationList(
const PHREEQC& phreeqc) -> Vec<PhreeqcPhase*>;
222 auto speciesAmounts(
const PHREEQC& phreeqc,
const Vec<PhreeqcSpecies*>& species) ->
ArrayXd;
227 auto speciesAmounts(
const PHREEQC& phreeqc,
const Vec<PhreeqcPhase*>& phases) ->
ArrayXd;
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
AggregateState
The aggregate states of substances according to IUPAC.
Definition: AggregateState.hpp:32
std::string String
Convenient alias for std::string.
Definition: Types.hpp:52
auto index(const Container &c, const T &x) -> std::size_t
Return the index of item x in container c or the number of items if not found.
Definition: Algorithms.hpp:37
Eigen::ArrayXd ArrayXd
Convenient alias to Eigen type.
Definition: Matrix.hpp:103