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

Temp model in neg top truncation area using spherical coordinates #364

Closed
rfildes opened this issue Nov 5, 2021 · 4 comments
Closed

Temp model in neg top truncation area using spherical coordinates #364

rfildes opened this issue Nov 5, 2021 · 4 comments
Labels
add/change user functionality Requests or proposes a new or improved user functionality

Comments

@rfildes
Copy link
Contributor

rfildes commented Nov 5, 2021

Issue implementing the temperature model in a 2D subducting slab using spherical coordinates and negative top truncation. There are discontinuities between adjacent segments, but only in the negatively top truncated part of the segment above the slab surface, not in the portion of the segment below the slab surface. This is pronounced when segments are changing their dip:
Screen Shot 2021-11-05 at 2 07 40 PM
Input file:

{
  "version":"0.5",
  "coordinate system":{"model":"spherical","depth method":"begin segment"},
  "cross section":[[0,0],[45,0]],"surface temperature":273, "force surface temperature":true,
  "potential mantle temperature":1673, "thermal expansion coefficient":3.1e-5,
  "specific heat":1250, "thermal diffusivity":1.0e-6,
  "features":
  [
    { "model":"subducting plate", "name":"Slab",
     "coordinates":[[25,-5],[25,5]],
     "dip point":[0,0],
          "segments":[{"length":200e3,"thickness":[300e3], "top truncation":[-300e3], "angle":[0,30]},
          {"length":100e3, "thickness":[300e3], "top truncation":[-300e3], "angle":[30,50]},
          {"length":800e3, "thickness":[300e3], "top truncation":[-200e3], "angle":[50,50]},
          {"length":300e3, "thickness":[300e3], "top truncation":[-200e3], "angle":[50,10]},
          {"length":300e3, "thickness":[300e3], "top truncation":[-300e3], "angle":[10,50]}],
         "temperature models":[{"model":"uniform", "min distance slab top":-200e3, "temperature":900}]
         }
  ]
}

with this grid file:

# Grid File for creating vtk files for temperature to view in Paraview or Visit
# output variables
#for subduction model (spherical  coordinates)
grid_type = chunk
dim = 2
compositions = 7

# domain of the grid (x and y are the surface, z is vertical with 0 at the bottom)
x_min = 0
x_max = 45
y_min = 0
y_max = 0
z_min = 3.481e6
z_max = 6.371e6

# grid properties
n_cell_x = 1350
n_cell_z = 400
@MFraters MFraters added the bug Something isn't working label Nov 5, 2021
@MFraters
Copy link
Member

MFraters commented Nov 5, 2021

Thanks for reporting and narrowing down the issue! I am going to take a look at it.

@MFraters
Copy link
Member

MFraters commented Nov 6, 2021

It took me a bit to find out what the issue here is, and it was not what I expected it to be. The issue comes from the usage of the begin segment depth method. This method fundamentally causes a slight shift in the angle at the beginning of each segment. Using starting point instead resolves this issue.

Since it does exactly what is is supposed to do, it is not a bug as I though before. That doesn't mean that I think that there is not a better solution though. Instead of adding the angle correction computed at the beginning of the segment directly at the beginning of the segment, we could also opt to only add it add this the end of the segment. This way the starting angle matches with the previous angle, and the extra added angle can be interpolated over over the course of the segment. The downside is that it doesn't add the angle the angle correction for the end of the segment to the end of the segment. The issue is that we don't know the location of the end of the segment until we have the angle. This means this method is a little less accurate bit should still converge to the correct continuous solution with smaller segments like the begin segment method (but most likely slower).

So I think what is needed is a new depth method. I think the name begin at end segment would be descriptive enough. I don't want to call it end segment because that would imply that the end of the segments gets the correction for the end of the segment.

Below are images for what the three methods look like on this setup:

starting point:
pv_slab_spherical_starting_point

begin segment:
pv_slab_spherical_begin_segment

begin at end segment:
pv_slab_spherical_begin_at_end_segment

@MFraters MFraters added add/change user functionality Requests or proposes a new or improved user functionality and removed bug Something isn't working labels Nov 6, 2021
@MFraters
Copy link
Member

MFraters commented Nov 8, 2021

@rfildes, I have added a new depth method option called begin at end segment (see #365 for more info). If you update to the newest main branch and switch to this depth method, it should fix the issue.

@rfildes
Copy link
Contributor Author

rfildes commented Nov 8, 2021

@MFraters I just updated and was able to successfully switch to the begin at end segment option with my slab and it was fixed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add/change user functionality Requests or proposes a new or improved user functionality
Projects
None yet
Development

No branches or pull requests

2 participants