]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Choose parameters correctly, at least for 2d.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 21 Aug 2009 17:17:51 +0000 (17:17 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 21 Aug 2009 17:17:51 +0000 (17:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@19329 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-32/step-32.cc

index a702b6cd9cc1341441fd0a78d0c6a211ecd9e264..b1193d003c97a327d3c2e3c41a79b0379e160703 100644 (file)
@@ -1214,7 +1214,7 @@ compute_viscosity (const std::vector<double>          &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<double>          &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));
+    }
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.