|
| 1 | +/* |
| 2 | + * ------------------------------------------------------------------------------------------------------------ |
| 3 | + * SPDX-License-Identifier: (BSD-3-Clause) |
| 4 | + * |
| 5 | + * Copyright (c) 2025- Lawrence Livermore National Security LLC |
| 6 | + * All rights reserved |
| 7 | + * |
| 8 | + * See top level LICENSE files for details. |
| 9 | + * ------------------------------------------------------------------------------------------------------------ |
| 10 | + */ |
| 11 | + |
| 12 | +#pragma once |
| 13 | + |
| 14 | +#include "../reactionsSystems/Parameters.hpp" |
| 15 | + |
| 16 | +namespace hpcReact |
| 17 | +{ |
| 18 | + |
| 19 | +namespace geochemistry |
| 20 | +{ |
| 21 | +// turn off uncrustify to allow for better readability of the parameters |
| 22 | +// *****UNCRUSTIFY-OFF****** |
| 23 | + |
| 24 | +namespace momas |
| 25 | +{ |
| 26 | + |
| 27 | +constexpr CArrayWrapper<double, 7, 12> stoichMatrix = |
| 28 | + { |
| 29 | + // C1 C2 C3 C4 C5 CS1 CS2 | X1 X2 X3 X4 S |
| 30 | + { -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0 }, // C1 = -X2 |
| 31 | + { 0, -1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 }, // C2 = X2 + X3 |
| 32 | + { 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 1, 0 }, // C3 = X2 + X4 |
| 33 | + { 0, 0, 0, -1, 0, 0, 0, 0, -4, 1, 3, 0 }, // C4 = -4X2 + X3 + 3X4 |
| 34 | + { 0, 0, 0, 0, -1, 0, 0, 0, 4, 3, 1, 0 }, // C5 = 4X2 + 3X3 + X4 |
| 35 | + { 0, 0, 0, 0, 0, -1, 0, 0, 3, 1, 0, 1 }, // CS1 = 3X2 + X3 + S |
| 36 | + { 0, 0, 0, 0, 0, 0, -1, 0, -3, 0, 1, 2 } // CS2 = -3X2 + X4 + 2S |
| 37 | + }; |
| 38 | + |
| 39 | +constexpr CArrayWrapper<double, 7> equilibriumConstants = |
| 40 | + { |
| 41 | + 1.0e-12, // C1 = -X2 |
| 42 | + 1.0, // C2 = X2 + X3 |
| 43 | + 1.0, // C3 = X2 + X4 |
| 44 | + 0.1, // C4 = -4X2 + X3 + 3X4 |
| 45 | + 1.0e35, // C5 = 4X2 + 3X3 + X4 |
| 46 | + 1.0e6, // CS1 = 3X2 + X3 + S |
| 47 | + 1.0e-1 // CS2 = -3X2 + X4 + 2S |
| 48 | + }; |
| 49 | + |
| 50 | +constexpr CArrayWrapper<double, 7> forwardRates = |
| 51 | + { |
| 52 | + 0.0, // C1 = -X2 |
| 53 | + 0.0, // C2 = X2 + X3 |
| 54 | + 0.0, // C3 = X2 + X4 |
| 55 | + 0.0, // C4 = -4X2 + X3 + 3X4 |
| 56 | + 0.0, // C5 = 4X2 + 3X3 + X4 |
| 57 | + 0.0, // CS1 = 3X2 + X3 + S |
| 58 | + 0.0 // CS2 = -3X2 + X4 + 2S |
| 59 | + }; |
| 60 | + |
| 61 | +constexpr CArrayWrapper<double, 7> reverseRates = |
| 62 | + { |
| 63 | + 0.0, // C1 = -X2 |
| 64 | + 0.0, // C2 = X2 + X3 |
| 65 | + 0.0, // C3 = X2 + X4 |
| 66 | + 0.0, // C4 = -4X2 + X3 + 3X4 |
| 67 | + 0.0, // C5 = 4X2 + 3X3 + X4 |
| 68 | + 0.0, // CS1 = 3X2 + X3 + S |
| 69 | + 0.0 // CS2 = -3X2 + X4 + 2S |
| 70 | + }; |
| 71 | + |
| 72 | +constexpr CArrayWrapper<int, 7> mobileSpeciesFlag = |
| 73 | + { |
| 74 | + 1, // C1 = -X2 |
| 75 | + 1, // C2 = X2 + X3 |
| 76 | + 1, // C3 = X2 + X4 |
| 77 | + 1, // C4 = -4X2 + X3 + 3X4 |
| 78 | + 1, // C5 = 4X2 + 3X3 + X4 |
| 79 | + 0, // CS1 = 3X2 + X3 + S |
| 80 | + 0 // CS2 = -3X2 + X4 + 2S |
| 81 | + }; |
| 82 | + } |
| 83 | + using momasSystemAllKineticType = reactionsSystems::MixedReactionsParameters< double, int, int, 12, 7, 0 >; |
| 84 | + using momasSystemAllEquilibriumType = reactionsSystems::MixedReactionsParameters< double, int, int, 12, 7, 7 >; |
| 85 | + using momasSystemType = reactionsSystems::MixedReactionsParameters< double, int, int, 12, 7, 7 >; |
| 86 | + |
| 87 | + constexpr momasSystemAllKineticType momasSystemAllKinetic( momas::stoichMatrix, momas::equilibriumConstants, momas::forwardRates, momas::reverseRates, momas::mobileSpeciesFlag ); |
| 88 | + constexpr momasSystemAllEquilibriumType momasSystemAllEquilibrium( momas::stoichMatrix, momas::equilibriumConstants, momas::forwardRates, momas::reverseRates, momas::mobileSpeciesFlag ); |
| 89 | + constexpr momasSystemType carbonateSystem( momas::stoichMatrix, momas::equilibriumConstants, momas::forwardRates, momas::reverseRates, momas::mobileSpeciesFlag ); |
| 90 | + |
| 91 | +// *****UNCRUSTIFY-ON****** |
| 92 | +} // namespace geochemistry |
| 93 | +} // namespace hpcReact |
0 commit comments