https://mooseframework.inl.gov
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 {
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 {
60 public:
69 
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 
85  const DebyeHuckelParameters & getDebyeHuckel() const;
86 
88  Real getIonicStrength() const;
89 
92 
93 private:
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 GeochemistryNeutralSpeciesActivity _database_dh_neutral
Debye-Huckel parameters found in the database for computing the neutral (CO2) activities.
const GeochemistryNeutralSpeciesActivity _database_dh_water
Debye-Huckel parameters found in the database for computing the water activities. ...
GeochemistryActivityCoefficientsDebyeHuckel(const GeochemistryIonicStrength &is_calculator, const GeochemicalDatabaseReader &db)
const unsigned _numT
number of temperature points in the database file
Real _stoichiometric_ionic_strength
current value of stoichiometric ionic strength
Real getIonicStrength() const
Return the current value of ionic strength.
const ModelGeochemicalDatabase mgd
EquilibriumConstantInterpolator _interp_c_water
Interpolator object for the Debye-Huckel parameter c_water.
Fit the equilibrium constant values read from the thermodynamic databse at specified temperature valu...
EquilibriumConstantInterpolator _interp_d_neutral
Interpolator object for the Debye-Huckel parameter d_neutral.
const GeochemistryIonicStrength & _is_calculator
ionic-strength calculator
Real getStoichiometricIonicStrength() const
Return the current value of stoichiometric ionic strength.
bool operator==(const DebyeHuckelParameters &rhs) const
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: ...
static const std::string temperature
Definition: NS.h:59
Real waterActivity() const override
Computes and returns the activity of water.
Data structure for Debye-Huckel activity coefficients.
EquilibriumConstantInterpolator _interp_a_water
Interpolator object for the Debye-Huckel parameter a_water.
const GeochemicalDatabaseReader db("database/moose_testdb.json", true, true, false)
EquilibriumConstantInterpolator _interp_B
Interpolator object for the Debye-Huckel parameter B.
EquilibriumConstantInterpolator _interp_Bdot
Interpolator object for the Debye-Huckel parameter Bdot.
Computes activity coefficients for non-minerals and non-gases (since these species do not have activi...
EquilibriumConstantInterpolator _interp_b_water
Interpolator object for the Debye-Huckel parameter b_water.
Data structure for neutral species activity coefficients.
EquilibriumConstantInterpolator _interp_b_neutral
Interpolator object for the Debye-Huckel parameter b_neutral.
Calculators to compute ionic strength and stoichiometric ionic strength.
Base class to compute activity coefficients for non-minerals and non-gases (since these species do no...
const GeochemistryDebyeHuckel _database_dh_params
Debye-Huckel parameters found in the database.
EquilibriumConstantInterpolator _interp_c_neutral
Interpolator object for the Debye-Huckel parameter c_neutral.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
EquilibriumConstantInterpolator _interp_d_water
Interpolator object for the Debye-Huckel parameter d_water.
Data structure to hold all relevant information from the database file.
EquilibriumConstantInterpolator _interp_A
Interpolator object for the Debye-Huckel parameter A.
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 ...
Class for reading geochemical reactions from a MOOSE geochemical database.
EquilibriumConstantInterpolator _interp_a_neutral
Interpolator object for the Debye-Huckel parameter a_neutral.