Skip to content

Commit

Permalink
Unify conductivity code in materials
Browse files Browse the repository at this point in the history
  • Loading branch information
gassmoeller committed Jan 27, 2025
1 parent a20ee6a commit 3105fc9
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 320 deletions.
29 changes: 5 additions & 24 deletions include/aspect/material_model/entropy_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <aspect/utilities.h>
#include <aspect/simulator_access.h>
#include <aspect/material_model/thermal_conductivity/interface.h>
#include <aspect/material_model/rheology/ascii_depth_profile.h>
#include <aspect/material_model/rheology/drucker_prager.h>
#include <aspect/material_model/steinberger.h>
Expand Down Expand Up @@ -125,31 +126,11 @@ namespace aspect
double max_lateral_eta_variation;

/**
* The value for thermal conductivity. It can be a constant
* for the whole domain, or P-T dependent.
* The thermal conductivity parametrization to use. This material
* model supports either a constant thermal conductivity or a
* pressure- and temperature-dependent thermal conductivity.
*/
double thermal_conductivity_value;
double thermal_conductivity (const double temperature,
const double pressure,
const Point<dim> &position) const;

enum ConductivityFormulation
{
constant,
p_T_dependent
} conductivity_formulation;

/**
* Parameters for the temperature- and pressure dependence of the
* thermal conductivity.
*/
std::vector<double> conductivity_transition_depths;
std::vector<double> reference_thermal_conductivities;
std::vector<double> conductivity_pressure_dependencies;
std::vector<double> conductivity_reference_temperatures;
std::vector<double> conductivity_exponents;
std::vector<double> saturation_scaling;
double maximum_conductivity;
std::unique_ptr<ThermalConductivity::Interface<dim>> thermal_conductivity;

/**
* Information about the location of data files.
Expand Down
45 changes: 7 additions & 38 deletions include/aspect/material_model/steinberger.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <aspect/material_model/interface.h>
#include <aspect/material_model/equation_of_state/thermodynamic_table_lookup.h>
#include <aspect/material_model/thermal_conductivity/interface.h>

#include <aspect/simulator_access.h>
#include <deal.II/fe/component_mask.h>
Expand Down Expand Up @@ -118,7 +119,8 @@ namespace aspect
* The viscosity of this model is based on the paper
* Steinberger & Calderwood 2006: "Models of large-scale viscous flow in the
* Earth's mantle with constraints from mineral physics and surface
* observations". The thermal conductivity is constant and the other
* observations". The thermal conductivity is constant or following a
* pressure-temperature dependent approximation and the other
* parameters are provided via lookup tables from the software PERPLEX.
*
* @ingroup MaterialModels
Expand Down Expand Up @@ -204,19 +206,6 @@ namespace aspect


private:
/**
* Compute the pressure- and temperature-dependent thermal
* conductivity either as a constant value, or based on the
* equation given in Stackhouse et al., 2015: First-principles
* calculations of the lattice thermal conductivity of the
* lower mantle, or based on the equation given in Tosi et al.,
* 2013: Mantle dynamics with pressure- and temperature-dependent
* thermal expansivity and conductivity.
*/
double thermal_conductivity (const double temperature,
const double pressure,
const Point<dim> &position) const;

/**
* Whether the compositional fields representing mass fractions
* should be normalized to one when computing their fractions
Expand Down Expand Up @@ -250,31 +239,11 @@ namespace aspect
bool use_lateral_average_temperature;

/**
* The value of the thermal conductivity if a constant thermal
* conductivity is used for the whole domain.
*/
double thermal_conductivity_value;

/**
* Enumeration for selecting which type of conductivity law to use.
*/
enum ConductivityFormulation
{
constant,
p_T_dependent
} conductivity_formulation;

/**
* Parameters for the temperature- and pressure dependence of the
* thermal conductivity.
* The thermal conductivity parametrization to use. This material
* model supports either a constant thermal conductivity or a
* pressure- and temperature-dependent thermal conductivity.
*/
std::vector<double> conductivity_transition_depths;
std::vector<double> reference_thermal_conductivities;
std::vector<double> conductivity_pressure_dependencies;
std::vector<double> conductivity_reference_temperatures;
std::vector<double> conductivity_exponents;
std::vector<double> saturation_scaling;
double maximum_conductivity;
std::unique_ptr<ThermalConductivity::Interface<dim>> thermal_conductivity;

/**
* Compositional prefactors with which to multiply the reference viscosity.
Expand Down
Loading

0 comments on commit 3105fc9

Please sign in to comment.