https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GeochemistryActivityCoefficientsDebyeHuckel.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
15
17{
18 Real A;
19 Real B;
20 Real Bdot;
21 Real a_water;
22 Real b_water;
23 Real c_water;
24 Real d_water;
29
31 : A(0.5092),
32 B(0.3283),
33 Bdot(0.035),
34 a_water(1.45397),
35 b_water(0.022357),
36 c_water(0.0093804),
37 d_water(-0.0005262),
38 a_neutral(0.1127),
39 b_neutral(-0.01049),
40 c_neutral(0.001545),
41 d_neutral(0.0)
42 {
43 }
44
45 bool operator==(const DebyeHuckelParameters & rhs) const
46 {
47 return (A == rhs.A) && (B == rhs.B) && (Bdot == rhs.Bdot) && (a_water == rhs.a_water) &&
48 (b_water == rhs.b_water) && (c_water == rhs.c_water) && (d_water == rhs.d_water) &&
49 (a_neutral == rhs.a_neutral) && (b_neutral == rhs.b_neutral) &&
50 (c_neutral == rhs.c_neutral) && (d_neutral == rhs.d_neutral);
51 };
52};
53
59{
60public:
69
70 void setInternalParameters(Real temperature,
72 const std::vector<Real> & basis_species_molality,
73 const std::vector<Real> & eqm_species_molality,
74 const std::vector<Real> & kin_species_molality) override;
75
76 Real waterActivity() const override;
77
79 std::vector<Real> & basis_activity_coef,
80 std::vector<Real> & eqm_activity_coef) const override;
81
86
88 Real getIonicStrength() const;
89
92
93private:
95 const unsigned _numT;
96
99
102
105
108
111
114
117
119 unsigned _num_basis;
120
122 unsigned _num_eqm;
123
126
129
132
135
138
141
144
147
150
153
156
159};
const ModelGeochemicalDatabase mgd
const GeochemicalDatabaseReader db("database/moose_testdb.json", true, true, false)
Fit the equilibrium constant values read from the thermodynamic databse at specified temperature valu...
Class for reading geochemical reactions from a MOOSE geochemical database.
Computes activity coefficients for non-minerals and non-gases (since these species do not have activi...
EquilibriumConstantInterpolator _interp_b_neutral
Interpolator object for the Debye-Huckel parameter b_neutral.
const GeochemistryNeutralSpeciesActivity _database_dh_water
Debye-Huckel parameters found in the database for computing the water activities.
const GeochemistryIonicStrength & _is_calculator
ionic-strength calculator
EquilibriumConstantInterpolator _interp_d_water
Interpolator object for the Debye-Huckel parameter d_water.
EquilibriumConstantInterpolator _interp_Bdot
Interpolator object for the Debye-Huckel parameter Bdot.
EquilibriumConstantInterpolator _interp_a_neutral
Interpolator object for the Debye-Huckel parameter a_neutral.
EquilibriumConstantInterpolator _interp_b_water
Interpolator object for the Debye-Huckel parameter b_water.
EquilibriumConstantInterpolator _interp_c_neutral
Interpolator object for the Debye-Huckel parameter c_neutral.
EquilibriumConstantInterpolator _interp_d_neutral
Interpolator object for the Debye-Huckel parameter d_neutral.
const unsigned _numT
number of temperature points in the database file
const GeochemistryNeutralSpeciesActivity _database_dh_neutral
Debye-Huckel parameters found in the database for computing the neutral (CO2) activities.
Real getStoichiometricIonicStrength() const
Return the current value of stoichiometric ionic strength.
EquilibriumConstantInterpolator _interp_B
Interpolator object for the Debye-Huckel parameter B.
void setInternalParameters(Real temperature, const ModelGeochemicalDatabase &mgd, const std::vector< Real > &basis_species_molality, const std::vector< Real > &eqm_species_molality, const std::vector< Real > &kin_species_molality) override
Sets internal parameters, such as the ionic strength and Debye-Huckel parameters, prior to computing ...
const GeochemistryDebyeHuckel _database_dh_params
Debye-Huckel parameters found in the database.
Real _stoichiometric_ionic_strength
current value of stoichiometric ionic strength
EquilibriumConstantInterpolator _interp_A
Interpolator object for the Debye-Huckel parameter A.
void buildActivityCoefficients(const ModelGeochemicalDatabase &mgd, std::vector< Real > &basis_activity_coef, std::vector< Real > &eqm_activity_coef) const override
Compute the activity coefficients and store them in basis_activity_coef and eqm_activity_coef Note:
EquilibriumConstantInterpolator _interp_c_water
Interpolator object for the Debye-Huckel parameter c_water.
Real getIonicStrength() const
Return the current value of ionic strength.
Real waterActivity() const override
Computes and returns the activity of water.
EquilibriumConstantInterpolator _interp_a_water
Interpolator object for the Debye-Huckel parameter a_water.
Base class to compute activity coefficients for non-minerals and non-gases (since these species do no...
Calculators to compute ionic strength and stoichiometric ionic strength.
bool operator==(const DebyeHuckelParameters &rhs) const
Data structure for Debye-Huckel activity coefficients.
Data structure for neutral species activity coefficients.
Data structure to hold all relevant information from the database file.