From ef44e64c2d1b8e53eda1825574fca728beaf8b36 Mon Sep 17 00:00:00 2001 From: Juliane Dannberg Date: Fri, 7 Jun 2024 20:31:48 +0200 Subject: [PATCH 1/3] remove option to scale grain size in lower mantle --- doc/modules/changes/20240607b_dannberg | 8 +++++++ include/aspect/material_model/grain_size.h | 1 - source/material_model/grain_size.cc | 25 ++++++++-------------- 3 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 doc/modules/changes/20240607b_dannberg diff --git a/doc/modules/changes/20240607b_dannberg b/doc/modules/changes/20240607b_dannberg new file mode 100644 index 00000000000..d20999a73fb --- /dev/null +++ b/doc/modules/changes/20240607b_dannberg @@ -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. +
+(Juliane Dannberg, 2024/06/07) diff --git a/include/aspect/material_model/grain_size.h b/include/aspect/material_model/grain_size.h index d01fb8e29fb..6aed6159ddc 100644 --- a/include/aspect/material_model/grain_size.h +++ b/include/aspect/material_model/grain_size.h @@ -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, diff --git a/source/material_model/grain_size.cc b/source/material_model/grain_size.cc index 90b61dcedea..2cc5fef058d 100644 --- a/source/material_model/grain_size.cc +++ b/source/material_model/grain_size.cc @@ -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."); @@ -1457,13 +1449,10 @@ 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 Date: Sat, 8 Jun 2024 19:59:37 +0200 Subject: [PATCH 2/3] address comment --- source/material_model/grain_size.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/material_model/grain_size.cc b/source/material_model/grain_size.cc index 2cc5fef058d..7d07837c96d 100644 --- a/source/material_model/grain_size.cc +++ b/source/material_model/grain_size.cc @@ -1372,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. " @@ -1460,18 +1461,19 @@ namespace aspect for (unsigned int i=0; i Date: Sun, 9 Jun 2024 03:23:43 +0200 Subject: [PATCH 3/3] remove test --- tests/grain_size_growth_scaled.prm | 157 ------------------- tests/grain_size_growth_scaled/screen-output | 63 -------- tests/grain_size_growth_scaled/statistics | 26 --- 3 files changed, 246 deletions(-) delete mode 100644 tests/grain_size_growth_scaled.prm delete mode 100644 tests/grain_size_growth_scaled/screen-output delete mode 100644 tests/grain_size_growth_scaled/statistics diff --git a/tests/grain_size_growth_scaled.prm b/tests/grain_size_growth_scaled.prm deleted file mode 100644 index 597bc41c645..00000000000 --- a/tests/grain_size_growth_scaled.prm +++ /dev/null @@ -1,157 +0,0 @@ -# This is a very simple test case that checks -# that the implementation of the grain growth -# laws are correct, and if they work with the -# lower mantle grain size scaling (which is -# a parameter introduced to reduce numerical problems -# resulting from large contrasts in grain size between -# the lower mantle and transition zone. All parameters, -# including temperature and pressure, are set to constant -# values and no dynamic recrystallization is -# included (the reciprocal required strain is -# set to zero). Material flows in from the left -# and flows out at the right boundary with a constant -# velocity. The grain size -# should then only depend on the x coordinate -# following the relation -# -# d(x) = (d_0 + A * x)^(1/p) -# -# with -# d_0 = 8e-5 m (initial grain size) -# p = 10 (grain size exponent) -# A = 2.0294e-46 1/m -# -# leading to a grain size of d=8.8957E-5 m at the -# right boundary of the model. - -############### Global parameters - -set Dimension = 2 -set End time = 50000 -set Use years in output instead of seconds = true -set Surface pressure = 0 -set Adiabatic surface temperature = 1600 - -subsection Geometry model - set Model name = box - - subsection Box - set X extent = 100000 - set Y extent = 100000 - end -end - -subsection Boundary temperature model - set Fixed temperature boundary indicators = top,bottom - set List of model names = initial temperature - - subsection Initial temperature - set Minimal temperature = 1400 - end -end - -subsection Boundary composition model - set Fixed composition boundary indicators = left - set List of model names = initial composition -end - -subsection Boundary velocity model - set Tangential velocity boundary indicators = bottom,top - set Prescribed velocity boundary indicators = left:function,right:function - - subsection Function - set Function expression = 0.1;0 - end -end - -# Warning: Merge the parameter in the following subsection with any -# other parameter of the same name, otherwise your model results might change -subsection Heating model - set List of model names = adiabatic heating -end - -subsection Gravity model - set Model name = vertical - - subsection Vertical - set Magnitude = 0.0 - end -end - -subsection Initial temperature model - set Model name = adiabatic - - subsection Adiabatic - set Age top boundary layer = 0 - - subsection Function - set Function expression = 0 - end - end -end - -subsection Initial composition model - set Model name = function - - subsection Function - set Variable names = x,z - set Function constants = - set Function expression = if(z<50000,8e-4,8.00001e-4) - end -end - -subsection Compositional fields - set Number of fields = 1 - set Names of fields = grain_size -end - -subsection Material model - set Model name = grain size - - subsection Grain size model - set Reference density = 3400 - set Thermal conductivity = 0 - set Thermal expansion coefficient = 0 - set Reference compressibility = 0 - set Viscosity = 1e18 - set Reference temperature = 1600 - set Recrystallized grain size = - set Grain growth activation energy = 3e5 - set Grain growth activation volume = 0.0 - set Grain growth rate constant = 4E-045 - set Grain growth exponent = 10 - set Grain size evolution formulation = paleowattmeter - set Reciprocal required strain = 0 - set Lower mantle grain size scaling = 10 - - # Faul and Jackson 2007 - # Diffusion creep - # new scaled prefactors to match vertical viscosity profile - set Diffusion creep prefactor = 1.5e-024 # s^-1 Pa^-1 m^p - set Diffusion creep exponent = 1.0 # 1 for diffusion creep - set Diffusion creep grain size exponent = 3 - set Diffusion activation energy = 3e5 #J/mol - set Diffusion activation volume = 2e-6 # m^3/mol (from Karato 2010) - - # Kawazoe et al. (2009) - # Dislocation creep - set Dislocation creep prefactor = 1.1E-016 # s^-1 Pa^-n - set Dislocation creep exponent = 3.5 - set Dislocation activation energy = 530000 # J/mol - set Dislocation activation volume = 1.40E-005 # m^3/mol - end -end - -subsection Mesh refinement - set Initial adaptive refinement = 0 - set Initial global refinement = 5 - set Time steps between mesh refinement = 0 -end - -subsection Postprocess - set List of postprocessors = composition statistics,temperature statistics, velocity statistics -end - -subsection Solver parameters - set Temperature solver tolerance = 1e-7 -end diff --git a/tests/grain_size_growth_scaled/screen-output b/tests/grain_size_growth_scaled/screen-output deleted file mode 100644 index 5f3e40b883e..00000000000 --- a/tests/grain_size_growth_scaled/screen-output +++ /dev/null @@ -1,63 +0,0 @@ - -Number of active cells: 1,024 (on 6 levels) -Number of degrees of freedom: 17,989 (8,450+1,089+4,225+4,225) - -*** Timestep 0: t=0 years, dt=0 years - Solving temperature system... 0 iterations. - Solving grain_size system ... 0 iterations. - Rebuilding Stokes preconditioner... - Solving Stokes system... 28+0 iterations. - - Postprocessing: - Compositions min/max/mass: 0.0008/0.0008/8e+06 - Temperature min/avg/max: 1600 K, 1600 K, 1600 K - RMS, max velocity: 0.1 m/year, 0.1 m/year - -*** Timestep 1: t=15625 years, dt=15625 years - Solving temperature system... 0 iterations. - Solving grain_size system ... 16 iterations. - Rebuilding Stokes preconditioner... - Solving Stokes system... 0+0 iterations. - - Postprocessing: - Compositions min/max/mass: 0.0008/0.0008023/8.023e+06 - Temperature min/avg/max: 1600 K, 1600 K, 1600 K - RMS, max velocity: 0.1 m/year, 0.1 m/year - -*** Timestep 2: t=31250 years, dt=15625 years - Solving temperature system... 0 iterations. - Solving grain_size system ... 15 iterations. - Rebuilding Stokes preconditioner... - Solving Stokes system... 0+0 iterations. - - Postprocessing: - Compositions min/max/mass: 0.0008/0.0008046/8.045e+06 - Temperature min/avg/max: 1600 K, 1600 K, 1600 K - RMS, max velocity: 0.1 m/year, 0.1 m/year - -*** Timestep 3: t=46875 years, dt=15625 years - Solving temperature system... 0 iterations. - Solving grain_size system ... 16 iterations. - Rebuilding Stokes preconditioner... - Solving Stokes system... 0+0 iterations. - - Postprocessing: - Compositions min/max/mass: 0.0008/0.0008068/8.066e+06 - Temperature min/avg/max: 1600 K, 1600 K, 1600 K - RMS, max velocity: 0.1 m/year, 0.1 m/year - -*** Timestep 4: t=50000 years, dt=3125.02 years - Solving temperature system... 0 iterations. - Solving grain_size system ... 6 iterations. - Rebuilding Stokes preconditioner... - Solving Stokes system... 0+0 iterations. - - Postprocessing: - Compositions min/max/mass: 0.0008/0.0008072/8.07e+06 - Temperature min/avg/max: 1600 K, 1600 K, 1600 K - RMS, max velocity: 0.1 m/year, 0.1 m/year - -Termination requested by criterion: end time - - - diff --git a/tests/grain_size_growth_scaled/statistics b/tests/grain_size_growth_scaled/statistics deleted file mode 100644 index b0f11a30e6a..00000000000 --- a/tests/grain_size_growth_scaled/statistics +++ /dev/null @@ -1,26 +0,0 @@ -# 1: Time step number -# 2: Time (years) -# 3: Time step size (years) -# 4: Number of mesh cells -# 5: Number of Stokes degrees of freedom -# 6: Number of temperature degrees of freedom -# 7: Number of degrees of freedom for all compositions -# 8: Iterations for temperature solver -# 9: Iterations for composition solver 1 -# 10: Iterations for Stokes solver -# 11: Velocity iterations in Stokes preconditioner -# 12: Schur complement iterations in Stokes preconditioner -# 13: Minimal value for composition grain_size -# 14: Maximal value for composition grain_size -# 15: Global mass for composition grain_size -# 16: Minimal temperature (K) -# 17: Average temperature (K) -# 18: Maximal temperature (K) -# 19: Average nondimensional temperature (K) -# 20: RMS velocity (m/year) -# 21: Max. velocity (m/year) -0 0.000000000000e+00 0.000000000000e+00 1024 9539 4225 4225 0 0 27 29 29 8.00000000e-04 8.00001000e-04 8.00000505e+06 1.60000000e+03 1.60000000e+03 1.60000000e+03 1.43725459e-15 1.00000005e-01 1.00000036e-01 -1 1.562499433166e+04 1.562499433166e+04 1024 9539 4225 4225 0 16 4294967295 0 0 8.00000000e-04 8.02332596e-04 8.02289796e+06 1.60000000e+03 1.60000000e+03 1.60000000e+03 1.43725459e-15 1.00000005e-01 1.00000036e-01 -2 3.124998866333e+04 1.562499433166e+04 1024 9539 4225 4225 0 15 4294967295 0 0 8.00000000e-04 8.04586056e-04 8.04479715e+06 1.60000000e+03 1.60000000e+03 1.60000000e+03 1.43725459e-15 1.00000005e-01 1.00000036e-01 -3 4.687498299499e+04 1.562499433166e+04 1024 9539 4225 4225 0 16 4294967295 0 0 8.00000000e-04 8.06778504e-04 8.06582202e+06 1.60000000e+03 1.60000000e+03 1.60000000e+03 1.43725459e-15 1.00000005e-01 1.00000036e-01 -4 5.000000000000e+04 3.125017005007e+03 1024 9539 4225 4225 0 6 4294967295 0 0 8.00000000e-04 8.07213787e-04 8.06995681e+06 1.60000000e+03 1.60000000e+03 1.60000000e+03 1.43725459e-15 1.00000005e-01 1.00000036e-01