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  {
34  using namespace dealii;
35 
41  template <int dim>
43  {
44  public:
45  explicit ElasticAdditionalOutputs(const unsigned int n_points);
46 
47  std::vector<double> get_nth_output(const unsigned int idx) const override;
48 
54  std::vector<double> elastic_shear_moduli;
55  };
56 
57 
58 
59  namespace Rheology
60  {
61  template <int dim>
63  {
64  public:
68  static
69  void
70  declare_parameters (ParameterHandler &prm);
71 
75  void
76  parse_parameters (ParameterHandler &prm);
77 
82  void
83  create_elastic_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const;
84 
91  void
92  fill_elastic_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
93  const std::vector<double> &average_elastic_shear_moduli,
95 
103  void
104  fill_reaction_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
105  const std::vector<double> &average_elastic_shear_moduli,
107 
112  const std::vector<double> &
113  get_elastic_shear_moduli () const;
114 
119  double
120  calculate_elastic_viscosity (const double shear_modulus) const;
121 
126  double
127  calculate_viscoelastic_viscosity (const double viscosity,
128  const double shear_modulus) const;
129 
140  SymmetricTensor<2,dim>
141  calculate_viscoelastic_strain_rate (const SymmetricTensor<2,dim> &strain_rate,
142  const SymmetricTensor<2,dim> &stored_stress,
143  const double shear_modulus) const;
144 
148  double
149  elastic_timestep () const;
150 
151  private:
157 
161  std::vector<double> elastic_shear_moduli;
162 
170 
175 
184 
192  mutable std::unique_ptr<FEPointEvaluation<dim, dim>> evaluator;
193  };
194  }
195  }
196 }
197 #endif
std::vector< double > elastic_shear_moduli
Definition: elasticity.h:161
void declare_parameters(ParameterHandler &prm)
std::unique_ptr< FEPointEvaluation< dim, dim > > evaluator
Definition: elasticity.h:192
Definition: compat.h:59
Definition: compat.h:42