ASPECT
melt_boukare.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2015 - 2023 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT 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 General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file LICENSE. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef _aspect_material_model_melt_boukare_h
22 #define _aspect_material_model_melt_boukare_h
23 
26 #include <aspect/melt.h>
27 
28 namespace aspect
29 {
30  namespace MaterialModel
31  {
32  using namespace dealii;
33 
37  template <int dim>
39  {
40  public:
41  BoukareOutputs(const unsigned int n_points);
42 
43  std::vector<double> get_nth_output(const unsigned int idx) const override;
44 
48  std::vector<double> bulk_composition;
49  std::vector<double> molar_volatiles_in_melt;
50  };
51 
67  template <int dim>
70  public ::aspect::SimulatorAccess<dim>
71  {
72  public:
76  void
77  initialize () override;
78 
83  bool is_compressible () const override;
84 
85  void evaluate(const typename Interface<dim>::MaterialModelInputs &in,
86  typename Interface<dim>::MaterialModelOutputs &out) const override;
87 
96  void melt_fractions (const MaterialModel::MaterialModelInputs<dim> &in,
97  std::vector<double> &melt_fractions) const override;
98 
103  double reference_darcy_coefficient () const override;
104 
116  static
117  void
118  declare_parameters (ParameterHandler &prm);
119 
123  void
124  parse_parameters (ParameterHandler &prm) override;
125 
130  void
131  create_additional_named_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const override;
132 
133 
134  private:
135  // Thermodynamic parameters of the endmember components in the equation of state,
136  // needed to compute their material properties.
137  std::vector<std::string> endmember_names;
138  std::vector<double> molar_masses;
139  std::vector<double> number_of_atoms;
140  std::vector<double> reference_volumes;
141  std::vector<double> reference_thermal_expansivities;
142  std::vector<double> reference_bulk_moduli;
145  std::vector<double> Einstein_temperatures;
146  std::vector<double> reference_enthalpies;
147  std::vector<double> reference_entropies;
148  std::vector<double> reference_specific_heats;
151  std::vector<double> specific_heat_third_coefficients;
152 
153  std::vector<double> tait_parameters_a;
154  std::vector<double> tait_parameters_b;
155  std::vector<double> tait_parameters_c;
156 
157  // Reference conditions for computing the material properties in the equation of state.
160 
161  // Rheological properties.
162  double eta_0;
163  double xi_0;
164  double eta_f;
167  double alpha_phi;
168 
169  // Transport properties that are not computed from the equation of state.
172 
173  // Parameters controlling melting and solidification of melt.
176 
177  // Parameters defining the molar composition of the two endmember compositions we use
178  // in the melting model.
179  const double molar_MgO_in_Mg_mantle_endmember = 0.581;
180  const double molar_SiO2_in_Mg_mantle_endmember = 0.419;
181  const double molar_FeO_in_Fe_mantle_endmember = 0.908;
182  const double molar_SiO2_in_Fe_mantle_endmember = 0.092;
183 
184  // Parameters describing the melting properties of the two endmembers of the melting model.
185  const double melting_reference_pressure = 120.e9;
186 
187  // reference melting temperature for Fe and Mg mantle endmember at the reference pressure
190 
191  // molar entropy change of melting in J/mol K
192  const double Fe_mantle_melting_entropy = 33.77;
193  const double Mg_mantle_melting_entropy = 34.33;
194 
195  // molar volume change of melting of solid Fe and Mg mantle endmember in m3/mol
196  const double Fe_mantle_melting_volume = 1.51e-07;
197  const double Mg_mantle_melting_volume = 9.29e-08;
198 
199  // Number of moles of atoms mixing on pseudosite in mantle lattice (empirical model fitting the full Boukare model).
202 
203  // Indices for the endmembers in the equation of state.
204  unsigned int febdg_idx;
205  unsigned int mgbdg_idx;
206  unsigned int wus_idx;
207  unsigned int per_idx;
208  unsigned int femelt_idx;
209  unsigned int mgmelt_idx;
210 
211 
212  // Parameter describing if an endmember in the equation of state is solid or molten.
214  {
215  enum Kind
216  {
218  melt
219  };
220  };
221 
222  std::vector<typename EndmemberState::Kind> endmember_states;
223 
224 
225  // Material properties of the different endmembers of the equation of state.
227  {
232  EndmemberProperties(const unsigned int n_endmembers);
233 
234  std::vector<double> volumes;
235  std::vector<double> gibbs_energies;
236  std::vector<double> entropies;
237  std::vector<double> thermal_expansivities;
238  std::vector<double> bulk_moduli;
239  std::vector<double> heat_capacities;
240  };
241 
242 
246  virtual
247  void
248  fill_endmember_properties (const typename Interface<dim>::MaterialModelInputs &in,
249  const unsigned int q,
250  EndmemberProperties &properties) const;
251 
252 
256  virtual
257  double
258  endmember_thermal_energy (const double temperature,
259  const unsigned int endmember_index) const;
260 
261 
265  virtual
266  double
267  endmember_molar_heat_capacity (const double temperature,
268  const unsigned int endmember_index) const;
269 
273  virtual
274  double
275  endmember_thermal_pressure (const double temperature,
276  const unsigned int endmember_index) const;
277 
282  virtual
283  double
284  endmember_enthalpy_thermal_addition (const double temperature,
285  const unsigned int endmember_index) const;
286 
291  virtual
292  double
293  endmember_entropy_thermal_addition (const double temperature,
294  const unsigned int endmember_index) const;
295 
296 
302  virtual
303  void
304  convert_composition_to_fraction_of_endmembers (const double temperature,
305  const double molar_Fe_in_solid,
306  const double molar_Fe_in_melt,
307  const std::vector<double> &endmember_gibbs_energies,
308  std::vector<double> &endmember_mole_fractions_per_phase,
309  double &molar_bridgmanite_in_solid) const;
310 
311 
317  virtual
318  double
319  compute_melt_molar_fraction (const double porosity,
320  const double bridgmanite_molar_fraction_in_solid,
321  EndmemberProperties &properties,
322  const std::vector<double> &endmember_mole_fractions_per_phase) const;
323 
324 
329  virtual
330  double
331  assert_update_is_within_0_and_1 (const double value,
332  const double change_of_value) const;
333 
334 
342  virtual
343  double
344  melt_fraction (const double temperature,
345  const double pressure,
346  const double bulk_composition,
347  double &molar_volatiles_in_melt,
348  double &solid_composition,
349  double &melt_composition) const;
350  };
351 
352  }
353 }
354 
355 #endif
std::vector< double > tait_parameters_b
Definition: melt_boukare.h:154
std::vector< double > number_of_atoms
Definition: melt_boukare.h:139
std::vector< double > bulk_modulus_second_pressure_derivatives
Definition: melt_boukare.h:144
std::vector< double > reference_volumes
Definition: melt_boukare.h:140
std::vector< std::string > endmember_names
Definition: melt_boukare.h:137
void declare_parameters(ParameterHandler &prm)
std::vector< double > tait_parameters_a
Definition: melt_boukare.h:153
std::vector< double > specific_heat_linear_coefficients
Definition: melt_boukare.h:149
std::vector< typename EndmemberState::Kind > endmember_states
Definition: melt_boukare.h:222
std::vector< double > bulk_composition
Definition: melt_boukare.h:48
std::vector< double > specific_heat_second_coefficients
Definition: melt_boukare.h:150
std::vector< double > reference_entropies
Definition: melt_boukare.h:147
std::vector< double > specific_heat_third_coefficients
Definition: melt_boukare.h:151
std::vector< double > bulk_modulus_pressure_derivatives
Definition: melt_boukare.h:143
std::vector< double > reference_bulk_moduli
Definition: melt_boukare.h:142
std::vector< double > molar_masses
Definition: melt_boukare.h:138
std::vector< double > reference_thermal_expansivities
Definition: melt_boukare.h:141
std::vector< double > Einstein_temperatures
Definition: melt_boukare.h:145
Definition: compat.h:42
std::vector< double > reference_specific_heats
Definition: melt_boukare.h:148
std::vector< double > tait_parameters_c
Definition: melt_boukare.h:155
std::vector< double > reference_enthalpies
Definition: melt_boukare.h:146
std::vector< double > molar_volatiles_in_melt
Definition: melt_boukare.h:49