Skip to content

Commit

Permalink
Create composite material model
Browse files Browse the repository at this point in the history
  • Loading branch information
class4kayaker committed May 12, 2017
1 parent 0b7e847 commit 970d399
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 376 deletions.
49 changes: 23 additions & 26 deletions include/aspect/material_model/compositing.h
Expand Up @@ -30,11 +30,24 @@ namespace aspect
{
using namespace dealii;

/**
* A material model that applies an average of the quadrature points in a cell to
* a ''base model'' chosen from any of the other available material models.
* @ingroup MaterialModels
*/
namespace Property
{
/**
* An enum to define what material properties are available.
*/
enum MaterialProperty
{
viscosity,
density,
thermal_expansion_coefficient,
specific_heat,
thermal_conductivity,
compressibility,
entropy_derivative_pressure,
entropy_derivative_temperature,
reaction_terms
};
}

/**
* A material model that selects properties from other (non-averaging) material models.
Expand All @@ -45,23 +58,6 @@ namespace aspect
class Compositing : public MaterialModel::Interface<dim>, public ::aspect::SimulatorAccess<dim>
{
public:

/**
* An enum to define what material properties are available.
*/
enum MaterialProperty
{
viscosity,
density,
thermal_expansion_coefficient,
specific_heat,
thermal_conductivity,
compressibility,
entropy_derivative_pressure,
entropy_derivative_temperature,
reaction_terms
}

/**
* @copydoc MaterialModel::Interface::evaluate()
*/
Expand All @@ -85,7 +81,7 @@ namespace aspect
/**
* @copydoc MaterialModel::Interface::is_compressible()
*
* True/False only if all component models have same property, error otherwise.
* Returns value from material model providing compressibility.
*/
virtual bool is_compressible () const;

Expand All @@ -103,7 +99,7 @@ namespace aspect
* Parse a string representing one of the components provided by the material models,
* and return the resulting MaterialProperty value.
*/
MaterialProperty
Property::MaterialProperty
parse_property_name(const std::string &s);

/**
Expand All @@ -117,12 +113,13 @@ namespace aspect
/**
* Map specifying which components a material model is responsible for
*/
std::map<MaterialProperty, unsigned int> model_property_map;
std::map<Property::MaterialProperty, unsigned int> model_property_map;

/**
* Pointers to the material models used for compositing
*/
std::vector<std_cxx11::shared_ptr<MaterialModel::Interface<dim> > models;
std::vector<std::string> model_names;
std::vector<std_cxx11::shared_ptr<Interface<dim> > > models;
};
}
}
Expand Down

0 comments on commit 970d399

Please sign in to comment.