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

Include option for "plate model" in the "mass conserving temperature" #471

Merged

Conversation

lhy11009
Copy link
Contributor

@lhy11009 lhy11009 commented Feb 2, 2023

The option we have for the "mass conserving" temperature is to use the hpc (half-space cooling) model in the temperature of the slab. This is a good choice, but if the user chooses to use the "plate" model for their oceanic plate, there will be a abrupt change in temperature around the trench between the slab and the subducting plate. To be more specific, this issue is not so apparent when the subducting plate has a young age, as the two models agree well with a plate age to at least 80 Ma. But with an older subducting plate, this will certainly be an issue. That's why I want to have the "plate" model as an option to use in the "mass conserving" temperature.
Below is an example of using the "plate model" for the oceanic plate and the "hpc model" inside the "mass conserving" temperature model for the slab. Note the line-shape discontinuity in the temperature field below the trench.
cart_150_40_hpc

Essentially there are two things to implement: one is a temperature formulation to give to the temperature below the slab. And another one is an energy formulation to give to the calculation of the temperature above the slab.

Formulation

The equation for the plate model temperature is:
$T - T_p = \left(T_m - T_p\right)\left(\left(1-\frac{y}{L}\right)-\sum_{i=0}^{\infty} \frac{2}{n\pi}sin\left(\frac{n\pi y}{L}\right)exp\left[\left(\frac{u L}{2 \kappa} - \sqrt{\frac{u^2 L^2}{4 \kappa^2} + n^2\pi^2}\right)\frac{u t}{L}\right ]\right)$
Where $T_m$ is the minimum temperature and the $T_p$ is the background temperature (i.e. the potential temperature) . L is the max depth for the plate model. Compared to the classic expression for the plate model, the surface temperature is replaced by the minimum temperature while the mantle temperature is replaced by the background temperature.
An integration to get the heat contents:
$H\left(u, t, T_m, T_p \right) = \rho c_p \int_{0}^{L} (T - T_p)dy = \rho c_p \left(T_m - T_p\right)\left(\frac{L}{2} - \sum_{k=0}^{\infty} \frac{4L}{(2k+1)^2 {\pi}^2}exp\left[\left(\frac{u L}{2 \kappa} - \sqrt{\frac{u^2 L^2}{4 \kappa^2} + (2k+1)^2\pi^2}\right)\frac{u t}{L}\right ]\right)) $
With these equations. I added an option to use the plate model for the temperature model of "mass conserving". The temperature on top accounts for the differences in the heat contents from the plate cooling, while temperature below the slab is assigned with the plate cooling model directly.
Specifically, the initial heat content is given by
$H_{ini} = H\left(u, t_{sb} , T_s, T_p \right)$
by substituting the velocity and age with the spreading velocity and the age of the subducting plate at the trench. Moreover, the temperature at the surface of the model domain is applied rather than the minimum temperature on the slab surface.
Subsequently, a heat content at the bottom of the slab is given by:
$H_{bot} = H\left(u, t_{eff}, T_m, T_p \right)$
Where the time of an effective plate age is adapted.

Analysis: Differences in the effects on the mantle temperature

The take-home message is the temperature field in the mantle wedge shouldn't vary much when the reference model is switched from the "hpc" to the "plate" model

Here, I defined the "heating thickness" of the thermal model as:
$L_h\left(t\right) = \frac{H\left(u, t_{sb} , T_s, T_p \right)}{\rho c_p \left(T_s - T_p \right)}$
with the aforementioned definition of H. These new value would have the virtue of being independent of the value of $T_s$ and $T_p$ and has a clear meaning. Physically, it's that the heat from this thickness of the mantle is removed through the surface in a period of time.
Of course, the equation for the plate model and the HPC model is different. In the next plot, I should the difference between these two models in the figure on top:
Here the values for the HPC model will keep increasing, which is expected as the HPC model will keep cooling the mantle. On the other hand, the plate model will first increase, and then reach a maximum as the plate keeps aging.
In the 2nd subfigure down below, I include the effects of a warming slab surface (i.e. The minimum temperature is warming than the surface temperature of the model). In this example, the bottom half of the slab is warming up by the mantle wedge, so that the "heating thickness" is negative. The curve would start at value 0 with the age at the trench (40 Ma). Then it ages and warms up till the age at the tip (44 Ma, by a convergence rate of 5 cm/yr, the slab is 200 km long in this case).

residue_heat_ratio_hpc_vs_plate

The prm file

a new option of "reference model name" is added with the section of the "mass conserving" temperature model. "plate model" (default is "half space model"). Another option of importance is the "max distance slab top", as this value is used in the plate model formulation in this section as the thickness of the plate. In order to render a continuous transition from the plate onto the slab, it should be the same value used in the "plate model" temperature model in the "oceanic plate" section of the sp plate.

