[cig-commits] r1290 - in trunk/aspect: include/aspect/material_model source/material_model
gassmoeller at dealii.org
gassmoeller at dealii.org
Thu Oct 18 14:49:00 PDT 2012
Author: gassmoeller
Date: 2012-10-18 15:49:00 -0600 (Thu, 18 Oct 2012)
New Revision: 1290
Modified:
trunk/aspect/include/aspect/material_model/simple.h
trunk/aspect/source/material_model/simple.cc
Log:
Added a simple temperature-dependency to simple material model. Switched off by default, no changes to existing models required.
Modified: trunk/aspect/include/aspect/material_model/simple.h
===================================================================
--- trunk/aspect/include/aspect/material_model/simple.h 2012-10-18 21:37:59 UTC (rev 1289)
+++ trunk/aspect/include/aspect/material_model/simple.h 2012-10-18 21:49:00 UTC (rev 1290)
@@ -174,6 +174,7 @@
double reference_rho;
double reference_T;
double eta;
+ double thermal_viscosity_exponent;
double thermal_alpha;
double reference_specific_heat;
Modified: trunk/aspect/source/material_model/simple.cc
===================================================================
--- trunk/aspect/source/material_model/simple.cc 2012-10-18 21:37:59 UTC (rev 1289)
+++ trunk/aspect/source/material_model/simple.cc 2012-10-18 21:49:00 UTC (rev 1290)
@@ -33,12 +33,15 @@
template <int dim>
double
Simple<dim>::
- viscosity (const double,
+ viscosity (const double temperature,
const double,
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(-viscosity_exponent*delta_temp/reference_T),1e2),1e-2);
+
+ return temperature_dependence * eta;
}
@@ -206,6 +209,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$. "
@@ -234,12 +240,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();
}
@@ -256,11 +263,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