|
48 | 48 | #include <deal.II/base/geometry_info.h> |
49 | 49 |
|
50 | 50 | #include <aspect/material_model/simple.h> |
51 | | -#include <aspect/heating_model/interface.h> |
52 | | -#include <aspect/heating_model/shear_heating.h> |
53 | 51 | #include <aspect/gravity_model/interface.h> |
54 | 52 | #include <aspect/simulator/assemblers/stokes.h> |
55 | 53 | #include <aspect/simulator_signals.h> |
|
60 | 58 |
|
61 | 59 | namespace aspect |
62 | 60 | { |
63 | | - namespace HeatingModel |
64 | | - { |
65 | | - template <int dim> |
66 | | - class ShearHeatingAnisotropicViscosity : public Interface<dim>, public ::aspect::SimulatorAccess<dim> |
67 | | - { |
68 | | - public: |
69 | | - /** |
70 | | - * Compute the heating model outputs for this class. |
71 | | - */ |
72 | | - void |
73 | | - evaluate (const MaterialModel::MaterialModelInputs<dim> &material_model_inputs, |
74 | | - const MaterialModel::MaterialModelOutputs<dim> &material_model_outputs, |
75 | | - HeatingModel::HeatingModelOutputs &heating_model_outputs) const override; |
76 | | - |
77 | | - /** |
78 | | - * Allow the heating model to attach additional material model outputs. |
79 | | - */ |
80 | | - void |
81 | | - create_additional_material_model_outputs(MaterialModel::MaterialModelOutputs<dim> &material_model_outputs) const override; |
82 | | - }; |
83 | | - |
84 | | - |
85 | | - |
86 | | - template <int dim> |
87 | | - void |
88 | | - ShearHeatingAnisotropicViscosity<dim>:: |
89 | | - evaluate (const MaterialModel::MaterialModelInputs<dim> &material_model_inputs, |
90 | | - const MaterialModel::MaterialModelOutputs<dim> &material_model_outputs, |
91 | | - HeatingModel::HeatingModelOutputs &heating_model_outputs) const |
92 | | - { |
93 | | - Assert(heating_model_outputs.heating_source_terms.size() == material_model_inputs.position.size(), |
94 | | - ExcMessage ("Heating outputs need to have the same number of entries as the material model inputs.")); |
95 | | - |
96 | | - // Some material models provide dislocation viscosities and boundary area work fractions |
97 | | - // as additional material outputs. If they are attached, use them. |
98 | | - const std::shared_ptr<const ShearHeatingOutputs<dim>> shear_heating_out |
99 | | - = material_model_outputs.template get_additional_output_object<ShearHeatingOutputs<dim>>(); |
100 | | - |
101 | | - const std::shared_ptr<const MaterialModel::AnisotropicViscosity<dim>> anisotropic_viscosity |
102 | | - = material_model_outputs.template get_additional_output_object<MaterialModel::AnisotropicViscosity<dim>>(); |
103 | | - |
104 | | - for (unsigned int q=0; q<heating_model_outputs.heating_source_terms.size(); ++q) |
105 | | - { |
106 | | - // If there is an anisotropic viscosity, use it to compute the correct stress |
107 | | - const SymmetricTensor<2,dim> &directed_strain_rate = ((anisotropic_viscosity != nullptr) |
108 | | - ? |
109 | | - anisotropic_viscosity->stress_strain_directors[q] |
110 | | - * material_model_inputs.strain_rate[q] |
111 | | - : |
112 | | - material_model_inputs.strain_rate[q]); |
113 | | - |
114 | | - const SymmetricTensor<2,dim> stress = |
115 | | - 2 * material_model_outputs.viscosities[q] * |
116 | | - (this->get_material_model().is_compressible() |
117 | | - ? |
118 | | - directed_strain_rate - 1./3. * trace(directed_strain_rate) * unit_symmetric_tensor<dim>() |
119 | | - : |
120 | | - directed_strain_rate); |
121 | | - |
122 | | - const SymmetricTensor<2,dim> deviatoric_strain_rate = |
123 | | - (this->get_material_model().is_compressible() |
124 | | - ? |
125 | | - material_model_inputs.strain_rate[q] |
126 | | - - 1./3. * trace(material_model_inputs.strain_rate[q]) * unit_symmetric_tensor<dim>() |
127 | | - : |
128 | | - material_model_inputs.strain_rate[q]); |
129 | | - |
130 | | - heating_model_outputs.heating_source_terms[q] = stress * deviatoric_strain_rate; |
131 | | - |
132 | | - // If shear heating work fractions are provided, reduce the |
133 | | - // overall heating by this amount (which is assumed to be converted into other forms of energy) |
134 | | - if (shear_heating_out != nullptr) |
135 | | - heating_model_outputs.heating_source_terms[q] *= shear_heating_out->shear_heating_work_fractions[q]; |
136 | | - |
137 | | - heating_model_outputs.lhs_latent_heat_terms[q] = 0.0; |
138 | | - } |
139 | | - } |
140 | | - |
141 | | - |
142 | | - |
143 | | - template <int dim> |
144 | | - void |
145 | | - ShearHeatingAnisotropicViscosity<dim>:: |
146 | | - create_additional_material_model_outputs(MaterialModel::MaterialModelOutputs<dim> &material_model_outputs) const |
147 | | - { |
148 | | - const unsigned int n_points = material_model_outputs.viscosities.size(); |
149 | | - |
150 | | - if (material_model_outputs.template has_additional_output_object<MaterialModel::AnisotropicViscosity<dim>>() == false) |
151 | | - { |
152 | | - material_model_outputs.additional_outputs.push_back( |
153 | | - std::make_unique<MaterialModel::AnisotropicViscosity<dim>> (n_points)); |
154 | | - } |
155 | | - |
156 | | - this->get_material_model().create_additional_named_outputs(material_model_outputs); |
157 | | - } |
158 | | - } |
159 | | - |
160 | 61 | namespace MaterialModel |
161 | 62 | { |
162 | 63 | // The AV material model calculates an anisotropic viscosity tensor from director vectors and the normal and shear |
@@ -481,20 +382,6 @@ namespace aspect |
481 | 382 | // explicit instantiations |
482 | 383 | namespace aspect |
483 | 384 | { |
484 | | - namespace HeatingModel |
485 | | - { |
486 | | - ASPECT_REGISTER_HEATING_MODEL(ShearHeatingAnisotropicViscosity, |
487 | | - "anisotropic shear heating", |
488 | | - "Implementation of a standard model for shear heating. " |
489 | | - "Adds the term: " |
490 | | - "$ 2 \\eta \\left( \\varepsilon - \\frac{1}{3} \\text{tr} " |
491 | | - "\\varepsilon \\mathbf 1 \\right) : \\left( \\varepsilon - \\frac{1}{3} " |
492 | | - "\\text{tr} \\varepsilon \\mathbf 1 \\right)$ to the " |
493 | | - "right-hand side of the temperature equation.") |
494 | | - } |
495 | | - |
496 | | - |
497 | | - |
498 | 385 | namespace MaterialModel |
499 | 386 | { |
500 | 387 | ASPECT_REGISTER_MATERIAL_MODEL(AV, |
|
0 commit comments