https://mooseframework.inl.gov
GeochemicalSystemTest.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 
12 #include "gtest_include.h"
13 
14 #include "GeochemicalSystem.h"
15 
16 class GeochemicalSystemTest : public ::testing::Test
17 {
18 public:
20  : _db_calcite("database/moose_testdb.json", true, true, false),
22  _db_calcite, {"H2O", "H+", "HCO3-", "Ca++"}, {"Calcite"}, {}, {}, {}, {}, "O2(aq)", "e-"),
24  _db_calcite, {"H2O", "H+", "HCO3-", "Ca++"}, {}, {}, {"Calcite"}, {}, {}, "O2(aq)", "e-"),
27  _swapper3(3, 1e-6),
28  _swapper4(4, 1e-6),
29  _swapper5(5, 1e-6),
30  _swapper6(6, 1e-6),
31  _swapper7(7, 1e-6),
32  _swapper8(8, 1e-6),
41  _is3(3.0, 3.0, false, false),
43  _is0(0.0, 0.0, false, false),
45  _is8(1E-8, 1E-8, false, false),
48  _ac3,
49  _is3,
50  _swapper4,
51  {"Ca++"},
52  {"Calcite"},
53  "H+",
54  {"H2O", "Calcite", "H+", "HCO3-"},
55  {1.75, 3.0, 2.0, 1.0},
58  25,
59  0,
60  1E-20,
61  {},
62  {},
63  {}),
65  _ac3,
66  _is3,
67  _swapper4,
68  {},
69  {},
70  "H+",
71  {"H2O", "Ca++", "H+", "HCO3-"},
72  {1.75, 3.0, 2.0, 1.0},
75  25,
76  0,
77  1E-20,
78  {"Calcite"},
79  {1.1},
81  _cm_dummy({}),
82  _cu_dummy({}),
85  {"H2O", "H+", "HCO3-", "O2(aq)", "(O-phth)--", "CH4(aq)", "StoiCheckRedox", "Fe+++"},
86  {"Fe(OH)3(ppd)fake"},
87  {"CH4(g)fake", "O2(g)"},
88  {},
89  {},
90  {},
91  "O2(aq)",
92  "e-"),
110  _egs_redox(
111  _mgd_redox,
112  _ac3,
113  _is3,
114  _swapper8,
115  {},
116  {},
117  "Fe+++",
118  {"H2O", "H+", "HCO3-", "O2(aq)", "(O-phth)--", "CH4(aq)", "StoiCheckRedox", "Fe+++"},
119  {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0},
120  _cu_redox,
121  _cm_redox,
122  25,
123  0,
124  1E-20,
125  {},
126  {},
127  {})
128  {
129  }
130 
131 protected:
143  const std::vector<GeochemicalSystem::ConstraintUserMeaningEnum> _cm_calcite;
144  const std::vector<GeochemistryUnitConverter::GeochemistryUnit> _cu_calcite;
153  const std::vector<GeochemicalSystem::ConstraintUserMeaningEnum> _cm_dummy;
154  const std::vector<GeochemistryUnitConverter::GeochemistryUnit> _cu_dummy;
157  std::vector<GeochemicalSystem::ConstraintUserMeaningEnum> _cm_redox;
158  std::vector<GeochemistryUnitConverter::GeochemistryUnit> _cu_redox;
160 };
const std::vector< GeochemicalSystem::ConstraintUserMeaningEnum > _cm_calcite
GeochemistrySpeciesSwapper _swapper3
const PertinentGeochemicalSystem _model_redox
ModelGeochemicalDatabase _mgd_calcite
std::vector< GeochemicalSystem::ConstraintUserMeaningEnum > _cm_redox
ModelGeochemicalDatabase _mgd_kinetic_calcite
GeochemistrySpeciesSwapper _swapper7
const GeochemicalSystem _egs_redox
Class to swap basis species with equilibrium species.
GeochemistryIonicStrength _is0
Computes activity coefficients for non-minerals and non-gases (since these species do not have activi...
const ModelGeochemicalDatabase & modelGeochemicalDatabase() const
Return a reference to the ModelGeochemicalDatabase structure.
const PertinentGeochemicalSystem _model_calcite
Constructs and stores a minimal amount of information that is pertinent to the user-defined geochemic...
Calculators to compute ionic strength and stoichiometric ionic strength.
const GeochemicalSystem _egs_calcite
GeochemistrySpeciesSwapper _swapper8
const std::vector< GeochemicalSystem::ConstraintUserMeaningEnum > _cm_dummy
GeochemistryActivityCoefficientsDebyeHuckel _ac0
const PertinentGeochemicalSystem _model_kinetic_calcite
GeochemistryActivityCoefficientsDebyeHuckel _ac3
GeochemistrySpeciesSwapper _swapper4
This class holds information about bulk composition, molalities, activities, activity coefficients...
ModelGeochemicalDatabase _mgd_redox
const std::vector< GeochemistryUnitConverter::GeochemistryUnit > _cu_calcite
std::vector< GeochemistryUnitConverter::GeochemistryUnit > _cu_redox
Data structure to hold all relevant information from the database file.
const GeochemicalDatabaseReader _db_calcite
GeochemistryIonicStrength _is8
GeochemistryIonicStrength _is3
GeochemistryActivityCoefficientsDebyeHuckel _ac8
const std::vector< GeochemistryUnitConverter::GeochemistryUnit > _cu_dummy
GeochemistrySpeciesSwapper _swapper5
Class for reading geochemical reactions from a MOOSE geochemical database.
const GeochemicalSystem _egs_kinetic_calcite
GeochemistrySpeciesSwapper _swapper6