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

contribute cookbook: simple subduction initiation #5271

Merged
merged 3 commits into from Jul 15, 2023

Conversation

cedrict
Copy link
Contributor

@cedrict cedrict commented Jul 12, 2023

Pull Request Checklist. Please read and check each box with an X. Delete any part not applicable. Ask on the forum if you need help with any step.

Describe what you did in this PR and why you did it.

Before your first pull request:

For all pull requests:

For new features/models or changes of existing features:

  • I have tested my new feature locally to ensure it is correct.
  • I have created a testcase for the new feature/benchmark in the tests/ directory.
  • I have added a changelog entry in the doc/modules/changes directory that will inform other users of my change.

Copy link
Contributor

@jdannberg jdannberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this!

I have two general comments in addition to the ones I left in the code:

(1) Can you add a test case? It can just include your input file (add the line include $ASPECT_SOURCE_DIR/cookbooks/subduction_initiation/subduction_initiation_compositional_fields.prm) and then maybe reduce the resolution/end time. This way, we make sure it will continue to work and the results will still be correct in the future. I would actually do this first (before any of the other changes I suggested) because then you can use it as well to make sure that changing the input file does not change your solution.

(2) This is more a philosophical question: Your water viscosity is 1e19, which is the same as the lowest value of the asthenosphere viscosity (case 6). Do you think that is still a reasonable approximation? Could you maybe add a line to the text on that?

Thank you!

lithosphere ($\rho_l=3300~\text{ kg m}^{-3}$, $\eta_l$) and
asthenosphere ($\rho_a=3200~\text{ kg m}^{-3}$, $\eta_a$).
Note that although the water viscosity is correct, this is probably not
the value that was used in the authors since it would most likely lead to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either

Suggested change
the value that was used in the authors since it would most likely lead to
the value that was used by the authors since it would most likely lead to

or

Suggested change
the value that was used in the authors since it would most likely lead to
the value that was used in the original publication since it would most likely lead to

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

asthenosphere ($\rho_a=3200~\text{ kg m}^{-3}$, $\eta_a$).
Note that although the water viscosity is correct, this is probably not
the value that was used in the authors since it would most likely lead to
numerical errors. We then set $\eta_w=10^{19}~\text{ Pa s}$ (we can then speak of 'sticky water').
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
numerical errors. We then set $\eta_w=10^{19}~\text{ Pa s}$ (we can then speak of 'sticky water').
numerical errors. We here set $\eta_w=10^{19}~\text{ Pa s}$ (we can then speak of 'sticky water').

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 72 to 73
Two parameter files are provided for Case 1: one using
compositional fields, and one using the particle-in-cell approach.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can directly link to the files, I think it should look like this:

