ASPECT
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup Class Reference
Inheritance diagram for aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup:
Inheritance graph
[legend]

Public Member Functions

double specific_heat (const double temperature, const double pressure) const
 
double density (const double temperature, const double pressure) const
 
double thermal_expansivity (const double temperature, const double pressure) const
 
double seismic_Vp (const double temperature, const double pressure) const
 
double seismic_Vs (const double temperature, const double pressure) const
 
double enthalpy (const double temperature, const double pressure) const
 
double dHdT (const double temperature, const double pressure) const
 
double dHdp (const double temperature, const double pressure) const
 
std::array< std::pair< double, unsigned int >, 2 > enthalpy_derivatives (const std::vector< double > &temperatures, const std::vector< double > &pressures, const unsigned int n_substeps=1) const
 
double dRhodp (const double temperature, const double pressure) const
 
unsigned int dominant_phase (const double temperature, const double pressure) const
 
bool has_dominant_phase () const
 
std::vector< std::string > phase_volume_column_names () const
 
double phase_volume_fraction (const int phase_id, const double temperature, const double pressure) const
 
std::array< double, 2 > get_pT_steps () const
 
const std::vector< std::string > & get_dominant_phase_names () const
 

Protected Member Functions

double value (const double temperature, const double pressure, const Table< 2, double > &values, const bool interpol) const
 
unsigned int value (const double temperature, const double pressure, const Table< 2, unsigned int > &values) const
 
double get_nT (const double temperature) const
 
double get_np (const double pressure) const
 

Protected Attributes

::Table< 2, double > density_values
 
::Table< 2, double > thermal_expansivity_values
 
::Table< 2, double > specific_heat_values
 
::Table< 2, double > vp_values
 
::Table< 2, double > vs_values
 
::Table< 2, double > enthalpy_values
 
::Table< 2, unsigned int > dominant_phase_indices
 
std::vector< std::string > phase_column_names
 
std::vector<::Table< 2, double > > phase_volume_fractions
 
double delta_press
 
double min_press
 
double max_press
 
double delta_temp
 
double min_temp
 
double max_temp
 
unsigned int n_temperature
 
unsigned int n_pressure
 
unsigned int n_phases
 
unsigned int n_columns
 
bool interpolation
 
bool has_dominant_phase_column
 
std::vector< std::string > dominant_phase_names
 

Detailed Description

A base class that can be used to look up material data from an external data source (e.g. a table in a file). The class consists of data members and functions to access this data, but it does not contain the functions to read this data, which has to be implemented in a derived class.

Definition at line 64 of file utilities.h.

Member Function Documentation

§ specific_heat()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::specific_heat ( const double  temperature,
const double  pressure 
) const

§ density()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::density ( const double  temperature,
const double  pressure 
) const

§ thermal_expansivity()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::thermal_expansivity ( const double  temperature,
const double  pressure 
) const

§ seismic_Vp()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::seismic_Vp ( const double  temperature,
const double  pressure 
) const

§ seismic_Vs()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::seismic_Vs ( const double  temperature,
const double  pressure 
) const

§ enthalpy()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::enthalpy ( const double  temperature,
const double  pressure 
) const

§ dHdT()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::dHdT ( const double  temperature,
const double  pressure 
) const

Computes the derivative of enthalpy for temperature, using the resolution of the read-in table to compute a finite-difference approximation of the derivative.

§ dHdp()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::dHdp ( const double  temperature,
const double  pressure 
) const

Computes the derivative of enthalpy for pressure, using the resolution of the read-in table to compute a finite-difference approximation of the derivative.

§ enthalpy_derivatives()

std::array<std::pair<double, unsigned int>,2> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::enthalpy_derivatives ( const std::vector< double > &  temperatures,
const std::vector< double > &  pressures,
const unsigned int  n_substeps = 1 
) const

Compute the enthalpy derivatives for temperature and pressure given a set of temperature and pressure points, which will be used as support points for the finite difference scheme. This is useful to not 'miss' phase transitions that are not resolved in the dHdT and dHdp functions. The third argument represents the number of substeps taken to compute this average. A number larger than one means the temperature-pressure range that is spanned by the first two input arguments is separated into n_substeps equally spaced pressure-temperature steps, the derivatives are computed for each substep and then averaged.

§ dRhodp()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::dRhodp ( const double  temperature,
const double  pressure 
) const

§ dominant_phase()

unsigned int aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::dominant_phase ( const double  temperature,
const double  pressure 
) const

