ASPECT
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
elasticity.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2019 - 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_rheology_elasticity_h
22 #define _aspect_material_model_rheology_elasticity_h
23 
24 #include <aspect/global.h>
27 
28 #include <deal.II/matrix_free/fe_point_evaluation.h>
29 
30 namespace aspect
31 {
32  namespace MaterialModel
33  {
39  template <int dim>
41  {
42  public:
43  explicit ElasticAdditionalOutputs(const unsigned int n_points);
44 
45  std::vector<double> get_nth_output(const unsigned int idx) const override;
46 
52  std::vector<double> elastic_shear_moduli;
53 
59  std::vector<double> elastic_viscosity;
60 
67  std::vector<SymmetricTensor<2,dim>> deviatoric_stress;
68  };
69 
70 
71 
72  namespace Rheology
73  {
74  template <int dim>
76  {
77  public:
81  static
82  void
83  declare_parameters (ParameterHandler &prm);
84 
88  void
89  parse_parameters (ParameterHandler &prm);
90 
96  void
97  create_elastic_additional_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const;
98 
119  void
120  fill_elastic_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
121  const std::vector<double> &average_elastic_shear_moduli,
123 
143  void
144  fill_elastic_additional_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
145  const std::vector<double> &average_elastic_shear_moduli,
147 
167  void
168  fill_reaction_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
169  const std::vector<double> &average_elastic_shear_moduli,
171 
185  void
186  fill_reaction_rates (const MaterialModel::MaterialModelInputs<dim> &in,
187  const std::vector<double> &average_elastic_shear_moduli,
189 
194  const std::vector<double> &
195  get_elastic_shear_moduli () const;
196 
201  double
202  calculate_elastic_viscosity (const double shear_modulus) const;
203 
208  double
209  calculate_viscoelastic_viscosity (const double viscosity,
210  const double shear_modulus) const;
211 
229  SymmetricTensor<2,dim>
230  calculate_viscoelastic_strain_rate (const SymmetricTensor<2,dim> &strain_rate,
231  const SymmetricTensor<2, dim> &stress_0_advected,
232  const SymmetricTensor<2, dim> &stress_old,
233  const double viscosity_pre_yield,
234  const double shear_modulus) const;
235 
239  double
240  elastic_timestep () const;
241 
246  double
247  calculate_timestep_ratio() const;
248 
249  private:
258  std::vector<SymmetricTensor<2, dim>>
259  retrieve_stress_previous_timestep (const MaterialModel::MaterialModelInputs<dim> &in,
260  const std::vector<Point<dim>> &quadrature_positions) const;
261 
267 
271  std::vector<double> elastic_shear_moduli;
272 
280 
285 
294 
301  mutable std::unique_ptr<FEPointEvaluation<dim, dim>> evaluator;
302  static constexpr unsigned int n_independent_components = SymmetricTensor<2, dim>::n_independent_components;
303  mutable std::unique_ptr<FEPointEvaluation<n_independent_components, dim>> evaluator_composition;
304 
305  };
306  }
307  }
308 }
309 #endif
std::vector< double > elastic_shear_moduli
Definition: elasticity.h:271
void declare_parameters(ParameterHandler &prm)
std::unique_ptr< FEPointEvaluation< n_independent_components, dim > > evaluator_composition
Definition: elasticity.h:303
std::unique_ptr< FEPointEvaluation< dim, dim > > evaluator
Definition: elasticity.h:301
std::vector< SymmetricTensor< 2, dim > > deviatoric_stress
Definition: elasticity.h:67
std::vector< double > get_nth_output(const unsigned int idx) const override
ElasticAdditionalOutputs(const unsigned int n_points)