From: Wolfgang Bangerth Date: Fri, 21 Aug 2009 17:17:51 +0000 (+0000) Subject: Choose parameters correctly, at least for 2d. X-Git-Tag: v8.0.0~7239 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e41590e3f065d103aae8187cd18c2ef256783342;p=dealii.git Choose parameters correctly, at least for 2d. git-svn-id: https://svn.dealii.org/trunk@19329 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index a702b6cd9c..b1193d003c 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -1214,7 +1214,7 @@ compute_viscosity (const std::vector &old_temperature, const double global_T_variation, const double cell_diameter) const { - const double beta = 0.015 * dim; + const double beta = 0.026 * dim; const double alpha = 1; if (global_u_infty == 0) @@ -1248,14 +1248,22 @@ compute_viscosity (const std::vector &old_temperature, max_velocity = std::max (std::sqrt (u*u), max_velocity); } - const double global_scaling = global_u_infty * global_T_variation / - std::pow(global_Omega_diameter, alpha - 2.); + if (timestep_number == 0) + return beta * max_velocity * cell_diameter; + else + { + Assert (old_time_step > 0, ExcInternalError()); - return (beta * - max_velocity * - std::min (cell_diameter, - std::pow(cell_diameter,alpha) * - max_residual / global_scaling)); + const double c_R = 0.11; + const double global_scaling = c_R * global_u_infty * global_T_variation * + std::pow(global_Omega_diameter, alpha - 2.); + + return (beta * + max_velocity * + std::min (cell_diameter, + std::pow(cell_diameter,alpha) * max_residual / + global_scaling)); + } }