-
Notifications
You must be signed in to change notification settings - Fork 39
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
Include option for "plate model" in the "mass conserving temperature" #471
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ 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
Continue to review full report in Codecov by Sentry.
|
|
12da597
to
a4ab4ff
Compare
There are the wb and prm file I used to generate the test. |
3c0d9f3
to
1a83772
Compare
Solution for the mentioned issueDiscussed in the issue here: Change in the parameter file: change the "depth method" from "begin segment" to "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. |
Now that #470 is merged, could you rebase and let me know when it is ready for review or if you need more input? |
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. @mibillen Is this from some updates on the model or it's something else in the WORLDBUILDER? |
hmm, strange. Which worldbuilder file did you use for this figure? |
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: |
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. |
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: Can you rebase as well? |
1a83772
to
26327c4
Compare
Hi @MFraters |
There was a problem hiding this 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?
include/world_builder/features/subducting_plate_models/temperature/mass_conserving.h
Outdated
Show resolved
Hide resolved
source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc
Outdated
Show resolved
Hide resolved
source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc
Outdated
Show resolved
Hide resolved
source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc
Outdated
Show resolved
Hide resolved
source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc
Outdated
Show resolved
Hide resolved
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. |
68def27
to
5fb7371
Compare
I have addressed the comments. And @mibillen is right about the missing "L" in the equations above. I have modified the text. |
There was a problem hiding this 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?
5fb7371
to
ddb221d
Compare
There was a problem hiding this 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?
include/world_builder/features/subducting_plate_models/temperature/mass_conserving.h
Outdated
Show resolved
Hide resolved
source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc
Outdated
Show resolved
Hide resolved
Yep, I might mess up using the local folder because I also have a local
folder on my laptop. I'll take a look.
…On Fri, Jan 12, 2024 at 6:51 AM Menno Fraters ***@***.***> wrote:
***@***.**** commented on this pull request.
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?
------------------------------
In
include/world_builder/features/subducting_plate_models/temperature/mass_conserving.h
<#471 (comment)>
:
> @@ -110,7 +110,7 @@ namespace WorldBuilder
bool adiabatic_heating;
std::vector<std::vector<Point<2>>> mid_oceanic_ridges;
Operations operation;
-
+ std::string reference_model_name;
This doesn't seem resolved yet to me.
------------------------------
In
source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc
<#471 (comment)>
:
> @@ -226,6 +231,8 @@ namespace WorldBuilder
{
const double distance_from_plane = distance_from_planes.distance_from_plane;
+ const int plate_model_sommation_number = 100; // for the plate model
same here
—
Reply to this email directly, view it on GitHub
<#471 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG2WMFKCFFFDBJTYCCVZ533YOFEYHAVCNFSM6AAAAAAUPPLOW2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMJYGQZTOMBSGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
--
Ph.D student of Geophysics
Earth & Planetary Sciences Dept., UC Davis
Davis, CA 95616
|
ddb221d
to
e1de418
Compare
@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. |
@MFraters, Hi Menno, do we have extra work to do here? |
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. |
e1de418
to
cfb5408
Compare
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. |
Great, thanks for contributing this! |
No problem! Great job for you to review this too.
…On Fri, Feb 2, 2024 at 3:38 PM Menno Fraters ***@***.***> wrote:
Great, thanks for contributing this!
—
Reply to this email directly, view it on GitHub
<#471 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG2WMFPGK4AV6GR6MMLHL2TYRV2HPAVCNFSM6AAAAAAUPPLOW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRUHEYDOMZTGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Ph.D student of Geophysics
Earth & Planetary Sciences Dept., UC Davis
Davis, CA 95616
|
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.
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)$ $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.
$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)) $
$H_{ini} = H\left(u, t_{sb} , T_s, T_p \right)$
$H_{bot} = H\left(u, t_{eff}, T_m, T_p \right)$
Where
An integration to get the heat contents:
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
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:
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)}$ $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.
with the aforementioned definition of H. These new value would have the virtue of being independent of the value of
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).
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:
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:
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:
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:
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:
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: