ASPECT
steinberger.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2023 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_steinberger_h
22 #define _aspect_material_model_steinberger_h
23 
27 
29 #include <deal.II/fe/component_mask.h>
30 
31 namespace aspect
32 {
33  namespace MaterialModel
34  {
35  namespace internal
36  {
46  {
47  public:
51  LateralViscosityLookup(const std::string &filename,
52  const MPI_Comm comm);
53 
57  double lateral_viscosity(double depth) const;
58 
62  int get_nslices() const;
63  private:
67  std::vector<double> values;
68 
72  double min_depth;
73  double delta_depth;
74  double max_depth;
75  };
76 
85  {
86  public:
90  RadialViscosityLookup(const std::string &filename,
91  const MPI_Comm comm);
92 
96  double radial_viscosity(double depth) const;
97 
98  private:
102  std::vector<double> values;
103 
107  double min_depth;
108  double delta_depth;
109  double max_depth;
110  };
111  }
112 
126  template <int dim>
128  {
129  public:
134  void
135  initialize () override;
136 
141  void update() override;
142 
147  virtual double viscosity (const double temperature,
148  const double pressure,
149  const std::vector<double> &compositional_fields,
150  const SymmetricTensor<2,dim> &strain_rate,
151  const Point<dim> &position) const;
169  bool is_compressible () const override;
178  void
179  evaluate(const MaterialModel::MaterialModelInputs<dim> &in,
180  MaterialModel::MaterialModelOutputs<dim> &out) const override;
181 
189  static
190  void
191  declare_parameters (ParameterHandler &prm);
192 
196  void
197  parse_parameters (ParameterHandler &prm) override;
202  void
203  create_additional_named_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const override;
204 
205 
206  private:
217 
225  std::unique_ptr<ComponentMask> composition_mask;
226 
231 
238 
244  std::unique_ptr<ThermalConductivity::Interface<dim>> thermal_conductivity;
245 
251  std::vector<double> viscosity_prefactors;
253 
257  std::vector<double> average_temperature;
258  unsigned int n_lateral_slices;
259 
264  double min_eta;
265  double max_eta;
267 
271  std::string data_directory;
274 
279  std::unique_ptr<internal::LateralViscosityLookup> lateral_viscosity_lookup;
280 
285  std::unique_ptr<internal::RadialViscosityLookup> radial_viscosity_lookup;
286 
293  void fill_prescribed_outputs (const unsigned int i,
294  const std::vector<double> &volume_fractions,
297 
298  };
299  }
300 }
301 
302 #endif
MaterialUtilities::CompositionalAveragingOperation viscosity_averaging_scheme
Definition: steinberger.h:252
std::unique_ptr< internal::LateralViscosityLookup > lateral_viscosity_lookup
Definition: steinberger.h:279
std::vector< double > average_temperature
Definition: steinberger.h:257
std::unique_ptr< ComponentMask > composition_mask
Definition: steinberger.h:225
void declare_parameters(ParameterHandler &prm)
EquationOfState::ThermodynamicTableLookup< dim > equation_of_state
Definition: steinberger.h:230
std::unique_ptr< ThermalConductivity::Interface< dim > > thermal_conductivity
Definition: steinberger.h:244
LateralViscosityLookup(const std::string &filename, const MPI_Comm comm)
Definition: compat.h:59
std::vector< double > viscosity_prefactors
Definition: steinberger.h:251
std::unique_ptr< internal::RadialViscosityLookup > radial_viscosity_lookup
Definition: steinberger.h:285