[cig-commits] [commit] master: Renamed functions and left comments to try to explain the steinberger model. (5019361)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed May 21 14:03:22 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/a7135c1f7697d39efff2f47a79ca1e1395cff504...73a71ba37f203bfed63bb8b602fdbd30ab99b1af
>---------------------------------------------------------------
commit 50193616b2b2e7e0a75a10a0269b11e051bf4857
Author: Rene Gassmoeller <R.Gassmoeller at mailbox.org>
Date: Wed May 21 15:24:20 2014 -0500
Renamed functions and left comments to try to explain the steinberger model.
>---------------------------------------------------------------
50193616b2b2e7e0a75a10a0269b11e051bf4857
include/aspect/material_model/steinberger.h | 59 ++++++++++++++++++++++-------
source/material_model/steinberger.cc | 19 ++++++----
2 files changed, 56 insertions(+), 22 deletions(-)
diff --git a/include/aspect/material_model/steinberger.h b/include/aspect/material_model/steinberger.h
index 098e2f4..41b4eb5 100644
--- a/include/aspect/material_model/steinberger.h
+++ b/include/aspect/material_model/steinberger.h
@@ -224,20 +224,51 @@ namespace aspect
unsigned int n_material_data;
std::string radial_viscosity_file_name;
std::string lateral_viscosity_file_name;
- virtual double get_corrected_temperature (const double temperature,
- const double pressure,
- const Point<dim> &position) const;
- virtual double get_corrected_pressure (const double temperature,
- const double pressure,
- const Point<dim> &position) const;
- virtual double get_density (const double temperature,
- const double pressure,
- const std::vector<double> &compositional_fields,
- const Point<dim> &position) const;
- virtual double get_corrected_density (const double temperature,
- const double pressure,
- const std::vector<double> &compositional_fields,
- const Point<dim> &position) const;
+
+ /**
+ * In the incompressible case we need to adjust the temperature as
+ * if there would be an adiabatic temperature increase to look up the
+ * material properties in the lookup table.
+ */
+ double get_corrected_temperature (const double temperature,
+ const double pressure,
+ const Point<dim> &position) const;
+
+ /**
+ * In the incompressible case we need to adjust the pressure as
+ * if there would be an compressible adiabatic pressure increase to
+ * look up the material properties in the lookup table. Unfortunately
+ * we do not know the adiabatic pressure profile for the incompressible
+ * case and therefore we do not know the dynamic pressure. The only
+ * currently possible solution is to use the adiabatic pressure profile
+ * only, neglecting dynamic pressure for material lookup in this case.
+ * This is essentially similar to having a depth dependent reference
+ * profile for all properties and modifying the profiles only in
+ * temperature-dimension.
+ */
+ double get_corrected_pressure (const double temperature,
+ const double pressure,
+ const Point<dim> &position) const;
+
+ /**
+ * This function returns the compressible density derived from the
+ * list of loaded lookup tables.
+ */
+ double get_compressible_density (const double temperature,
+ const double pressure,
+ const std::vector<double> &compositional_fields,
+ const Point<dim> &position) const;
+
+ /**
+ * We need to correct the compressible density in the incompressible
+ * case to an incompressible profile. This is done by dividing the
+ * compressible density with the density at this pressure at adiabatic
+ * temperature and multiplying with the surface adiabatic density.
+ */
+ double get_corrected_density (const double temperature,
+ const double pressure,
+ const std::vector<double> &compositional_fields,
+ const Point<dim> &position) const;
/**
* Pointer to an object that reads and processes data we get from
diff --git a/source/material_model/steinberger.cc b/source/material_model/steinberger.cc
index f2fd0fc..5adf275 100644
--- a/source/material_model/steinberger.cc
+++ b/source/material_model/steinberger.cc
@@ -498,18 +498,21 @@ namespace aspect
const std::vector<double> &compositional_fields,
const Point<dim> &position) const
{
- const double rho = get_density(temperature,pressure,compositional_fields,position);
+ const double rho = get_compressible_density(temperature,pressure,compositional_fields,position);
const double adiabatic_temperature = this->get_adiabatic_conditions().temperature(position);
- const double adiabatic_rho = get_density(adiabatic_temperature,
- pressure,
- compositional_fields,
- position);
+ const double adiabatic_rho = get_compressible_density(adiabatic_temperature,
+ pressure,
+ compositional_fields,
+ position);
const Point<dim> surface_point = this->get_geometry_model().representative_point(0.0);
const double surface_temperature = this->get_adiabatic_surface_temperature();
const double surface_pressure = this->get_surface_pressure();
- const double surface_rho = get_density(surface_temperature,surface_pressure,compositional_fields,surface_point);
+ const double surface_rho = get_compressible_density(surface_temperature,
+ surface_pressure,
+ compositional_fields,
+ surface_point);
//Return the density scaled to an incompressible profile
const double scaled_density = (rho / adiabatic_rho) * surface_rho;
@@ -599,7 +602,7 @@ namespace aspect
template <int dim>
double
Steinberger<dim>::
- get_density (const double temperature,
+ get_compressible_density (const double temperature,
const double pressure,
const std::vector<double> &compositional_fields,
const Point<dim> &position) const
@@ -628,7 +631,7 @@ namespace aspect
{
if (compressible
|| !(&this->get_adiabatic_conditions()))
- return get_density(temperature,pressure,compositional_fields,position);
+ return get_compressible_density(temperature,pressure,compositional_fields,position);
else
return get_corrected_density(temperature,pressure,compositional_fields,position);
}
More information about the CIG-COMMITS
mailing list