ASPECT
melt_simple.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_simple_h
22 #define _aspect_material_model_melt_simple_h
23 
27 #include <aspect/melt.h>
28 
29 namespace aspect
30 {
31  namespace MaterialModel
32  {
33  using namespace dealii;
34 
54  template <int dim>
57  public ::aspect::SimulatorAccess<dim>
58  {
59  public:
68  bool is_compressible () const override;
69 
75  void
76  initialize () override;
77 
78  void evaluate(const typename Interface<dim>::MaterialModelInputs &in,
79  typename Interface<dim>::MaterialModelOutputs &out) const override;
80 
81  void melt_fractions (const MaterialModel::MaterialModelInputs<dim> &in,
82  std::vector<double> &melt_fractions) const override;
83 
88  double reference_darcy_coefficient () const override;
89 
101  static
102  void
103  declare_parameters (ParameterHandler &prm);
104 
108  void
109  parse_parameters (ParameterHandler &prm) override;
110 
115  void
116  create_additional_named_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const override;
117 
118 
119  private:
122  double reference_T;
123  double eta_0;
124  double xi_0;
125  double eta_f;
132  double alpha_phi;
143 
148  // for the solidus temperature
149  double A1; // °C
150  double A2; // °C/Pa
151  double A3; // °C/(Pa^2)
152 
153  // for the lherzolite liquidus temperature
154  double B1; // °C
155  double B2; // °C/Pa
156  double B3; // °C/(Pa^2)
157 
158  // for the liquidus temperature
159  double C1; // °C
160  double C2; // °C/Pa
161  double C3; // °C/(Pa^2)
162 
163  // for the reaction coefficient of pyroxene
164  double r1; // cpx/melt
165  double r2; // cpx/melt/GPa
166  double M_cpx; // mass fraction of pyroxene
167 
168  // melt fraction exponent
169  double beta;
170 
171  // entropy change upon melting
173 
179  virtual
180  double
181  melt_fraction (const double temperature,
182  const double pressure) const;
183 
192  virtual
193  double
194  entropy_change (const double temperature,
195  const double pressure,
196  const double maximum_melt_fraction,
197  const NonlinearDependence::Dependence dependence) const;
198  };
199 
200  }
201 }
202 
203 #endif
void declare_parameters(ParameterHandler &prm)
Definition: compat.h:42