ASPECT
melt_boukare.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2015 - 2022 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  virtual std::vector<double> get_nth_output(const unsigned int idx) const;
44 
48  std::vector<double> bulk_composition;
49  std::vector<double> molar_volatiles_in_melt;
50  };
51 
67  template <int dim>
69  {
70  public:
74  virtual
75  void
76  initialize ();
77 
82  virtual bool is_compressible () const;
83 
84  virtual void evaluate(const typename Interface<dim>::MaterialModelInputs &in,
85  typename Interface<dim>::MaterialModelOutputs &out) const;
86 
95  virtual void melt_fractions (const MaterialModel::MaterialModelInputs<dim> &in,
96  std::vector<double> &melt_fractions) const;
97 
102  virtual double reference_darcy_coefficient () const;
103 
115  static
116  void
117  declare_parameters (ParameterHandler &prm);
118 
122  virtual
123  void
124  parse_parameters (ParameterHandler &prm);
125 
130  virtual
131  void
132  create_additional_named_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const;
133 
134 
135  private:
136  // Thermodynamic parameters of the endmember components in the equation of state,
137  // needed to compute their material properties.
138  std::vector<std::string> endmember_names;
139  std::vector<double> molar_masses;
140  std::vector<double> number_of_atoms;
141  std::vector<double> reference_volumes;
142  std::vector<double> reference_thermal_expansivities;
143  std::vector<double> reference_bulk_moduli;
146  std::vector<double> Einstein_temperatures;
147  std::vector<double> reference_enthalpies;
148  std::vector<double> reference_entropies;
149  std::vector<double> reference_specific_heats;
152  std::vector<double> specific_heat_third_coefficients;
153 
154  std::vector<double> tait_parameters_a;
155  std::vector<double> tait_parameters_b;
156  std::vector<double> tait_parameters_c;
157 
158  // Reference conditions for computing the material properties in the equation of state.
161 
162  // Rheological properties.
163  double eta_0;
164  double xi_0;
165  double eta_f;
168  double alpha_phi;
169 
170  // Transport properties that are not computed from the equation of state.
173 
174  // Parameters controlling melting and solidification of melt.
177 
178  // Parameters defining the molar composition of the two endmember compositions we use
179  // in the melting model.
180  const double molar_MgO_in_Mg_mantle_endmember = 0.581;
181  const double molar_SiO2_in_Mg_mantle_endmember = 0.419;
182  const double molar_FeO_in_Fe_mantle_endmember = 0.908;
183  const double molar_SiO2_in_Fe_mantle_endmember = 0.092;
184 
185  // Parameters describing the melting properties of the two endmembers of the melting model.
186  const double melting_reference_pressure = 120.e9;
187 
188  // reference melting temperature for Fe and Mg mantle endmember at the reference pressure
191 
192  // molar entropy change of melting in J/mol K
193  const double Fe_mantle_melting_entropy = 33.77;
194  const double Mg_mantle_melting_entropy = 34.33;
195 
196  // molar volume change of melting of solid Fe and Mg mantle endmember in m3/mol
197  const double Fe_mantle_melting_volume = 1.51e-07;
198  const double Mg_mantle_melting_volume = 9.29e-08;
199 
200  // Number of moles of atoms mixing on pseudosite in mantle lattice (empirical model fitting the full Boukare model).
203 
204  // Indices for the endmembers in the equation of state.
205  unsigned int febdg_idx;
206  unsigned int mgbdg_idx;
207  unsigned int wus_idx;
208  unsigned int per_idx;
209  unsigned int femelt_idx;
210  unsigned int mgmelt_idx;
211 
212 
213  // Parameter describing if an endmember in the equation of state is solid or molten.
215  {
216  enum Kind
217  {
219  melt
220  };
221  };
222 
223  std::vector<typename EndmemberState::Kind> endmember_states;
224 
225 
226  // Material properties of the different endmembers of the equation of state.
228  {
233  EndmemberProperties(const unsigned int n_endmembers);
234 
235  std::vector<double> volumes;
236  std::vector<double> gibbs_energies;
237  std::vector<double> entropies;
238  std::vector<double> thermal_expansivities;
239  std::vector<double> bulk_moduli;
240  std::vector<double> heat_capacities;
241  };
242 
243 
247  virtual
248  void
249  fill_endmember_properties (const typename Interface<dim>::MaterialModelInputs &in,
250  const unsigned int q,
251  EndmemberProperties &properties) const;
252 
253 
257  virtual
258  double
259  endmember_thermal_energy (const double temperature,
260  const unsigned int endmember_index) const;
261 
262 
266  virtual
267  double
268  endmember_molar_heat_capacity (const double temperature,
269  const unsigned int endmember_index) const;
270 
274  virtual
275  double
276  endmember_thermal_pressure (const double temperature,
277  const unsigned int endmember_index) const;
278 
283  virtual
284  double
285  endmember_enthalpy_thermal_addition (const double temperature,
286  const unsigned int endmember_index) const;
287 
292  virtual
293  double
294  endmember_entropy_thermal_addition (const double temperature,
295  const unsigned int endmember_index) const;
296 
297 
303  virtual
304  void
305  convert_composition_to_fraction_of_endmembers (const double temperature,
306  const double molar_Fe_in_solid,
307  const double molar_Fe_in_melt,
308  const std::vector<double> &endmember_gibbs_energies,
309  std::vector<double> &endmember_mole_fractions_per_phase,
310  double &molar_bridgmanite_in_solid) const;
311 
312 
318  virtual
319  double
320  compute_melt_molar_fraction (const double porosity,
321  const double bridgmanite_molar_fraction_in_solid,
322  EndmemberProperties &properties,
323  const std::vector<double> &endmember_mole_fractions_per_phase) const;
324 
325 
330  virtual
331  double
332  assert_update_is_within_0_and_1 (const double value,
333  const double change_of_value) const;
334 
335 
343  virtual
344  double
345  melt_fraction (const double temperature,
346  const double pressure,
347  const double bulk_composition,
348  double &molar_volatiles_in_melt,
349  double &solid_composition,
350  double &melt_composition) const;
351  };
352 
353  }
354 }
355 
356 #endif
std::vector< double > tait_parameters_b
Definition: melt_boukare.h:155
std::vector< double > number_of_atoms
Definition: melt_boukare.h:140
std::vector< double > bulk_modulus_second_pressure_derivatives
Definition: melt_boukare.h:145
std::vector< double > reference_volumes
Definition: melt_boukare.h:141
std::vector< std::string > endmember_names
Definition: melt_boukare.h:138
void declare_parameters(ParameterHandler &prm)
std::vector< double > tait_parameters_a
Definition: melt_boukare.h:154
std::vector< double > specific_heat_linear_coefficients
Definition: melt_boukare.h:150
std::vector< typename EndmemberState::Kind > endmember_states
Definition: melt_boukare.h:223
std::vector< double > bulk_composition
Definition: melt_boukare.h:48
std::vector< double > specific_heat_second_coefficients
Definition: melt_boukare.h:151
std::vector< double > reference_entropies
Definition: melt_boukare.h:148
std::vector< double > specific_heat_third_coefficients
Definition: melt_boukare.h:152
std::vector< double > bulk_modulus_pressure_derivatives
Definition: melt_boukare.h:144
std::vector< double > reference_bulk_moduli
Definition: melt_boukare.h:143
std::vector< double > molar_masses
Definition: melt_boukare.h:139
std::vector< double > reference_thermal_expansivities
Definition: melt_boukare.h:142
std::vector< double > Einstein_temperatures
Definition: melt_boukare.h:146
Definition: compat.h:88
std::vector< double > reference_specific_heats
Definition: melt_boukare.h:149
std::vector< double > tait_parameters_c
Definition: melt_boukare.h:156
std::vector< double > reference_enthalpies
Definition: melt_boukare.h:147
std::vector< double > molar_volatiles_in_melt
Definition: melt_boukare.h:49