26 #include <Reaktoro/Math/Matrix.hpp>
27 #include <Reaktoro/Common/ScalarTypes.hpp>
30 #include <Reaktoro/Interfaces/PhreeqcLegacy.hpp>
34 namespace PhreeqcUtils {
39 auto load(PHREEQC& phreeqc, std::string
database) -> void;
45 auto execute(PHREEQC& phreeqc, std::string input, std::string output) -> void;
51 auto findElement(
const PHREEQC& phreeqc, std::string name) -> PhreeqcElement*;
57 auto findSpecies(
const PHREEQC& phreeqc, std::string name) -> PhreeqcSpecies*;
63 auto findPhase(
const PHREEQC& phreeqc, std::string name) -> PhreeqcPhase*;
67 auto elements(
const PhreeqcSpecies* species) -> std::map<PhreeqcElement*, double>;
71 auto elements(
const PhreeqcPhase* phase) -> std::map<PhreeqcElement*, double>;
77 auto stoichiometry(std::string element,
const PhreeqcSpecies* species) -> double;
83 auto stoichiometry(std::string element,
const PhreeqcPhase* phase) -> double;
86 auto name(
const PhreeqcElement* element) -> std::string;
89 auto name(
const PhreeqcSpecies* species) -> std::string;
92 auto name(
const PhreeqcPhase* phase) -> std::string;
99 auto reactionEquation(
const PhreeqcSpecies* species) -> std::map<std::string, double>;
105 auto reactionEquation(
const PhreeqcPhase* phase) -> std::map<std::string, double>;
108 auto isAqueousSpecies(
const PhreeqcSpecies* species) -> bool;
111 auto isExchangeSpecies(
const PhreeqcSpecies* species) -> bool;
114 auto isGaseousSpecies(
const PhreeqcPhase* phase) -> bool;
117 auto isMineralSpecies(
const PhreeqcPhase* phase) -> bool;
122 auto index(std::string name,
const std::vector<PhreeqcSpecies*>& species) -> unsigned;
127 auto index(std::string name,
const std::vector<PhreeqcPhase*>& phases) -> unsigned;
131 auto activeAqueousSpecies(
const PHREEQC& phreeqc) -> std::vector<PhreeqcSpecies*>;
134 auto activeExchangeSpecies(
const PHREEQC& phreeqc) -> std::vector<PhreeqcSpecies*>;
139 auto activeProductSpecies(
const PHREEQC& phreeqc) -> std::vector<PhreeqcSpecies*>;
143 auto activeGaseousSpecies(
const PHREEQC& phreeqc) -> std::vector<PhreeqcPhase*>;
147 auto activePhasesInEquilibriumPhases(
const PHREEQC& phreeqc) -> std::vector<PhreeqcPhase*>;
151 auto activePhasesInSaturationList(
const PHREEQC& phreeqc) -> std::vector<PhreeqcPhase*>;
156 auto speciesAmounts(
const PHREEQC& phreeqc,
const std::vector<PhreeqcSpecies*>& species) -> Vector;
161 auto speciesAmounts(
const PHREEQC& phreeqc,
const std::vector<PhreeqcPhase*>& phases) -> Vector;
167 auto lnEquilibriumConstant(
const PhreeqcSpecies* species,
double T,
double P) ->
ThermoScalar;
173 auto lnEquilibriumConstant(
const PhreeqcPhase* phase,
double T,
double P) ->
ThermoScalar;