Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bobmyhill committed Aug 13, 2024
1 parent 1a16ed2 commit 8f06e22
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 64 deletions.
125 changes: 62 additions & 63 deletions include/aspect/material_model/rheology/composite_visco_plastic.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,68 @@ namespace aspect
const std::vector<double> &phase_function_values = std::vector<double>(),
const std::vector<unsigned int> &n_phase_transitions_per_composition = std::vector<unsigned int>()) const;

/**
* Create the two additional material model output objects that contain the
* elastic shear moduli, elastic viscosity, ratio of computational to elastic timestep,
* and deviatoric stress of the current timestep and the reaction rates.
*/
/*
void
create_elastic_additional_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const;
*/

/**
* Given the stress of the previous time step in the material model inputs @p in,
* the elastic shear moduli @p average_elastic_shear_moduli at each point,
* and the (viscous) viscosities given in the material model outputs object @p out,
* fill a material model outputs objects with the elastic force terms, viscoelastic
* strain rate and viscous dissipation.
*/
/*
void
fill_elastic_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
const std::vector<double> &average_elastic_shear_moduli,
MaterialModel::MaterialModelOutputs<dim> &out) const;
*/

/**
* Given the stress of the previous time step in the material model inputs @p in,
* the elastic shear moduli @p average_elastic_shear_moduli at each point,
* and the (viscous) viscosities given in the material model outputs object @p out,
* fill a material model outputs (ElasticAdditionalOutputs) object with the
* average shear modulus, elastic viscosity, and the deviatoric stress of the current timestep.
*/
/*
void
fill_elastic_additional_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
const std::vector<double> &average_elastic_shear_moduli,
MaterialModel::MaterialModelOutputs<dim> &out) const;
*/

/**
* Given the stress of the previous time step in the material model inputs @p in,
* the elastic shear moduli @p average_elastic_shear_moduli at each point,
* and the (viscous) viscosities given in the material model outputs object @p out,
* compute an update to the elastic stresses and use it to fill the reaction terms
* material model output property.
*/
void
fill_reaction_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
const std::vector<double> &average_elastic_shear_moduli,
MaterialModel::MaterialModelOutputs<dim> &out) const;

/**
* Given the stress of the previous time step in the material model inputs @p in,
* the elastic shear moduli @p average_elastic_shear_moduli at each point,
* and the (viscous) viscosities given in the material model outputs object @p out,
* compute the update to the elastic stresses of the previous timestep and use it
* to fill the reaction rates material model output property.
*/
void
fill_reaction_rates (const MaterialModel::MaterialModelInputs<dim> &in,
const std::vector<double> &average_elastic_shear_moduli,
MaterialModel::MaterialModelOutputs<dim> &out) const;

private:
/**
* Compute the isostress viscosity over all compositional fields
Expand Down Expand Up @@ -207,69 +269,6 @@ namespace aspect
const double viscoplastic_stress,
std::vector<double> &partial_strain_rates) const;

/**
* Create the two additional material model output objects that contain the
* elastic shear moduli, elastic viscosity, ratio of computational to elastic timestep,
* and deviatoric stress of the current timestep and the reaction rates.
*/
/*
void
create_elastic_additional_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const;
*/

/**
* Given the stress of the previous time step in the material model inputs @p in,
* the elastic shear moduli @p average_elastic_shear_moduli at each point,
* and the (viscous) viscosities given in the material model outputs object @p out,
* fill a material model outputs objects with the elastic force terms, viscoelastic
* strain rate and viscous dissipation.
*/
/*
void
fill_elastic_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
const std::vector<double> &average_elastic_shear_moduli,
MaterialModel::MaterialModelOutputs<dim> &out) const;
*/

/**
* Given the stress of the previous time step in the material model inputs @p in,
* the elastic shear moduli @p average_elastic_shear_moduli at each point,
* and the (viscous) viscosities given in the material model outputs object @p out,
* fill a material model outputs (ElasticAdditionalOutputs) object with the
* average shear modulus, elastic viscosity, and the deviatoric stress of the current timestep.
*/
/*
void
fill_elastic_additional_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
const std::vector<double> &average_elastic_shear_moduli,
MaterialModel::MaterialModelOutputs<dim> &out) const;
*/

/**
* Given the stress of the previous time step in the material model inputs @p in,
* the elastic shear moduli @p average_elastic_shear_moduli at each point,
* and the (viscous) viscosities given in the material model outputs object @p out,
* compute an update to the elastic stresses and use it to fill the reaction terms
* material model output property.
*/
void
fill_reaction_outputs (const MaterialModel::MaterialModelInputs<dim> &in,
const std::vector<double> &average_elastic_shear_moduli,
MaterialModel::MaterialModelOutputs<dim> &out) const;

/**
* Given the stress of the previous time step in the material model inputs @p in,
* the elastic shear moduli @p average_elastic_shear_moduli at each point,
* and the (viscous) viscosities given in the material model outputs object @p out,
* compute the update to the elastic stresses of the previous timestep and use it
* to fill the reaction rates material model output property.
*/
void
fill_reaction_rates (const MaterialModel::MaterialModelInputs<dim> &in,
const std::vector<double> &average_elastic_shear_moduli,
MaterialModel::MaterialModelOutputs<dim> &out) const;

private:
/**
* Enumeration for selecting which type of viscosity averaging to use.
*/
Expand Down
2 changes: 1 addition & 1 deletion source/material_model/rheology/composite_visco_plastic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ namespace aspect
// In case the computational timestep differs from the elastic timestep,
// linearly interpolate between the two.
// The elastic viscosity has also already been scaled with the timestep ratio.
const double viscosity_ratio = effective_creep_viscosity / inverse_kelvin_viscosities[i];
const double viscosity_ratio = effective_creep_viscosity * inverse_kelvin_viscosities[i];
if (elastic_out != nullptr)
{
Expand Down

0 comments on commit 8f06e22

Please sign in to comment.