Here is an example:

  "temperature models": [
    {
      "model": "mass conserving",
      "density": 3300,
      "thermal conductivity": 3.3,
      "adiabatic heating": true,
      "plate velocity": 0.05,
      "ridge coordinates": [
        [
          [
            0,
            -5.0
          ],
          [
            0,
            5.0
          ]
        ]
      ],
      "coupling depth": 50000.0,
      "shallow dip": 60.0,
      "taper distance": 100000.0,
      "min distance slab top": -100000.0,
      "max distance slab top": 150000.0,
      "reference model name": "plate model"
    }

Results

Results for an old subducting plate of 150 Ma (overriding plate is 40 Ma in age)

In the Cartesian geometry, the results from using a hpc model (left) is compared to a plate model (right). The one with the hpc model has a incontinuous transition at the trench while the one with the plate model ensure a continuous transition at the trench:

combine_cart_150_40

In the spherical geometry, the differences between the hpc (left) and the plate (right) models still hold, but both of these models have induce a singularity around the tapering at the tip:

combine_sph_150_40

I am going to show more of this issue with a younger plate (40 Ma).

Results for a young subducting plate of 40 Ma (overriding plate is 20 Ma in age)

For a 40 Ma slab, the transferring from the subducting plate to the slab is continuous as expected. Left is a HPC model and right is a plate model:

combine_images (46)

Same results but in the chunk (spherical) geometry. The issue with the tapering singularity is not as proclaimed as the case of the old subducting slab, but the singularity is still there:

combine_images (44)

Tests

I have added two tests. One is the "mass_conserving_slab_temperature_plate_model_young" with a subducting plate of 40 Ma at the trench (left sub-figure) and the other one is the "mass_conserving_slab_temperature_plate_model_old" with a subducting plate of 150 Ma at the trench (right sub-figure). These tests are visualized down below:

plate_40_150

@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (40655ff) 93.46% compared to head (cfb5408) 93.49%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #471      +/-   ##
==========================================
+ Coverage   93.46%   93.49%   +0.03%     
==========================================
  Files          92       92              
  Lines        6301     6346      +45     
==========================================
+ Hits         5889     5933      +44     
- Misses        412      413       +1     
Files Coverage Δ
...ucting_plate_models/temperature/mass_conserving.cc 97.47% <98.03%> (+0.06%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40655ff...cfb5408. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Feb 2, 2023

Benchmark Main Feature Difference (99.9% CI)
Slab interpolation simple none 1.023 ± 0.005 (s=447) 1.023 ± 0.007 (s=436) -0.1% .. +0.2%
Slab interpolation curved simple none 1.026 ± 0.003 (s=411) 1.026 ± 0.003 (s=469) -0.1% .. +0.1%
Spherical slab interpolation simple none 1.257 ± 0.009 (s=377) 1.256 ± 0.005 (s=342) -0.2% .. +0.1%
Slab interpolation simple curved CMS 1.153 ± 0.010 (s=381) 1.153 ± 0.008 (s=402) -0.2% .. +0.2%
Spherical slab interpolation simple CMS 1.863 ± 0.005 (s=230) 1.860 ± 0.007 (s=256) -0.2% .. -0.0%
Spherical fault interpolation simple none 1.273 ± 0.004 (s=356) 1.272 ± 0.005 (s=354) -0.2% .. -0.1%
Cartesian min max surface 2.376 ± 0.017 (s=175) 2.363 ± 0.021 (s=207) -0.8% .. -0.3%
Spherical min max surface 7.379 ± 0.020 (s=62) 7.366 ± 0.020 (s=63) -0.3% .. -0.0%

@lhy11009 lhy11009 force-pushed the mass_conserving_plate_model branch from 12da597 to a4ab4ff Compare February 2, 2023 23:35
@lhy11009
Copy link
Contributor Author

lhy11009 commented Feb 3, 2023

There are the wb and prm file I used to generate the test.
case.wb.txt
case_f.prm.txt

@lhy11009 lhy11009 force-pushed the mass_conserving_plate_model branch from 3c0d9f3 to 1a83772 Compare February 6, 2023 04:04
@lhy11009 lhy11009 marked this pull request as ready for review February 7, 2023 19:03
@lhy11009
Copy link
Contributor Author

lhy11009 commented Feb 7, 2023

Solution for the mentioned issue

Discussed in the issue here:
#364

Change in the parameter file: change the "depth method" from "begin segment" to "begin at end segment":

  "coordinate system": {
    "model": "spherical",
    "depth method": "begin at end segment"
  }

A result of an old slab (150 Ma at the trench) after modification is shown below. The temperature field is continuous at the change of the segment.
plate_old_begin_end_segment

@MFraters
Copy link
Member

Now that #470 is merged, could you rebase and let me know when it is ready for review or if you need more input?

@lhy11009
Copy link
Contributor Author

After rebasing, the temperature in my young slab looks nice. But there is a thin thermal boundary in the other part of the model. As I didn't assign any overriding plate there, I am a little confused about it being there. As in the previous visualization of the same test, there was no trace of a thermal boundary in the other part of the model.
Screenshot from 2023-02-17 11-38-23

@mibillen Is this from some updates on the model or it's something else in the WORLDBUILDER?

@MFraters
Copy link
Member

hmm, strange. Which worldbuilder file did you use for this figure?

@lhy11009
Copy link
Contributor Author

It's the tests/gwb-dat/mass_conserving_slab_temperature_plate_model_young.wb file I included for a young plate. This plot is generated with this grid:
build_mass_conserving_plate_model_test.grid.txt
It's basically the same test, but ran with the version before and after the rebase onto the new update of WB.

@lhy11009
Copy link
Contributor Author

Maybe you can take a quick look at the files first and see if there is some quick issue you can notice. Then we can together look at the visualization, with these different branches before and after the rebase on my computer.

@MFraters
Copy link
Member

Sorry it took me so long to look into the issue. I think the surface temperature is forced by these entries in the input file you mentioned: "surface temperature":273, "force surface temperature":true,.

Can you rebase as well?

@lhy11009 lhy11009 force-pushed the mass_conserving_plate_model branch from 1a83772 to 26327c4 Compare April 25, 2023 04:08
@lhy11009
Copy link
Contributor Author

Hi @MFraters
It took me a while to get back on top of the PR. I have fixed the tests and rebased it, can you take a look again? Thanks.

Copy link
Member

@MFraters MFraters left a comment

Choose a reason for hiding this comment

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

This looks good to me. Only a two small comments. @mibillen, can you also take a look at this given that you are more familiar with the mass conversing model?

@mibillen
Copy link
Contributor

I've reviewed the whole code and besides the mispelling of summation I do not see any other issues. One comment however, is that there is a typo in the heat flow equation given at the top of this pull request: the "4" before the exponential term should be "4L" - based on units and me checking the integral. It is correct in the code. Any way to fix that above? I recommend that this can be merged once theses last few points are corrected.

@lhy11009 lhy11009 force-pushed the mass_conserving_plate_model branch 2 times, most recently from 68def27 to 5fb7371 Compare October 10, 2023 23:56
@lhy11009
Copy link
Contributor Author

I have addressed the comments. And @mibillen is right about the missing "L" in the equations above. I have modified the text.
@MFraters, if you have time, can you take another look at the "enum" variable from a previous comment? I changed the variable "reference_model_name" to enum type at the end of the file "include/world_builder/features/subducting_plate_models/temperature/mass_conserving.h". It's working but I wonder if it's what you want.

Copy link
Member

@MFraters MFraters left a comment

Choose a reason for hiding this comment

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

Yes, that was what I meant. Can you fix the tests?

@lhy11009 lhy11009 force-pushed the mass_conserving_plate_model branch from 5fb7371 to ddb221d Compare January 12, 2024 05:47
@lhy11009
Copy link
Contributor Author

@MFraters @mibillen, I have fixed the tests and indentation. Let's give it another try.

Copy link
Member

@MFraters MFraters left a comment

Choose a reason for hiding this comment

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

There are some comments marked as resolved, but don't seem to be. Can you take another look at the comments to make sure that they are resolved?

@lhy11009
Copy link
Contributor Author

lhy11009 commented Jan 12, 2024 via email

@lhy11009 lhy11009 force-pushed the mass_conserving_plate_model branch from ddb221d to e1de418 Compare January 16, 2024 06:56
@lhy11009
Copy link
Contributor Author

@MFraters Indeed, I have addressed these comments in the local branch on my other laptop. Now that I have fix the branch and tests, it should work.

@lhy11009
Copy link
Contributor Author

lhy11009 commented Feb 2, 2024

@MFraters, Hi Menno, do we have extra work to do here?

@MFraters
Copy link
Member

MFraters commented Feb 2, 2024

I asked on slack a bit ago, but you may have missed it between the other messages. Currently your changelog is at the 0.5.0 entry, which is already released. Could you add it to the unreleased section? You probably need to rebase before. Other than that it is good to go.

@lhy11009 lhy11009 force-pushed the mass_conserving_plate_model branch from e1de418 to cfb5408 Compare February 2, 2024 20:20
@lhy11009
Copy link
Contributor Author

lhy11009 commented Feb 2, 2024

Sorry that I missed that. I vaguely remember you sent something before but I didn't find that on github. I have migrated the change log to the unreleased part.

@MFraters MFraters merged commit d465a69 into GeodynamicWorldBuilder:main Feb 2, 2024
33 of 34 checks passed
@MFraters
Copy link
Member

MFraters commented Feb 2, 2024

Great, thanks for contributing this!

@lhy11009
Copy link
Contributor Author

lhy11009 commented Feb 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants