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>
56  {
57  public:
66  bool is_compressible () const override;
67 
73  void
74  initialize () override;
75 
76  void evaluate(const typename Interface<dim>::MaterialModelInputs &in,
77  typename Interface<dim>::MaterialModelOutputs &out) const override;
78 
79  void melt_fractions (const MaterialModel::MaterialModelInputs<dim> &in,
80  std::vector<double> &melt_fractions) const override;
81 
86  double reference_darcy_coefficient () const override;
87 
99  static
100  void
101  declare_parameters (ParameterHandler &prm);
102 
106  void
107  parse_parameters (ParameterHandler &prm) override;
108 
113  void
114  create_additional_named_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const override;
115 
116 
117  private:
120  double reference_T;
121  double eta_0;
122  double xi_0;
123  double eta_f;
130  double alpha_phi;
141 
146  // for the solidus temperature
147  double A1; // °C
148  double A2; // °C/Pa
149  double A3; // °C/(Pa^2)
150 
151  // for the lherzolite liquidus temperature
152  double B1; // °C
153  double B2; // °C/Pa
154  double B3; // °C/(Pa^2)
155 
156  // for the liquidus temperature
157  double C1; // °C
158  double C2; // °C/Pa
159  double C3; // °C/(Pa^2)
160 
161  // for the reaction coefficient of pyroxene
162  double r1; // cpx/melt
163  double r2; // cpx/melt/GPa
164  double M_cpx; // mass fraction of pyroxene
165 
166  // melt fraction exponent
167  double beta;
168 
169  // entropy change upon melting
171 
177  virtual
178  double
179  melt_fraction (const double temperature,
180  const double pressure) const;
181 
190  virtual
191  double
192  entropy_change (const double temperature,
193  const double pressure,
194  const double maximum_melt_fraction,
195  const NonlinearDependence::Dependence dependence) const;
196  };
197 
198  }
199 }
200 
201 #endif
void declare_parameters(ParameterHandler &prm)
Definition: compat.h:88