From e41590e3f065d103aae8187cd18c2ef256783342 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 21 Aug 2009 17:17:51 +0000 Subject: [PATCH] Choose parameters correctly, at least for 2d. git-svn-id: https://svn.dealii.org/trunk@19329 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-32/step-32.cc | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) 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)); + } } -- 2.39.5