https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GeochemistryActivityCalculatorsTest.C
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#include "gtest/gtest.h"
11
13
14const Real A = 0.4913;
15const Real B = 0.3247;
16const Real Bdot = 0.0174;
17const Real a = 0.1224;
18const Real b = -0.004679;
19const Real c = 0.0004114;
20const Real d = 0.0;
21const Real atilde = 1.5551;
22const Real btilde = 0.036478;
23const Real ctilde = 0.0064366;
24const Real dtilde = -0.0007132;
25
26TEST(GeochemistryActivityCalculatorsTest, log10ActCoeffDHBdot)
27{
28 const Real charge = 2.0;
29 const Real ionic_rad = 1.5;
30 const Real ionic_str = 0.2;
31 const Real log10gold = -0.718192735532499;
33 charge, ionic_rad, std::sqrt(ionic_str), A, B, Bdot),
34 log10gold,
35 1E-9);
36 ASSERT_EQ(
38 0.0);
39 ASSERT_EQ(
41 0.0);
42}
43
44TEST(GeochemistryActivityCalculatorsTest, log10ActCoeffDavies)
45{
46 const Real charge = 2.0;
47 const Real ionic_str = 0.2;
48 const Real log10gold = -0.489368197345647;
49 ASSERT_NEAR(GeochemistryActivityCalculators::log10ActCoeffDavies(charge, std::sqrt(ionic_str), A),
50 log10gold,
51 1E-9);
52 ASSERT_EQ(GeochemistryActivityCalculators::log10ActCoeffDavies(charge, 0.0, A), 0.0);
53 ASSERT_EQ(GeochemistryActivityCalculators::log10ActCoeffDavies(charge, -1.0, A), 0.0);
54}
55
56TEST(GeochemistryActivityCalculatorsTest, log10ActCoeffDHBdotAlternative)
57{
58 const Real ionic_str = 0.2;
59 const Real log10gold = 0.00348;
61 log10gold,
62 1E-9);
65}
66
67TEST(GeochemistryActivityCalculatorsTest, log10ActCoeffDHBdotNeutral)
68{
69 const Real ionic_str = 0.2;
70 const Real log10gold = 0.0242961312;
72 log10gold,
73 1E-9);
76}
77
78TEST(GeochemistryActivityCalculatorsTest, lnActivityDHBdotWater)
79{
80 const Real ionic_str = 0.2;
81 const Real loggold = -0.0066955098152888023;
83 ionic_str, A, atilde, btilde, ctilde, dtilde),
84 loggold,
85 1E-9);
87 0.0, A, atilde, btilde, ctilde, dtilde),
88 0.0);
90 -1.0, A, atilde, btilde, ctilde, dtilde),
91 0.0);
92}
TEST(GeochemistryActivityCalculatorsTest, log10ActCoeffDHBdot)
Real log10ActCoeffDHBdot(Real charge, Real ion_size, Real sqrt_ionic_strength, Real A, Real B, Real Bdot)
log10(activity coefficient) according to the Debye-Huckel B-dot model
Real log10ActCoeffDHBdotAlternative(Real ionic_strength, Real Bdot)
log10(activity coefficient) alternative expression that is sometimes used in conjunction with the Deb...
Real log10ActCoeffDavies(Real charge, Real sqrt_ionic_strength, Real A)
log10(activity coefficient) according to the Davies model
Real log10ActCoeffDHBdotNeutral(Real ionic_strength, Real a, Real b, Real c, Real d)
log10(activity coefficient) for neutral species according to the Debye-Huckel B-dot model
Real lnActivityDHBdotWater(Real stoichiometric_ionic_strength, Real A, Real atilde, Real btilde, Real ctilde, Real dtilde)
ln(activity of water) according to the Debye-Huckel B-dot model