Suggested change
Two parameter files are provided for Case 1: one using
compositional fields, and one using the particle-in-cell approach.
Two parameter files are provided for Case 1: one
[using compositional fields](https://github.com/geodynamics/aspect/blob/main/cookbooks/subduction_initiation/subduction_initiation_compositional_fields.prm), and one
[using the particle-in-cell approach](https://github.com/geodynamics/aspect/blob/main/cookbooks/subduction_initiation/subduction_initiation_particle_in_cell.prm).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

<img src="results3.*" width="95%" />

Case 1 (obtained with the compositional fields approach) at
(a) 0 Ma; (b) 12 Ma; (c) 21 Ma; (d) 31 Ma; (e) 41 Ma.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add units? I am not going to ask you to redo all the figures (although having the units directly with the colorbar would be great!) but it should at least be in the caption.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added units in caption. also re-uploading figure bc original was too low resolution.

Comment on lines 11 to 15
#subsection Solver parameters
# subsection Stokes solver parameters
# set Number of cheap Stokes solver steps = 0
# end
#end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this if it is not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 71 to 81
subsection Initial composition model
set Model name = function
subsection Function
set Variable names = x,y
set Function constants = L0=300e3
set Function expression = if((x>=L0 && y<162e3),1,0) ;\
if((x<=L0 && y>120e3 && y<=170e3),1,0) ;\
if((x>=L0 && y>=162e3 && y<=172e3),1,0) ;\
if((x<=L0 && y>170e3) || (x>=L0 && y>172e3),1,0)
end
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get that you could change this by hand if you wanted to change the domain height to 140 km for cases 5 and 6. But you would have to change all the numbers by hand and it would be really easy to make an error. Could you add another function constant for the domain hight and then express all y values as the height minus depth? That way, the user would only have to change one number for the box height.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, thx!

Two parameter files are provided for Case 1: one using
compositional fields, and one using the particle-in-cell approach.
Other cases can be run by changing the viscosities and/or the domain size accordingly in the
parameter files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
parameter files.
parameter files. Note that changing the domain size does not just require changing the geometry model, but also the initial composition model.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,104 @@
#parameter file for replicating Matsumoto & Tomoda 1983
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to not duplicate code, can you include the other input file and only list the parameters that are different, rather than copying the whole file (I think you only need the output directory, the section on compositional fields, and the postprocessing)? That way, if someone wants to change the setup to other cases, they only have one file to change, not both.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have created a 'subduction_initiation_basis.prm' file which contains the common prm code for both.

set Data output format = vtu
set List of particle properties = initial composition, velocity
set Particle generator name = random uniform
set Interpolation scheme = cell average #default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set Interpolation scheme = cell average #default
set Interpolation scheme = cell average

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@bangerth bangerth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I liked the "sticky water" analogy. Perhaps honey?

I had to look up the viscosity of honey, and found it to be on the order of 50 Pa.s. So your water with a viscosity of 1e19 Pa.s is really sticky!

One also finds this publication (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4745488/#:~:text=Viscosity%20of%20all%20the%20honey,54.0%20to%2089.0%20kJ%2Fmol.) wherein the authors also see whether irradiation with gamma rays changes the viscosity -- though I will admit that I cannot see why anyone would find themselves interested in the effects of radition on viscosity.


The setup for this experiment originates in {cite:t}`matsumoto:tomoda:1983`.

In this very early computational geodynamics paper the authors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this very early computational geodynamics paper the authors
In this very early computational geodynamics paper, the authors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

at the gigantic fracture zone in the Northeastern
Pacific by means of numerical simulation
of contact between two kinds of viscous fluid of different density.
They then solve the incompressible isothermal linear Stokes equations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
They then solve the incompressible isothermal linear Stokes equations
They then formulate the incompressible isothermal linear Stokes equations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

lithosphere ($\rho_l=3300~\text{ kg m}^{-3}$, $\eta_l$) and
asthenosphere ($\rho_a=3200~\text{ kg m}^{-3}$, $\eta_a$).
Note that although the water viscosity is correct, this is probably not
the value that was used in the authors since it would most likely lead to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the value that was used in the authors since it would most likely lead to
the value that was used in the paper since it would most likely lead to

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already corrected (see Julianne's comment above)

asthenosphere ($\rho_a=3200~\text{ kg m}^{-3}$, $\eta_a$).
Note that although the water viscosity is correct, this is probably not
the value that was used in the authors since it would most likely lead to
numerical errors. We then set $\eta_w=10^{19}~\text{ Pa s}$ (we can then speak of 'sticky water').
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
numerical errors. We then set $\eta_w=10^{19}~\text{ Pa s}$ (we can then speak of 'sticky water').
numerical errors. We thus set $\eta_w=10^{19}~\text{ Pa s}$ (we can then speak of 'sticky water').

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-)

Honey?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sticky honey is a hard sell ... is there a planet covered in honey with plate tectonics?

the value that was used in the authors since it would most likely lead to
numerical errors. We then set $\eta_w=10^{19}~\text{ Pa s}$ (we can then speak of 'sticky water').
Also, all viscosities in the paper
are expressed in Poise with $1~\text{ Poise}=0.1~\text{ Pa s}$.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, come on. Who thought that was a good idea?

@@ -0,0 +1,98 @@
#parameter file for replicating Matsumoto & Tomoda 1983
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#parameter file for replicating Matsumoto & Tomoda 1983
# Parameter file for replicating Matsumoto & Tomoda 1983

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@cedrict
Copy link
Contributor Author

cedrict commented Jul 14, 2023

I have changed the water viscosity to 1e18. It does not change the results shown in the cookbook very much at all. But 1e18 is indeed safer than 1e19 in case 6. I have also added a link to Crameri paper.

@cedrict
Copy link
Contributor Author

cedrict commented Jul 14, 2023

ready to review again. Still need to do a test

@bangerth
Copy link
Contributor

This looks good. Do you want us to merge this now, or wait for the test?

@cedrict
Copy link
Contributor Author

cedrict commented Jul 14, 2023

please merge, am now looking into making a test (could take a while, it's been a looong time :)

@bangerth
Copy link
Contributor

There's a failing check:

--- a/cookbooks/subduction_initiation/subduction_initiation_basis.prm
+++ b/cookbooks/subduction_initiation/subduction_initiation_basis.prm
@@ -46,4 +46,3 @@ subsection Mesh refinement
   set Strategy                      = composition
   set Coarsening fraction           = 0
 end
-

Perhaps an empty line at the end of a file?

Other than that, good to merge!

@gassmoeller gassmoeller merged commit 4065456 into geodynamics:main Jul 15, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants