[cig-commits] r1296 - in branches/active_compositions: . include/aspect/material_model source/material_model

dannberg at dealii.org dannberg at dealii.org
Fri Oct 19 08:09:58 PDT 2012


Author: dannberg
Date: 2012-10-19 09:09:58 -0600 (Fri, 19 Oct 2012)
New Revision: 1296

Modified:
   branches/active_compositions/
   branches/active_compositions/box.prm
   branches/active_compositions/include/aspect/material_model/simple.h
   branches/active_compositions/source/material_model/simple.cc
Log:
Merge from mainline


Property changes on: branches/active_compositions
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/compositional:1141-1251
/branches/fully-nonlinear:542-728
/trunk/aspect:1257-1285
   + /branches/compositional:1141-1251
/branches/fully-nonlinear:542-728
/trunk/aspect:1257-1295

Modified: branches/active_compositions/box.prm
===================================================================
--- branches/active_compositions/box.prm	2012-10-18 23:05:04 UTC (rev 1295)
+++ branches/active_compositions/box.prm	2012-10-19 15:09:58 UTC (rev 1296)
@@ -344,7 +344,7 @@
   # into files that can be read by a graphical visualization program.
   # Additional run time parameters are read from the parameter subsection
   # 'Visualization'.
-  set List of postprocessors = visualization, velocity statistics, temperature statistics, heat flux statistics, tracers
+  set List of postprocessors = visualization, velocity statistics, temperature statistics, heat flux statistics
 
   subsection Depth average
     # The time interval between each generation of graphical output files. A

Modified: branches/active_compositions/include/aspect/material_model/simple.h
===================================================================
--- branches/active_compositions/include/aspect/material_model/simple.h	2012-10-18 23:05:04 UTC (rev 1295)
+++ branches/active_compositions/include/aspect/material_model/simple.h	2012-10-19 15:09:58 UTC (rev 1296)
@@ -181,6 +181,7 @@
         double reference_rho;
         double reference_T;
         double eta;
+        double thermal_viscosity_exponent;
         double thermal_alpha;
         double reference_specific_heat;
 

Modified: branches/active_compositions/source/material_model/simple.cc
===================================================================
--- branches/active_compositions/source/material_model/simple.cc	2012-10-18 23:05:04 UTC (rev 1295)
+++ branches/active_compositions/source/material_model/simple.cc	2012-10-19 15:09:58 UTC (rev 1296)
@@ -33,13 +33,16 @@
     template <int dim>
     double
     Simple<dim>::
-    viscosity (const double,
+    viscosity (const double temperature,
                const double,
                const std::vector<double> &composition,       /*composition*/
                const SymmetricTensor<2,dim> &,
                const Point<dim> &) const
     {
-      return eta;
+      const double delta_temp = temperature-reference_T;
+      const double temperature_dependence = std::max(std::min(std::exp(-thermal_viscosity_exponent*delta_temp/reference_T),1e2),1e-2);
+
+      return temperature_dependence * eta;
 /*      return (this->n_compositional_fields()>0
           ?
           (6.5*composition[0]+1) * eta
@@ -219,6 +222,9 @@
           prm.declare_entry ("Viscosity", "5e24",
                              Patterns::Double (0),
                              "The value of the constant viscosity. Units: $kg/m/s$.");
+          prm.declare_entry ("Thermal viscosity exponent", "0.0",
+                             Patterns::Double (0),
+                             "The temperature dependence of viscosity. Dimensionless exponent.");
           prm.declare_entry ("Thermal conductivity", "4.7",
                              Patterns::Double (0),
                              "The value of the thermal conductivity $k$. "
@@ -247,12 +253,13 @@
       {
         prm.enter_subsection("Simple model");
         {
-          reference_rho     = prm.get_double ("Reference density");
-          reference_T = prm.get_double ("Reference temperature");
-          eta                   = prm.get_double ("Viscosity");
-          k_value               = prm.get_double ("Thermal conductivity");
-          reference_specific_heat = prm.get_double ("Reference specific heat");
-          thermal_alpha = prm.get_double ("Thermal expansion coefficient");
+          reference_rho              = prm.get_double ("Reference density");
+          reference_T                = prm.get_double ("Reference temperature");
+          eta                        = prm.get_double ("Viscosity");
+          thermal_viscosity_exponent = prm.get_double ("Thermal viscosity exponent");
+          k_value                    = prm.get_double ("Thermal conductivity");
+          reference_specific_heat    = prm.get_double ("Reference specific heat");
+          thermal_alpha              = prm.get_double ("Thermal expansion coefficient");
         }
         prm.leave_subsection();
       }
@@ -269,11 +276,14 @@
     ASPECT_REGISTER_MATERIAL_MODEL(Simple,
                                    "simple",
                                    "A simple material model that has constant values "
-                                   "for all coefficients but the density. This model uses "
-                                   "the formulation that assumes an incompressible medium "
-                                   "despite the fact that the density follows the law "
-                                   "$\\rho(T)=\\rho_0(1-\\beta(T-T_{\\text{ref}})$. The value for "
-                                   "the components of this formula and additional "
+                                   "for all coefficients but the density and viscosity. "
+                                   "This model uses the formulation that assumes an incompressible"
+                                   " medium despite the fact that the density follows the law "
+                                   "$\\rho(T)=\\rho_0(1-\\beta(T-T_{\\text{ref}})$. "
+                                   "The temperature dependency of viscosity is "
+                                   " switched off by default and follows the formula"
+                                   "$\\eta(T)=\\eta_0*e^{\\eta_T*\\Delta T / T_{\\text{ref}})}$."
+                                   "The value for the components of this formula and additional "
                                    "parameters are read from the parameter file in subsection "
                                    "'Simple model'.")
   }



More information about the CIG-COMMITS mailing list