SUPG Stabilization

The solution to Erin’s initial problem - unreasonably large reported values of heat flux - lies in the postprocessor for heat flux, which calculates heat flow as k_eff * grad(T). k_eff is defined as the maximum of the actual thermal conductivity and the artificial viscosity. For entropy viscosity stabilization, this kind of makes sense (though I would argue is not a useful output and should really come with a warning). The SUPG parameter has from what I can tell the MKS units of m^3 K/W, i.e. not a thermal conductivity, so it should not be included. The following change to source/postprocess/heat_flux_map.cc will disable this behavior for supg. I will submit a pull request for this issue in a few minutes and start a separate thread related to the convergence problems.

diff --git a/source/postprocess/heat_flux_map.cc b/source/postprocess/heat_flux_map.cc
index aabd84587..594b55f63 100644
--- a/source/postprocess/heat_flux_map.cc
+++ b/source/postprocess/heat_flux_map.cc
@@ -192,9 +192,14 @@ namespace aspect
                   const double material_prefactor = density_c_P + latent_heat_LHS;

                   const double artificial_viscosity_cell = static_cast<double>(artificial_viscosity(cell->active_cell_index()));
-                  const double diffusion_constant = std::max(out.thermal_conductivities[q],
-                                                             artificial_viscosity_cell);
-
+                 // The SUPG parameter tau does not have the physical dimensions of a diffusivity and as such should not be included in heat flux calculations
+                 const double diffusion_constant = (simulator_access.get_parameters().advection_stabilization_method == Parameters<dim>::AdvectionStabilizationMethod::supg) ?
+                   out.thermal_conductivities[q]
+                   :
+                   std::max(out.thermal_conductivities[q],
+                            artificial_viscosity_cell)
+                   ;
+
                   for (unsigned int i = 0; i<dofs_per_cell; ++i)
1 Like