[cig-commits] r1351 - trunk/aspect/source/simulator
bangerth at dealii.org
bangerth at dealii.org
Wed Nov 7 12:55:53 PST 2012
Author: bangerth
Date: 2012-11-07 13:55:53 -0700 (Wed, 07 Nov 2012)
New Revision: 1351
Modified:
trunk/aspect/source/simulator/assembly.cc
Log:
Make sure the residual of the temperature equation is actually
computed as the residual, including rho*c_p. Instead, don't scale the
artificial diffusivity again when it is used.
Modified: trunk/aspect/source/simulator/assembly.cc
===================================================================
--- trunk/aspect/source/simulator/assembly.cc 2012-11-07 02:44:43 UTC (rev 1350)
+++ trunk/aspect/source/simulator/assembly.cc 2012-11-07 20:55:53 UTC (rev 1351)
@@ -897,7 +897,12 @@
max_residual,
max_velocity);
- const double max_viscosity = (parameters.stabilization_beta *
+ const double max_viscosity = (index == 0 ?
+ material_model->reference_density() *
+ material_model->reference_cp()
+ :
+ 1.0) *
+ (parameters.stabilization_beta *
max_velocity * cell_diameter);
if (timestep_number <= 1)
// we don't have sensible timesteps during the first two iterations
@@ -1535,7 +1540,7 @@
data.local_matrix(i,j)
+= (
(time_step * (thermal_conductivity +
- nu * density * c_P) * scratch.grad_phi_T[i] * scratch.grad_phi_T[j])
+ nu) * scratch.grad_phi_T[i] * scratch.grad_phi_T[j])
+ ((time_step * (current_u * scratch.grad_phi_T[j] * scratch.phi_T[i]))
+ (factor * scratch.phi_T[i] * scratch.phi_T[j])) * density * c_P
)
More information about the CIG-COMMITS
mailing list