-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestGeochemicalMixedReactions.cpp
More file actions
67 lines (55 loc) · 1.82 KB
/
testGeochemicalMixedReactions.cpp
File metadata and controls
67 lines (55 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* ------------------------------------------------------------------------------------------------------------
* SPDX-License-Identifier: (BSD-3-Clause)
*
* Copyright (c) 2025- Lawrence Livermore National Security LLC
* All rights reserved
*
* See top level LICENSE files for details.
* ------------------------------------------------------------------------------------------------------------
*/
#include "reactions/unitTestUtilities/mixedReactionsTestUtilities.hpp"
#include "../GeochemicalSystems.hpp"
using namespace hpcReact;
using namespace hpcReact::unitTest_utilities;
TEST( testMixedReactions, testTimeStep_carbonateSystem )
{
using namespace hpcReact::geochemistry;
static constexpr int numPrimarySpecies = carbonateSystemType::numPrimarySpecies();
double const surfaceArea[carbonateSystemType::numKineticReactions()] =
{
1.0, // CaCO3
};
double const initialAggregateSpeciesConcentration[numPrimarySpecies] =
{
3.76e-1, // H+
3.76e-1, // HCO3-
3.87e-2, // Ca+2
3.21e-2, // SO4-2
1.89, // Cl-
1.65e-2, // Mg+2
1.09 // Na+1
};
double const expectedSpeciesConcentrations[numPrimarySpecies] =
{
0.00040311656239679382, // H+
0.00041180885982392148, // HCO3-
0.0032499045666604504, // Ca+2
0.0036920967945592146, // SO4-2
1.8542541730074311, // Cl-
0.010162194793470079, // Mg+2
1.070434904554991 // Na+1
};
timeStepTest< double >( carbonateSystem,
1.0,
10,
initialAggregateSpeciesConcentration,
surfaceArea,
expectedSpeciesConcentrations );
}
int main( int argc, char * * argv )
{
::testing::InitGoogleTest( &argc, argv );
int const result = RUN_ALL_TESTS();
return result;
}