Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove option to scale grain size in lower mantle #5851

Merged
merged 3 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/modules/changes/20240607b_dannberg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Changed: The grain size material model no longer has the
option to scale the grain size in the lower mantle. This
option used to be helpful in models where the grain size
is very different between upper and lower mantle, but
now that ASPECT has particles, it is more accurate to
advect the grain size on particles instead.
<br>
(Juliane Dannberg, 2024/06/07)
1 change: 0 additions & 1 deletion include/aspect/material_model/grain_size.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ namespace aspect
double max_thermal_expansivity;
unsigned int max_latent_heat_substeps;
double min_grain_size;
double pv_grain_size_scaling;

double diffusion_viscosity (const double temperature,
const double adiabatic_temperature,
Expand Down
29 changes: 12 additions & 17 deletions source/material_model/grain_size.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1217,15 +1217,7 @@ namespace aspect
"Units: \\si{\\meter}.");
prm.declare_entry ("Lower mantle grain size scaling", "1.0",
Patterns::Double (0.),
"A scaling factor for the grain size in the lower mantle. In models where the "
"high grain size contrast between the upper and lower mantle causes numerical "
"problems, the grain size in the lower mantle can be scaled to a larger value, "
"simultaneously scaling the viscosity prefactors and grain growth parameters "
"to keep the same physical behavior. Differences to the original formulation "
"only occur when material with a smaller grain size than the recrystallization "
"grain size cross the upper-lower mantle boundary. "
"The real grain size can be obtained by dividing the model grain size by this value. "
"Units: none.");
"This option does not exist any more.");
prm.declare_entry ("Advect logarithm of grain size", "false",
Patterns::Bool (),
"This option does not exist any more.");
Expand Down Expand Up @@ -1380,6 +1372,7 @@ namespace aspect

grain_size_evolution_formulation = Formulation::parse(prm.get("Grain size evolution formulation"));

// TODO: Remove deprecated parameter in next release.
const std::string use_paleowattmeter = prm.get ("Use paleowattmeter");
Assert(use_paleowattmeter == "default",
ExcMessage("The parameter 'Use paleowattmeter' has been removed. "
Expand Down Expand Up @@ -1457,28 +1450,30 @@ namespace aspect
max_thermal_expansivity = prm.get_double ("Maximum thermal expansivity");
max_latent_heat_substeps = prm.get_integer ("Maximum latent heat substeps");
min_grain_size = prm.get_double ("Minimum grain size");
pv_grain_size_scaling = prm.get_double ("Lower mantle grain size scaling");

// scale recrystallized grain size, diffusion creep and grain growth prefactor accordingly
diffusion_creep_prefactor[diffusion_creep_prefactor.size()-1] *= std::pow(pv_grain_size_scaling,diffusion_creep_grain_size_exponent[diffusion_creep_grain_size_exponent.size()-1]);
grain_growth_rate_constant[grain_growth_rate_constant.size()-1] *= std::pow(pv_grain_size_scaling,grain_growth_exponent[grain_growth_exponent.size()-1]);
if (recrystallized_grain_size.size()>0)
recrystallized_grain_size[recrystallized_grain_size.size()-1] *= pv_grain_size_scaling;
diffusion_creep_prefactor[diffusion_creep_prefactor.size()-1] *= std::pow(1.0,diffusion_creep_grain_size_exponent[diffusion_creep_grain_size_exponent.size()-1]);
grain_growth_rate_constant[grain_growth_rate_constant.size()-1] *= std::pow(1.0,grain_growth_exponent[grain_growth_exponent.size()-1]);

// prefactors never appear without their exponents. perform some calculations here to save time later
for (unsigned int i=0; i<diffusion_creep_prefactor.size(); ++i)
diffusion_creep_prefactor[i] = std::pow(diffusion_creep_prefactor[i],-1.0/diffusion_creep_exponent[i]);
for (unsigned int i=0; i<dislocation_creep_prefactor.size(); ++i)
dislocation_creep_prefactor[i] = std::pow(dislocation_creep_prefactor[i],-1.0/dislocation_creep_exponent[i]);

if (grain_size_evolution_formulation == Formulation::paleowattmeter)
boundary_area_change_work_fraction[boundary_area_change_work_fraction.size()-1] /= pv_grain_size_scaling;
// TODO: Remove deprecated parameters in next release.
const double pv_grain_size_scaling = prm.get_double ("Lower mantle grain size scaling");
AssertThrow(pv_grain_size_scaling == 1.0,
ExcMessage("Error: The 'Lower mantle grain size scaling' parameter "
"has been removed. Please remove it from your input file. For models "
"with large spatial variations in grain size, please advect your "
"grain size on particles."));

const bool advect_log_grainsize = prm.get_bool ("Advect logarithm of grain size");
AssertThrow(advect_log_grainsize == false,
ExcMessage("Error: The 'Advect logarithm of grain size' parameter "
"has been removed. Please remove it from your input file. For models "
"with large sptial variations in grain size, please advect your "
"with large spatial variations in grain size, please advect your "
"grain size on particles."));

if (grain_growth_activation_energy.size() != grain_growth_activation_volume.size() ||
Expand Down
157 changes: 0 additions & 157 deletions tests/grain_size_growth_scaled.prm

This file was deleted.

63 changes: 0 additions & 63 deletions tests/grain_size_growth_scaled/screen-output

This file was deleted.

26 changes: 0 additions & 26 deletions tests/grain_size_growth_scaled/statistics

This file was deleted.