ASPECT
composite_visco_plastic.h
Go to the documentation of this file.
1 // ------------------------------------------------------
2 //
3 // SPDX-License-Identifier: GPL-2.0-or-later
4 //
5 // SPDX-FileCopyrightText: Copyright (C) 2020-2026 by the ASPECT authors.
6 //
7 // This file is part of ASPECT.
8 //
9 // Detailed license information governing the source code and
10 // contributions can be found in the folder LICENSES and in
11 // LICENSE and CONTRIBUTING.md at the top level directory.
12 //
13 // ------------------------------------------------------
14 
15 #ifndef _aspect_material_model_rheology_composite_visco_plastic_h
16 #define _aspect_material_model_rheology_composite_visco_plastic_h
17 
18 #include <aspect/global.h>
26 
27 namespace aspect
28 {
29  namespace MaterialModel
30  {
31  namespace Rheology
32  {
41  namespace ViscosityAveraging
42  {
43  enum Kind
44  {
47  };
48 
55  parse (const std::string &parameter_name,
56  const ParameterHandler &prm);
57  }
58 
59  template <int dim>
61  {
62  public:
67 
71  static
72  void
74 
82  void
83  parse_parameters (ParameterHandler &prm,
84  const std::unique_ptr<std::vector<unsigned int>> &expected_n_phases_per_composition = nullptr);
85 
93  double
94  compute_viscosity (const double pressure,
95  const double temperature,
96  const double grain_size,
97  const std::vector<double> &volume_fractions,
99  std::vector<double> &partial_strain_rates,
100  const std::vector<double> &phase_function_values = {},
101  const std::vector<unsigned int> &n_phase_transitions_per_composition = {}) const;
102 
103  private:
112  double
113  compute_isostress_viscosity (const double pressure,
114  const double temperature,
115  const double grain_size,
116  const std::vector<double> &volume_fractions,
117  const SymmetricTensor<2,dim> &strain_rate,
118  std::vector<double> &partial_strain_rates,
119  const std::vector<double> &phase_function_values = {},
120  const std::vector<unsigned int> &n_phase_transitions_per_composition = {}) const;
121 
127  std::pair<double, double>
128  calculate_isostress_log_strain_rate_and_derivative(const std::vector<std::array<std::pair<double, double>, 4>> &logarithmic_strain_rates_and_stress_derivatives,
129  const double viscoplastic_stress,
130  std::vector<double> &partial_strain_rates) const;
131 
140  double
141  compute_isostrain_viscosity (const double pressure,
142  const double temperature,
143  const double grain_size,
144  const std::vector<double> &volume_fractions,
145  const SymmetricTensor<2,dim> &strain_rate,
146  std::vector<double> &partial_strain_rates,
147  const std::vector<double> &phase_function_values = {},
148  const std::vector<unsigned int> &n_phase_transitions_per_composition = {}) const;
149 
150 
159  double
160  compute_composition_viscosity (const double pressure,
161  const double temperature,
162  const double grain_size,
163  const unsigned int composition,
164  const SymmetricTensor<2,dim> &strain_rate,
165  std::vector<double> &partial_strain_rates,
166  const std::vector<double> &phase_function_values = {},
167  const std::vector<unsigned int> &n_phase_transitions_per_composition = {}) const;
168 
175  std::pair<double, double>
176  calculate_composition_log_strain_rate_and_derivative(const std::array<std::pair<double, double>, 4> &logarithmic_strain_rates_and_stress_derivatives,
177  const double viscoplastic_stress,
178  std::vector<double> &partial_strain_rates) const;
179 
186 
204 
208  std::vector<unsigned int> active_flow_mechanisms;
209 
216  static constexpr unsigned int n_decomposed_strain_rates = 5;
217 
222  std::unique_ptr<Rheology::DiffusionCreep<dim>> diffusion_creep;
223  std::unique_ptr<Rheology::DislocationCreep<dim>> dislocation_creep;
224  std::unique_ptr<Rheology::PeierlsCreep<dim>> peierls_creep;
225  std::unique_ptr<Rheology::DruckerPragerPower<dim>> drucker_prager;
226 
231 
238 
239 
249 
258 
264 
272 
280 
284  const double logmin = std::log(std::numeric_limits<double>::min());
285  };
286  }
287  }
288 }
289 #endif
std::unique_ptr< Rheology::PeierlsCreep< dim > > peierls_creep
std::unique_ptr< Rheology::DruckerPragerPower< dim > > drucker_prager
void declare_parameters(ParameterHandler &prm)
std::unique_ptr< Rheology::DislocationCreep< dim > > dislocation_creep
ViscosityAveraging::Kind parse(const std::string &parameter_name, const ParameterHandler &prm)
std::unique_ptr< Rheology::DiffusionCreep< dim > > diffusion_creep
::VectorizedArray< Number, width > log(const ::VectorizedArray< Number, width > &)