along interface velocity for subducting slab - #903
Conversation
Coverage Report for CI Build 32893349143Coverage increased (+0.01%) to 98.314%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
|
Cool! Yes, the next step would be have a velocity per segment something like the angles, either [1.5] or [1.5,2.2]. |
3860526 to
7949345
Compare
|
hmm, can you take the |
d4c33b0 to
4f0d987
Compare
|
@MFraters can you take another look at this? I think all tests have passed. |
MFraters
left a comment
There was a problem hiding this comment.
Very cool! Thanks for working on this.
The code looks good to me. Have you also tested this in 3D and in spherical, to make sure that also works as expected (and maybe add tests for that as well)?
|
@MFraters , I follow the cookbook of 3d_spherical_subduction, and add a velocity of 1.0 with the "along surface" model.
|
|
|
||
| if (distance_from_plane.distance_from_plane <= max_depth && distance_from_plane.distance_from_plane >= min_depth) | ||
| { | ||
| const double angle = distance_from_plane.angle; |
There was a problem hiding this comment.
It seems this angle I use is not tracking the angle of the slab curvature in this case, which worked fine in 2-D test.
|
Can you test 3D cartesian, 2D spherical and 3D spherical seperately? That might make it easier to track down whether the issue is 3D or spherical coordinates. |
| new_distance = side_of_line * (check_point_2d - Pb).norm(); | ||
| new_along_plane_distance = (begin_segment - Pb).norm(); | ||
| new_depth_reference_surface = start_radius - Pb[1]; | ||
| new_check_point_angle = interpolated_angle_top; |
There was a problem hiding this comment.
The "angle" ultimately comes from this "interpolated_angle_top)
4f0d987 to
91f5029
Compare
| double vx = 0.0; | ||
| double vy = 0.0; | ||
| double vz = 0.0; | ||
| if (std::isfinite(angle)) |
There was a problem hiding this comment.
I tried to bypass this error if the error is related to a few points with this added line.
There was a problem hiding this comment.
@MFraters , But then I got 0 velocity everywhere, meaning the angle is nan everywhere for this case. Is it this wb have multiple sections in the slab, and that causes the problem? I can try a different test file later, but maybe you could first comment on this issue.
|
I read through the comments, and it looks like we need to take a look at when and why this angle is actually computed. Since I am at a conference right now I don't have the time to really look deep into the code right now, but I will try to do this after the conference. |
|
@MFraters, would you have a time next week to look at this? Perhaps we could get this and my other PR merged before the Hackathon. |
|
@MFraters Thanks for your reply. I would need to get back to this after the ASPECT Hack. |
|
Good, I seem to have fixed the problem, at least for Cartesian geometry. I also added a new angle to the
I will then test the implementation in Spherical geometry. @MFraters I have to get to the bottom of the distance_point_from_curved_planes function to reach this point. This function is indeed a very thoughtful implementation and really helps me understand how GWB works in general. I do still have a few small questions to ask, will you have a 30 mins meeting time next week? |
896e287 to
1b24ad8
Compare
1b24ad8 to
31f7b5a
Compare
|
very cool pictures! Yes, lets discuss. |
31f7b5a to
0b31c09
Compare












Add an along surface velocity option for the subducting slab. This will trace the surface of the subducting slab and rotate the velocity to align with the surface. The free parameter is the magnitude of the velocity.
Here is the layout of the test, which connects a horizontal velocity in the plate to the along-surface velocity in the slab.

This is tentative. Eventually, we might want to tweak the velocity in each of the slab segments, but this would be an easy start.