ASPECT
grain_size_evolution.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2024 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_reaction_grain_size_evolution_h
22 #define _aspect_material_model_reaction_grain_size_evolution_h
23 
26 
27 namespace aspect
28 {
29  namespace MaterialModel
30  {
31  using namespace dealii;
32 
33  namespace ReactionModel
34  {
51  template <int dim>
53  {
54  public:
60  void initialize_phase_function(std::shared_ptr<MaterialUtilities::PhaseFunction<dim>> &phase_function);
61 
81  void
82  calculate_reaction_terms (const typename Interface<dim>::MaterialModelInputs &in,
83  const std::vector<double> &adiabatic_pressure,
84  const std::vector<unsigned int> &phase_indices,
85  const std::function<double(const double,const double,
86  const double,const SymmetricTensor<2,dim> &,const unsigned int,const double, const double)> &dislocation_viscosity,
87  const std::function<double(
88  const double, const double, const double,const double,const double,const unsigned int)> &diffusion_viscosity,
89  const double min_eta,
90  const double max_eta,
91  typename Interface<dim>::MaterialModelOutputs &out) const;
92 
99  void
100  create_additional_named_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const;
101 
108  void
109  fill_additional_outputs (const typename MaterialModel::MaterialModelInputs<dim> &in,
110  const typename MaterialModel::MaterialModelOutputs<dim> &out,
111  const std::vector<unsigned int> &phase_indices,
112  const std::vector<double> &dislocation_viscosities,
113  std::vector<std::unique_ptr<MaterialModel::AdditionalMaterialOutputs<dim>>> &additional_outputs) const;
114 
118  static
119  void
120  declare_parameters (ParameterHandler &prm);
121 
125  void
126  parse_parameters (ParameterHandler &prm);
127 
128  private:
132  std::vector<double> grain_growth_activation_energy;
133  std::vector<double> grain_growth_activation_volume;
134  std::vector<double> grain_growth_rate_constant;
135  std::vector<double> grain_growth_exponent;
137  std::vector<double> reciprocal_required_strain;
138  std::vector<double> recrystallized_grain_size;
139 
143  std::vector<double> grain_boundary_energy;
145  std::vector<double> geometric_constant;
146 
151  struct Formulation
152  {
173  enum Kind
174  {
177  pinned_grain_damage
178  };
179 
184  static
185  Kind
186  parse(const std::string &input)
187  {
188  if (input == "paleowattmeter")
189  return Formulation::paleowattmeter;
190  else if (input == "paleopiezometer")
191  return Formulation::paleopiezometer;
192  else if (input == "pinned grain damage")
193  return Formulation::pinned_grain_damage;
194  else
195  AssertThrow(false, ExcNotImplemented());
196 
197  return Formulation::Kind();
198  }
199  };
200 
206 
213  double compute_partitioning_fraction (const double temperature) const;
214 
224 
236 
246 
256  std::shared_ptr<MaterialUtilities::PhaseFunction<dim>> phase_function;
257 
261  unsigned int n_phase_transitions;
262  };
263  }
264 
265  }
266 }
267 
268 #endif
std::shared_ptr< MaterialUtilities::PhaseFunction< dim > > phase_function
void declare_parameters(ParameterHandler &prm)
Definition: compat.h:59
Definition: compat.h:42