ASPECT
|
Static Public Member Functions | |
static void | declare_parameters (ParameterHandler &prm) |
Static Public Member Functions inherited from aspect::SimulatorAccess< dim > | |
static void | get_composition_values_at_q_point (const std::vector< std::vector< double >> &composition_values, const unsigned int q, std::vector< double > &composition_values_at_q_point) |
Private Types | |
enum | formats { perplex, hefesto } |
Private Member Functions | |
void | evaluate_thermal_enthalpy_derivatives (const MaterialModel::MaterialModelInputs< dim > &in, std::vector< MaterialModel::EquationOfStateOutputs< dim >> &eos_outputs) const |
std::array< std::pair< double, unsigned int >, 2 > | enthalpy_derivatives (const typename Interface< dim >::MaterialModelInputs &in) const |
void | fill_seismic_velocities (const MaterialModel::MaterialModelInputs< dim > &in, const std::vector< double > &composite_densities, const std::vector< std::vector< double >> &volume_fractions, SeismicAdditionalOutputs< dim > *seismic_out) const |
void | fill_phase_volume_fractions (const MaterialModel::MaterialModelInputs< dim > &in, const std::vector< std::vector< double >> &volume_fractions, NamedAdditionalMaterialOutputs< dim > *phase_volume_fractions_out) const |
void | fill_dominant_phases (const MaterialModel::MaterialModelInputs< dim > &in, const std::vector< std::vector< double >> &volume_fractions, PhaseOutputs< dim > &dominant_phases_out) const |
Private Attributes | |
unsigned int | n_material_lookups |
bool | use_bilinear_interpolation |
bool | latent_heat |
std::string | data_directory |
std::vector< std::string > | material_file_names |
std::vector< std::string > | derivatives_file_names |
unsigned int | max_latent_heat_substeps |
enum aspect::MaterialModel::EquationOfState::ThermodynamicTableLookup::formats | material_file_format |
std::vector< std::unique_ptr< MaterialModel::MaterialUtilities::Lookup::MaterialLookup > > | material_lookup |
std::vector< std::string > | unique_phase_names |
std::vector< std::vector< unsigned int > > | unique_phase_indices |
std::vector< std::string > | list_of_dominant_phases |
std::vector< std::vector< unsigned int > > | global_index_of_lookup_phase |
An equation of state class that reads thermodynamic properties from pressure-temperature tables in input files. These input files can be created using codes such as Perple_X or HeFESTo.
Definition at line 43 of file thermodynamic_table_lookup.h.
|
private |
The format of the provided material files. Currently we support the Perple_X and HeFESTo data formats.
Enumerator | |
---|---|
perplex | |
hefesto |
Definition at line 127 of file thermodynamic_table_lookup.h.
void aspect::MaterialModel::EquationOfState::ThermodynamicTableLookup< dim >::initialize | ( | ) |
Initialization function. Loads the material data and sets up pointers.
|
virtual |
Returns the number of lookups
bool aspect::MaterialModel::EquationOfState::ThermodynamicTableLookup< dim >::is_compressible | ( | ) | const |
Return whether the model is compressible or not. Incompressibility does not necessarily imply that the density is constant; rather, it may still depend on temperature or pressure. In the current context, compressibility means whether we should solve the continuity equation as \(\nabla \cdot (\rho \mathbf u)=0\) (compressible Stokes) or as \(\nabla \cdot \mathbf{u}=0\) (incompressible Stokes).
void aspect::MaterialModel::EquationOfState::ThermodynamicTableLookup< dim >::evaluate | ( | const MaterialModel::MaterialModelInputs< dim > & | in, |
std::vector< MaterialModel::EquationOfStateOutputs< dim >> & | eos_outputs | ||
) | const |
Function to compute the thermodynamic properties in out
given the inputs in in
over all evaluation points. This function also fills the mass_fraction and volume_fraction vectors.
void aspect::MaterialModel::EquationOfState::ThermodynamicTableLookup< dim >::fill_additional_outputs | ( | const MaterialModel::MaterialModelInputs< dim > & | in, |
const std::vector< std::vector< double >> & | volume_fractions, | ||
MaterialModel::MaterialModelOutputs< dim > & | out | ||
) | const |
Function to fill the seismic velocity and phase volume additional outputs
|
static |
Declare the parameters this class takes through input files.
void aspect::MaterialModel::EquationOfState::ThermodynamicTableLookup< dim >::parse_parameters | ( | ParameterHandler & | prm | ) |
Read the parameters this class declares from the parameter file.
void aspect::MaterialModel::EquationOfState::ThermodynamicTableLookup< dim >::create_additional_named_outputs | ( | MaterialModel::MaterialModelOutputs< dim > & | out | ) | const |
const MaterialModel::MaterialUtilities::Lookup::MaterialLookup& aspect::MaterialModel::EquationOfState::ThermodynamicTableLookup< dim >::get_material_lookup | ( | unsigned int | lookup_index | ) | const |
|
private |
Compute the specific heat and thermal expansivity using the pressure and temperature derivatives of the specific enthalpy. This evaluation incorporates the effects of latent heat production.
|
private |
Returns the cell-wise averaged enthalpy derivatives for the evaluate function and postprocessors. The function returns two pairs, the first one represents the temperature derivative, the second one the pressure derivative. The first member of each pair is the derivative, the second one the number of vertex combinations the function could use to compute the derivative. The second member is useful to handle the case no suitable combination of vertices could be found (e.g. if the temperature and pressure on all vertices of the current cell is identical.
|
private |
|
private |
This function uses the MaterialModelInputs &in to fill the output_values of the phase_volume_fractions_out output object with the volume fractions of each of the unique phases at each of the evaluation points. These volume fractions are obtained from the Perple_X- or HeFESTo-derived pressure-temperature lookup tables. The filled output_values object is a vector of vector<double>; the outer vector is expected to have a size that equals the number of unique phases, the inner vector is expected to have a size that equals the number of evaluation points.
|
private |
This function uses the MaterialModelInputs &in to fill the output_values of the dominant_phases_out output object with the index of the dominant phase at each of the evaluation points. The phases are obtained from the Perple_X- or HeFESTo-derived pressure-temperature lookup tables. The filled output_values object is a vector of vector<unsigned int>; the outer vector is expected to have a size of 1, the inner vector is expected to have a size that equals the number of evaluation points.
|
private |
Definition at line 106 of file thermodynamic_table_lookup.h.
|
private |
Definition at line 107 of file thermodynamic_table_lookup.h.
|
private |
Definition at line 108 of file thermodynamic_table_lookup.h.
|
private |
Information about the location of data files.
Definition at line 113 of file thermodynamic_table_lookup.h.
|
private |
Definition at line 114 of file thermodynamic_table_lookup.h.
|
private |
Definition at line 115 of file thermodynamic_table_lookup.h.
|
private |
The maximum number of substeps over the temperature pressure range to calculate the averaged enthalpy gradient over a cell
Definition at line 121 of file thermodynamic_table_lookup.h.
|
private |
|
private |
List of pointers to objects that read and process data we get from material data files. There is one pointer/object per lookup file.
Definition at line 137 of file thermodynamic_table_lookup.h.
|
private |
Vector of strings containing the names of the unique phases in all the material lookups.
Definition at line 142 of file thermodynamic_table_lookup.h.
|
private |
Vector of vector of unsigned ints which constitutes mappings between lookup phase name vectors and unique_phase_names. The element unique_phase_indices[i][j] contains the index of phase name j from lookup i as it is found in unique_phase_names.
Definition at line 150 of file thermodynamic_table_lookup.h.
|
private |
Vector of strings containing the names of the dominant phases in all the material lookups. In case the lookup table contains one string with the dominant phase rather than separate columns with volume fraction for each phase, this vector will be used instead of the unique_phase_names vector above.
Definition at line 158 of file thermodynamic_table_lookup.h.
|
private |
Each lookup table reads in their own dominant phases and assigns indices based on all phases in that particular lookup. Since a model can have more than one lookup, it might have more phases than present in each lookup. We want to output unique/consistent indices for each phase, so we have to convert the indices of a phase in the individual lookup to the index in the global list of phases. This vector of vectors of unsigned int stores the global index for each lookup (so there are as many inner vectors as lookups, and each one stores the indices for an individual lookup, to be filled in the initialize function).
In case the lookup table contains one string with the dominant phase rather than separate columns with volume fraction for each phase, this vector will be used instead of the unique_phase_indices vector above.
Definition at line 174 of file thermodynamic_table_lookup.h.