Plot diffusion and dislocation viscosity separately

Hi all,
I want to plot diffusion and dislocation viscosity separately using named additional outputs in visualization of postprocess, and have tried the following three ways:
(1) prm file:
subsection Postprocess
set List of postprocessors = visualization, temperature statistics, heat flux densities, depth average
subsection Visualization
set Time between graphical output = 1e5
set List of output variables = material properties, heat flux map, vertical heat flux, named additional outputs
subsection Material properties
set List of material properties = density, thermal expansivity, specific heat, viscosity, thermal conductivity
end
end
end

results:
An error occurred in line <54> of file </home/mazq/software/aspect/aspect/source/postprocess/visualization/named_additional_outputs.cc> in function
void aspect::Postprocess::VisualizationPostprocessors::NamedAdditionalOutputs::initialize() [with int dim = 2]
The violated condition was:
out.additional_outputs.size() > 0
Additional information:
You activated the postprocessor , but there
** are no additional outputs provided by the material model. Either**
** remove the postprocessor, or check why no output is provided.**

(2) prm file:
subsection Postprocess
set List of postprocessors = visualization, temperature statistics, heat flux densities, depth average
subsection Visualization
set Time between graphical output = 1e5
set List of output variables = material properties, heat flux map, vertical heat flux, named additional outputs
subsection Material properties
set List of material properties = density, thermal expansivity, specific heat, viscosity, thermal conductivity
end
subsection Named additional outputs
** set List of named additional outputs = diffusion viscosity, dislocation viscosity**
** end**
end
end

results:
Line <156> of file <input string: There is no such subsection to be entered: Postprocess.Visualization.Named additional outputs

(3) prm file:
subsection Postprocess
set List of postprocessors = visualization, temperature statistics, heat flux densities, depth average
subsection Visualization
set Time between graphical output = 1e5
set List of output variables = material properties, heat flux map, vertical heat flux, named additional outputs
subsection Material properties
set List of material properties = density, thermal expansivity, specific heat, viscosity, thermal conductivity, named additional outputs
end
end
end

results:
Line <154> of file :
The entry value
density, thermal expansivity, specific heat, viscosity, thermal conductivity, named additional outputs
for the entry named
List of material properties
does not match the given pattern:
[MultipleSelection viscosity|density|thermal expansivity|specific heat|thermal conductivity|thermal diffusivity|compressibility|entropy derivative temperature|entropy derivative pressure|reaction terms|melt fraction ]

Could you please give me a couple of suggestions on how to plot the diffusion and dislocaiton viscosity separately using the named additional outputs? I would really appreciate it! Thank you!

Cheers
Ziqi

Dear Ziqi,

Are you using the grain_size material model? I believe this is the only material model that includes diffusion and dislocation viscosities as additional outputs (add diffusion viscosity to DislocationViscosityOutputs by jdannberg · Pull Request #4799 · geodynamics/aspect · GitHub).

We have a project in progress (Viscoelastoplasticity · GitHub) to make a more generic, extensible material model that decomposes strain rates. An early version will hopefully be functional by the end of the ASPECT Hackathon in July.

If you are not using the grain_size model, and need something before July, can I ask (a) whether you would be willing to code something up, using either the PR above or the code in source/material_model/rheology/composite_visco_plastic.cc as a guide, and (b) whether you are using a particularly complex material model (i.e. >1 material, or a material with phase transitions)? If you are using a relatively simple material model with diffusion-dislocation creep, it may be easiest for you to calculate the decomposed strain rates / viscosities as a postprocessing step.

Best wishes,
Bob

Hi Bob,
Thank you very much for your timely response! I am not using the grain-size material model. I am using the depth-dependent material model with the diffusion dislocation model as the base model.
If I wanna calculate diffusion and dislocation viscosity using the decomposed strain rates, should I use the ‘strain rate tensor’ in the Visualization section?

Cheers
Ziqi

Dear Ziqi,

Sorry, I was unclear. When I said

it may be easiest for you to calculate the decomposed strain rates / viscosities as a postprocessing step,

I meant to say that you would have to calculate the decomposed strain rates outside of ASPECT. The diffusion-dislocation creep model assumes that both mechanisms experience the same stress. You can plug in the rheological parameters and stress (and grain size) into the stress-strain relation for each mechanism to calculate the decomposed strain rates. [As a check, the total strain rate should be equal to the sum of the decomposed strain rates].

This decomposition is relatively straightforward if you have only one compositional field, but it becomes much more complicated with >1 composition. Even with only one compositional field may be easier to write some code to add the decomposed strain rates* to NamedAdditionalOutputs. Decomposed strain rates and viscosities are both calculated in https://github.com/geodynamics/aspect/blob/main/source/material_model/diffusion_dislocation.cc (lines 129 to 143).

Best wishes,
Bob

* decomposed strain rates (more precisely, the square roots of the second invariants of the strain rates) are probably better to output than viscosities because (a) depth_dependent modifies the viscosities but not the strain rates, and (b) decomposed strain rates are a more conceptually simple thing to report.

1 Like

Thank you very much for your detailed and helpful suggestions!

Best regards
Ziqi