Returns the index that indicates the phase with the largest volume fraction at a given temperature and pressure.

§ has_dominant_phase()

bool aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::has_dominant_phase ( ) const

Returns whether a lookup has a column that indicates which is the phase with the largest volume fraction is this material.

§ phase_volume_column_names()

std::vector<std::string> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::phase_volume_column_names ( ) const

Returns a vector of all the column names in the lookup file that start with the character string vol_fraction_

§ phase_volume_fraction()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::phase_volume_fraction ( const int  phase_id,
const double  temperature,
const double  pressure 
) const

Returns the volume fraction of the phase_idth phase at a given temperature and pressure.

§ get_pT_steps()

std::array<double,2> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::get_pT_steps ( ) const

Returns the size of the data tables in pressure (first entry) and temperature (second entry) dimensions.

§ get_dominant_phase_names()

const std::vector<std::string>& aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::get_dominant_phase_names ( ) const

Get the list of names of all of the dominant phases in a given lookup table as given by the phase column. The names of the phases are stored in the order they first appear in the table.

§ value() [1/2]

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::value ( const double  temperature,
const double  pressure,
const Table< 2, double > &  values,
const bool  interpol 
) const
protected

Access that data value of the property that is stored in table values at pressure pressure and temperature temperature. interpol controls whether to perform linear interpolation between the closest data points, or simply use the closest point value.

§ value() [2/2]

unsigned int aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::value ( const double  temperature,
const double  pressure,
const Table< 2, unsigned int > &  values 
) const
protected

Access that data value of the property that is stored in table values at pressure pressure and temperature temperature using the closest point value.

§ get_nT()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::get_nT ( const double  temperature) const
protected

Find the position in a data table given a temperature.

§ get_np()

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::get_np ( const double  pressure) const
protected

Find the position in a data table given a pressure.

Member Data Documentation

§ density_values

::Table<2,double> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::density_values
protected

Definition at line 213 of file utilities.h.

§ thermal_expansivity_values

::Table<2,double> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::thermal_expansivity_values
protected

Definition at line 214 of file utilities.h.

§ specific_heat_values

::Table<2,double> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::specific_heat_values
protected

Definition at line 215 of file utilities.h.

§ vp_values

::Table<2,double> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::vp_values
protected

Definition at line 216 of file utilities.h.

§ vs_values

::Table<2,double> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::vs_values
protected

Definition at line 217 of file utilities.h.

§ enthalpy_values

::Table<2,double> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::enthalpy_values
protected

Definition at line 218 of file utilities.h.

§ dominant_phase_indices

::Table<2,unsigned int> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::dominant_phase_indices
protected

Definition at line 219 of file utilities.h.

§ phase_column_names

std::vector<std::string> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::phase_column_names
protected

The vector of column names corresponding to each phase, and a vector of tables containing the volume fractions of each phase at a given temperature and pressure. The ordering of both vectors is the same.

Definition at line 227 of file utilities.h.

§ phase_volume_fractions

std::vector<::Table<2,double> > aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::phase_volume_fractions
protected

Definition at line 228 of file utilities.h.

§ delta_press

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::delta_press
protected

Definition at line 230 of file utilities.h.

§ min_press

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::min_press
protected

Definition at line 231 of file utilities.h.

§ max_press

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::max_press
protected

Definition at line 232 of file utilities.h.

§ delta_temp

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::delta_temp
protected

Definition at line 233 of file utilities.h.

§ min_temp

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::min_temp
protected

Definition at line 234 of file utilities.h.

§ max_temp

double aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::max_temp
protected

Definition at line 235 of file utilities.h.

§ n_temperature

unsigned int aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::n_temperature
protected

Definition at line 236 of file utilities.h.

§ n_pressure

unsigned int aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::n_pressure
protected

Definition at line 237 of file utilities.h.

§ n_phases

unsigned int aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::n_phases
protected

Definition at line 238 of file utilities.h.

§ n_columns

unsigned int aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::n_columns
protected

Definition at line 239 of file utilities.h.

§ interpolation

bool aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::interpolation
protected

Definition at line 240 of file utilities.h.

§ has_dominant_phase_column

bool aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::has_dominant_phase_column
protected

Definition at line 241 of file utilities.h.

§ dominant_phase_names

std::vector<std::string> aspect::MaterialModel::MaterialUtilities::Lookup::MaterialLookup::dominant_phase_names
protected

Definition at line 242 of file utilities.h.


The documentation for this class was generated from the following file: