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_model_grain_size_evolution_h
22 #define _aspect_material_model_reaction_model_grain_size_evolution_h
23 
26 
27 namespace aspect
28 {
29  namespace MaterialModel
30  {
31  namespace ReactionModel
32  {
49  template <int dim>
51  {
52  public:
59 
79  void
81  const std::vector<double> &adiabatic_pressure,
82  const std::vector<unsigned int> &phase_indices,
83  const std::function<double(const double,const double,
84  const double,const SymmetricTensor<2,dim> &,const unsigned int,const double, const double)> &dislocation_viscosity,
85  const std::function<double(
86  const double, const double, const double,const double,const double,const unsigned int)> &diffusion_viscosity,
87  const double min_eta,
88  const double max_eta,
89  typename Interface<dim>::MaterialModelOutputs &out) const;
90 
97  void
99 
106  void
108  const typename MaterialModel::MaterialModelOutputs<dim> &out,
109  const std::vector<unsigned int> &phase_indices,
110  const std::vector<double> &dislocation_viscosities,
111  std::vector<std::shared_ptr<MaterialModel::AdditionalMaterialOutputs<dim>>> &additional_outputs) const;
112 
116  static
117  void
119 
123  void
125 
126  private:
132  std::vector<double> grain_growth_activation_energy;
136  std::vector<double> grain_growth_activation_volume;
140  std::vector<double> grain_growth_rate_constant;
144  std::vector<double> grain_growth_exponent;
152  std::vector<double> reciprocal_required_strain;
156  std::vector<double> recrystallized_grain_size;
157 
162  std::vector<double> grain_boundary_energy;
170  std::vector<double> geometric_constant;
171 
176  struct Formulation
177  {
198  enum Kind
199  {
203  };
204 
209  static
210  Kind
211  parse(const std::string &input)
212  {
213  if (input == "paleowattmeter")
215  else if (input == "paleopiezometer")
217  else if (input == "pinned grain damage")
219  else
220  AssertThrow(false, ExcNotImplemented());
221 
222  return Formulation::Kind();
223  }
224  };
225 
232 
239  double compute_partitioning_fraction (const double temperature) const;
240 
257 
269 
279 
289  std::shared_ptr<MaterialUtilities::PhaseFunction<dim>> phase_function;
290 
294  unsigned int n_phase_transitions;
295 
301 
308  };
309  }
310 
311  }
312 }
313 
314 #endif
static void declare_parameters(ParameterHandler &prm)
void calculate_reaction_terms(const typename Interface< dim >::MaterialModelInputs &in, const std::vector< double > &adiabatic_pressure, const std::vector< unsigned int > &phase_indices, const std::function< double(const double, const double, const double, const SymmetricTensor< 2, dim > &, const unsigned int, const double, const double)> &dislocation_viscosity, const std::function< double(const double, const double, const double, const double, const double, const unsigned int)> &diffusion_viscosity, const double min_eta, const double max_eta, typename Interface< dim >::MaterialModelOutputs &out) const
void fill_additional_outputs(const typename MaterialModel::MaterialModelInputs< dim > &in, const typename MaterialModel::MaterialModelOutputs< dim > &out, const std::vector< unsigned int > &phase_indices, const std::vector< double > &dislocation_viscosities, std::vector< std::shared_ptr< MaterialModel::AdditionalMaterialOutputs< dim >>> &additional_outputs) const
double compute_partitioning_fraction(const double temperature) const
std::shared_ptr< MaterialUtilities::PhaseFunction< dim > > phase_function
void create_additional_named_outputs(MaterialModel::MaterialModelOutputs< dim > &out) const
void initialize_phase_function(std::shared_ptr< MaterialUtilities::PhaseFunction< dim >> &phase_function)
static ::ExceptionBase & ExcNotImplemented()
#define AssertThrow(cond, exc)