World Builder  1.1.0-pre
A geodynamic initial conditions generator
tian2019_water_content.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2018 - 2024 by the authors of the World Builder code.
3 
4  This file is part of the World Builder.
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef WORLD_BUILDER_FEATURES_OCEANIC_PLATE_MODELS_COMPOSITION_WATER_CONTENT_H
21 #define WORLD_BUILDER_FEATURES_OCEANIC_PLATE_MODELS_COMPOSITION_WATER_CONTENT_H
22 
23 
27 
28 
29 namespace WorldBuilder
30 {
31  namespace Features
32  {
33  using namespace FeatureUtilities;
34  namespace OceanicPlateModels
35  {
36  namespace Composition
37  {
46  class TianWaterContent final: public Interface
47  {
48  public:
53 
57  ~TianWaterContent() override final;
58 
62  static
63  void declare_entries(Parameters &prm, const std::string &parent_name = "");
64 
68  void parse_entries(Parameters &prm, const std::vector<Point<2>> &coordinates) override final;
69 
75  double calculate_water_content(double pressure,
76  double temperature) const;
77 
82  double get_composition(const Point<3> &position,
83  const Objects::NaturalCoordinate &position_in_natural_coordinates,
84  const double depth,
85  const unsigned int composition_number,
86  double composition,
87  const double feature_min_depth,
88  const double feature_max_depth) const override final;
89 
90 
91  private:
92  // TianWaterContent composition submodule parameters
93  double min_depth;
95  double max_depth;
96  double density; // Density used to compute the lithostatic pressure
98  std::vector<unsigned int> compositions;
101 
103  {
107  sediment
108  };
110 
111  // Define the coefficients for the polynomials for 3 quantities: LR which represents the
112  // enthalpy change of the dehydration reactions, c_sat which represents the volatile saturation
113  // content, and Td which represents the onset temperature of dehydration. The first row is for
114  // 'peridotite', the second row is for 'gabbro', the third row is for 'MORB', and the fourth row
115  // is for 'sediment'.
116  std::vector<std::vector<double>> LR_poly =
117  {
118  {-19.0609, 168.983, -630.032, 1281.84, -1543.14, 1111.88, -459.142, 95.4143, 1.97246},
119  {-1.81745, 7.67198, -10.8507, 5.09329, 8.14519},
120  {-1.78177, 7.50871, -10.4840, 5.19725, 7.96365},
121  {-2.03283, 10.8186, -21.2119, 18.3351, -6.48711, 8.32459}
122  };
123 
124  std::vector<std::vector<double>> c_sat_poly =
125  {
126  {0.00115628, 2.42179},
127  {-0.0176673, 0.0893044, 1.52732},
128  {0.0102725, -0.115390, 0.324452, 1.41588},
129  {-0.150662, 0.301807, 1.01867}
130  };
131 
132  std::vector<std::vector<double>> Td_poly =
133  {
134  {-15.4627, 94.9716, 636.603},
135  {-1.72277, 20.5898, 637.517},
136  {-3.81280, 22.7809, 638.049},
137  {2.83277, -24.7593, 85.9090, 524.898}
138  };
139 
140  // Maximum pressure for the lithologies (Peridotite, Gabbro, MORB, Sediment). These are required because
141  // Above these pressures, the parameterized phase diagrams break down and the solubility goes to infinity.
143  };
144  } // namespace Composition
145  } // namespace OceanicPlateModels
146  } // namespace Features
147 } // namespace WorldBuilder
148 
149 #endif