ASPECT
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  };
54 
55 
56 
57  namespace Rheology
58  {
59  template <int dim>
61  {
62  public:
66  static
67  void
68  declare_parameters (ParameterHandler &prm);
69 
73  void
74  parse_parameters (ParameterHandler &prm);
75 
80  void
81  create_elastic_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const;
82 
89  void
90  fill_elastic_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
91  const std::vector<double> &average_elastic_shear_moduli,
93 
101  void
102  fill_reaction_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
103  const std::vector<double> &average_elastic_shear_moduli,
105 
110  const std::vector<double> &
111  get_elastic_shear_moduli () const;
112 
117  double
118  calculate_elastic_viscosity (const double shear_modulus) const;
119 
124  double
125  calculate_viscoelastic_viscosity (const double viscosity,
126  const double shear_modulus) const;
127 
138  SymmetricTensor<2,dim>
139  calculate_viscoelastic_strain_rate (const SymmetricTensor<2,dim> &strain_rate,
140  const SymmetricTensor<2,dim> &stored_stress,
141  const double shear_modulus) const;
142 
146  double
147  elastic_timestep () const;
148 
149  private:
155 
159  std::vector<double> elastic_shear_moduli;
160 
168 
173 
182 
190  mutable std::unique_ptr<FEPointEvaluation<dim, dim>> evaluator;
191  };
192  }
193  }
194 }
195 #endif
std::vector< double > elastic_shear_moduli
Definition: elasticity.h:159
void declare_parameters(ParameterHandler &prm)
std::unique_ptr< FEPointEvaluation< dim, dim > > evaluator
Definition: elasticity.h:190
Definition: compat.h:59
std::vector< double > get_nth_output(const unsigned int idx) const override
ElasticAdditionalOutputs(const unsigned int n_points)