28
28
#include < aspect/material_model/rheology/dislocation_creep.h>
29
29
#include < aspect/material_model/rheology/peierls_creep.h>
30
30
#include < aspect/material_model/rheology/drucker_prager_power.h>
31
+ #include < aspect/material_model/rheology/elasticity.h>
31
32
#include < aspect/simulator_access.h>
32
33
33
34
namespace aspect
@@ -91,6 +92,24 @@ namespace aspect
91
92
parse_parameters (ParameterHandler &prm,
92
93
const std::unique_ptr<std::vector<unsigned int >> &expected_n_phases_per_composition = nullptr );
93
94
95
+ /* *
96
+ * Compute the inverse of the scalar elastic viscosity
97
+ * obtained from the elasticity rheology. The required scalar shear modulus is
98
+ * calculated by harmonically averaging the individual component shear moduli
99
+ * weighted by the @p volume_fractions of the components.
100
+ */
101
+ double
102
+ compute_inverse_kelvin_viscosity (const std::vector<double > &volume_fractions) const ;
103
+
104
+ /* *
105
+ * Compute the effective viscoelastic strain rate used to calculate the
106
+ * viscosity.
107
+ */
108
+ SymmetricTensor<2 , dim>
109
+ compute_effective_strain_rate (const SymmetricTensor<2 , dim> &strain_rate,
110
+ const SymmetricTensor<2 , dim> &elastic_stress,
111
+ const double inverse_kelvin_viscosity) const ;
112
+
94
113
/* *
95
114
* Compute the viscosity based on the composite viscous creep law.
96
115
* If @p n_phase_transitions_per_composition points to a vector of
@@ -103,7 +122,8 @@ namespace aspect
103
122
const double temperature,
104
123
const double grain_size,
105
124
const std::vector<double > &volume_fractions,
106
- const SymmetricTensor<2 ,dim> &strain_rate,
125
+ const SymmetricTensor<2 ,dim> &effective_strain_rate,
126
+ const double inverse_kelvin_viscosity,
107
127
std::vector<double > &partial_strain_rates,
108
128
const std::vector<double > &phase_function_values = std::vector<double >(),
109
129
const std::vector<unsigned int > &n_phase_transitions_per_composition = std::vector<unsigned int >()) const ;
@@ -122,7 +142,8 @@ namespace aspect
122
142
const double temperature,
123
143
const double grain_size,
124
144
const std::vector<double > &volume_fractions,
125
- const SymmetricTensor<2 ,dim> &strain_rate,
145
+ const SymmetricTensor<2 ,dim> &effective_strain_rate,
146
+ const double inverse_kelvin_viscosity,
126
147
std::vector<double > &partial_strain_rates,
127
148
const std::vector<double > &phase_function_values = std::vector<double >(),
128
149
const std::vector<unsigned int > &n_phase_transitions_per_composition = std::vector<unsigned int >()) const ;
@@ -135,6 +156,7 @@ namespace aspect
135
156
std::pair<double , double >
136
157
calculate_isostress_log_strain_rate_and_derivative (const std::vector<std::array<std::pair<double , double >, 4 >> &logarithmic_strain_rates_and_stress_derivatives,
137
158
const double viscoplastic_stress,
159
+ const double inverse_kelvin_viscosity,
138
160
std::vector<double > &partial_strain_rates) const ;
139
161
140
162
/* *
@@ -185,6 +207,69 @@ namespace aspect
185
207
const double viscoplastic_stress,
186
208
std::vector<double > &partial_strain_rates) const ;
187
209
210
+ /* *
211
+ * Create the two additional material model output objects that contain the
212
+ * elastic shear moduli, elastic viscosity, ratio of computational to elastic timestep,
213
+ * and deviatoric stress of the current timestep and the reaction rates.
214
+ */
215
+ /*
216
+ void
217
+ create_elastic_additional_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const;
218
+ */
219
+
220
+ /* *
221
+ * Given the stress of the previous time step in the material model inputs @p in,
222
+ * the elastic shear moduli @p average_elastic_shear_moduli at each point,
223
+ * and the (viscous) viscosities given in the material model outputs object @p out,
224
+ * fill a material model outputs objects with the elastic force terms, viscoelastic
225
+ * strain rate and viscous dissipation.
226
+ */
227
+ /*
228
+ void
229
+ fill_elastic_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
230
+ const std::vector<double> &average_elastic_shear_moduli,
231
+ MaterialModel::MaterialModelOutputs<dim> &out) const;
232
+ */
233
+
234
+ /* *
235
+ * Given the stress of the previous time step in the material model inputs @p in,
236
+ * the elastic shear moduli @p average_elastic_shear_moduli at each point,
237
+ * and the (viscous) viscosities given in the material model outputs object @p out,
238
+ * fill a material model outputs (ElasticAdditionalOutputs) object with the
239
+ * average shear modulus, elastic viscosity, and the deviatoric stress of the current timestep.
240
+ */
241
+ /*
242
+ void
243
+ fill_elastic_additional_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
244
+ const std::vector<double> &average_elastic_shear_moduli,
245
+ MaterialModel::MaterialModelOutputs<dim> &out) const;
246
+ */
247
+
248
+ /* *
249
+ * Given the stress of the previous time step in the material model inputs @p in,
250
+ * the elastic shear moduli @p average_elastic_shear_moduli at each point,
251
+ * and the (viscous) viscosities given in the material model outputs object @p out,
252
+ * compute an update to the elastic stresses and use it to fill the reaction terms
253
+ * material model output property.
254
+ */
255
+ void
256
+ fill_reaction_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
257
+ const std::vector<double > &average_elastic_shear_moduli,
258
+ MaterialModel::MaterialModelOutputs<dim> &out) const ;
259
+
260
+ /* *
261
+ * Given the stress of the previous time step in the material model inputs @p in,
262
+ * the elastic shear moduli @p average_elastic_shear_moduli at each point,
263
+ * and the (viscous) viscosities given in the material model outputs object @p out,
264
+ * compute the update to the elastic stresses of the previous timestep and use it
265
+ * to fill the reaction rates material model output property.
266
+ */
267
+ void
268
+ fill_reaction_rates (const MaterialModel::MaterialModelInputs<dim> &in,
269
+ const std::vector<double > &average_elastic_shear_moduli,
270
+ MaterialModel::MaterialModelOutputs<dim> &out) const ;
271
+
272
+ private:
188
273
/* *
189
274
* Enumeration for selecting which type of viscosity averaging to use.
190
275
*/
@@ -197,6 +282,7 @@ namespace aspect
197
282
bool use_dislocation_creep;
198
283
bool use_peierls_creep;
199
284
bool use_drucker_prager;
285
+ bool use_elasticity;
200
286
201
287
/* *
202
288
* Vector storing which flow mechanisms are active.
@@ -209,16 +295,31 @@ namespace aspect
209
295
* which is arranged in parallel with the viscoplastic elements and
210
296
* therefore does not contribute to the total strain rate.
211
297
*/
212
- static constexpr unsigned int n_decomposed_strain_rates = 5 ;
298
+ static constexpr unsigned int n_decomposed_strain_rates = 6 ;
299
+
300
+ /* *
301
+ * The index of the hard damper in the decomposed strain rates.
302
+ * This is always the last element.
303
+ */
304
+ static constexpr unsigned int damper_strain_rate_index = 5 ;
305
+ static constexpr unsigned int isostrain_damper_strain_rate_index = 4 ;
306
+
307
+ /* *
308
+ * The index of the elastic element in the decomposed strain rates.
309
+ * This is always the penultimate element.
310
+ */
311
+ static constexpr unsigned int elastic_strain_rate_index = 4 ;
213
312
214
313
/* *
215
314
* Pointers to objects for computing deformation mechanism
216
315
* strain rates and effective viscosities.
217
316
*/
218
- std::unique_ptr<Rheology::DiffusionCreep<dim>> diffusion_creep;
317
+ std::unique_ptr<Rheology::DiffusionCreep<dim>>
318
+ diffusion_creep;
219
319
std::unique_ptr<Rheology::DislocationCreep<dim>> dislocation_creep;
220
320
std::unique_ptr<Rheology::PeierlsCreep<dim>> peierls_creep;
221
321
std::unique_ptr<Rheology::DruckerPragerPower<dim>> drucker_prager;
322
+ std::unique_ptr<Rheology::Elasticity<dim>> elasticity;
222
323
223
324
/* *
224
325
* The expected number of chemical compositional fields.
@@ -229,8 +330,14 @@ namespace aspect
229
330
* The maximum viscosity, imposed via an isoviscous damper
230
331
* in series with the composite viscoplastic element.
231
332
*/
333
+ double inverse_maximum_viscosity;
232
334
double maximum_viscosity;
233
335
336
+ /* *
337
+ * The minimum viscosity, imposed via an isoviscous damper
338
+ * in parallel with the flow law components
339
+ */
340
+ double minimum_viscosity;
234
341
235
342
/* *
236
343
* The viscosity of an isoviscous damper placed in parallel
@@ -273,6 +380,8 @@ namespace aspect
273
380
* Useful number to aid in adding together exponentials.
274
381
*/
275
382
const double logmin = std::log(std::numeric_limits<double >::min());
383
+
384
+ static constexpr unsigned int n_independent_components = SymmetricTensor<2 , dim>::n_independent_components;
276
385
};
277
386
}
278
387
}
0 commit comments