Skip to content

Commit 7f635d0

Browse files
committed
WIP: add velocity infrastructure.
1 parent 59aa799 commit 7f635d0

File tree

54 files changed

+3820
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3820
-216
lines changed

cookbooks/2d_cartesian_subduction_rift/2d_cartesian_subduction_rift.wb

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,33 @@
66
{"model":"oceanic plate", "name":"oceanic plate", "coordinates":[[-1e3,-1e3],[1150e3,-1e3],[1150e3,1e3],[-1e3,1e3]],
77
"temperature models":[{"model":"plate model", "max depth":95e3, "bottom temperature":1600, "spreading velocity":0.005, "ridge coordinates":[[[100e3,-1e3],[100e3,1e3]]]}],
88
"composition models":[{"model":"uniform", "compositions":[0], "max depth":10e3},
9-
{"model":"uniform", "compositions":[1], "min depth":10e3, "max depth":95e3}]},
9+
{"model":"uniform", "compositions":[1], "min depth":10e3, "max depth":95e3}],
10+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
1011

1112
{"model":"continental plate", "name":"continental plate", "coordinates":[[1150e3,-1e3],[2001e3,-1e3],[2001e3,1e3],[1150e3,1e3]],
1213
"temperature models":[{"model":"linear", "max depth":95e3, "bottom temperature":1600}],
1314
"composition models":[{"model":"uniform", "compositions":[2], "max depth":30e3},
14-
{"model":"uniform", "compositions":[3], "min depth":30e3, "max depth":65e3}]},
15+
{"model":"uniform", "compositions":[3], "min depth":30e3, "max depth":65e3}],
16+
"velocity models":[{"model":"uniform", "velocity":[-1,0,0]}]
17+
},
1518

1619
{"model":"mantle layer", "name":"upper mantle", "min depth":95e3, "max depth":660e3, "coordinates":[[-1e3,-1e3],[2001e3,-1e3],[2001e3,1e3],[-1e3,1e3]],
1720
"temperature models":[{"model":"linear", "min depth":95e3, "max depth":660e3, "top temperature":1600, "bottom temperature":1820}],
18-
"composition models":[{"model":"uniform", "compositions":[4]}]},
21+
"composition models":[{"model":"uniform", "compositions":[4]}],
22+
"velocity models":[{"model":"uniform", "velocity":[0.5,0,0]}]},
1923

2024
{"model":"mantle layer", "name":"lower mantle", "min depth":660e3, "max depth":1160e3, "coordinates":[[-1e3,-1e3],[2001e3,-1e3],[2001e3,1e3],[-1e3,1e3]],
2125
"temperature models":[{"model":"linear", "min depth":660e3, "max depth":1160e3, "top temperature":1820, "bottom temperature":2000}],
22-
"composition models":[{"model":"uniform", "compositions":[5]}]},
26+
"composition models":[{"model":"uniform", "compositions":[5]}],
27+
"velocity models":[{"model":"uniform", "velocity":[0.25,0,0]}]},
2328

2429
{"model":"subducting plate", "name":"Subducting plate", "coordinates":[[1150e3,-1e3],[1150e3,1e3]], "dip point":[2000e3,0],
25-
"segments":[{"length":200e3, "thickness":[95e3], "angle":[0,45]}, {"length":200e3, "thickness":[95e3], "angle":[45]},
30+
"segments":[{"length":200e3, "thickness":[95e3], "angle":[0,45],"velocity models":[{"model":"uniform", "velocity":[0.75,0,-0.25]}]},
31+
{"length":200e3, "thickness":[95e3], "angle":[45],"velocity models":[{"model":"uniform", "velocity":[0.7,0,-0.7]}]},
2632
{"length":200e3, "thickness":[95e3], "angle":[45,0]}, {"length":100e3, "thickness":[95e3], "angle":[0]}],
2733
"temperature models":[{"model":"plate model", "density":3300, "plate velocity":0.01, "adiabatic heating":false}],
2834
"composition models":[{"model":"uniform", "compositions":[0], "max distance slab top":10e3},
29-
{"model":"uniform", "compositions":[1], "min distance slab top":10e3, "max distance slab top":95e3 }]}
35+
{"model":"uniform", "compositions":[1], "min distance slab top":10e3, "max distance slab top":95e3 }],
36+
"velocity models":[{"model":"uniform", "velocity":[0.75,0,0.25]}]}
3037
]
3138
}

cookbooks/2d_cartesian_subduction_rift_adiabatic/2d_cartesian_subduction_rift_adiabatic.wb

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,29 @@
66
{"model":"oceanic plate", "name":"oceanic plate", "coordinates":[[-1e3,-1e3],[1150e3,-1e3],[1150e3,1e3],[-1e3,1e3]],
77
"temperature models":[{"model":"plate model", "max depth":95e3, "spreading velocity":0.005, "ridge coordinates":[[[100e3,-1e3],[100e3,1e3]]]}],
88
"composition models":[{"model":"uniform", "compositions":[0], "max depth":10e3},
9-
{"model":"uniform", "compositions":[1], "min depth":10e3, "max depth":95e3}]},
9+
{"model":"uniform", "compositions":[1], "min depth":10e3, "max depth":95e3}],
10+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
1011

1112
{"model":"continental plate", "name":"continental plate", "coordinates":[[1150e3,-1e3],[2001e3,-1e3],[2001e3,1e3],[1150e3,1e3]],
1213
"temperature models":[{"model":"linear", "max depth":95e3}],
1314
"composition models":[{"model":"uniform", "compositions":[2], "max depth":30e3},
14-
{"model":"uniform", "compositions":[3], "min depth":30e3, "max depth":65e3}]},
15+
{"model":"uniform", "compositions":[3], "min depth":30e3, "max depth":65e3}],
16+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
1517

1618
{"model":"mantle layer", "name":"upper mantle", "min depth":95e3, "max depth":660e3, "coordinates":[[-1e3,-1e3],[2001e3,-1e3],[2001e3,1e3],[-1e3,1e3]],
17-
"composition models":[{"model":"uniform", "compositions":[4]}]},
19+
"composition models":[{"model":"uniform", "compositions":[4]}],
20+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
1821

1922
{"model":"mantle layer", "name":"lower mantle", "min depth":660e3, "max depth":1160e3, "coordinates":[[-1e3,-1e3],[2001e3,-1e3],[2001e3,1e3],[-1e3,1e3]],
20-
"composition models":[{"model":"uniform", "compositions":[5]}]},
23+
"composition models":[{"model":"uniform", "compositions":[5]}],
24+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
2125

2226
{"model":"subducting plate", "name":"Subducting plate", "coordinates":[[1150e3,-1e3],[1150e3,1e3]], "dip point":[2000e3,0],
2327
"segments":[{"length":200e3, "thickness":[95e3], "angle":[0,45]}, {"length":200e3, "thickness":[95e3], "angle":[45]},
2428
{"length":200e3, "thickness":[95e3], "angle":[45,0]}, {"length":100e3, "thickness":[95e3], "angle":[0]}],
2529
"temperature models":[{"model":"plate model", "density":3300, "plate velocity":0.01}],
2630
"composition models":[{"model":"uniform", "compositions":[0], "max distance slab top":10e3},
27-
{"model":"uniform", "compositions":[1], "min distance slab top":10e3, "max distance slab top":95e3 }]}
31+
{"model":"uniform", "compositions":[1], "min distance slab top":10e3, "max distance slab top":95e3 }],
32+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]}
2833
]
2934
}

cookbooks/2d_spherical_subduction_rift/2d_spherical_subduction_rift.wb

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,31 @@
77
{"model":"oceanic plate", "name":"oceanic plate", "coordinates":[[-1,-1],[11.5,-1],[11.5,1],[-1,1]],
88
"temperature models":[{"model":"plate model", "max depth":95e3, "bottom temperature":1600, "spreading velocity":0.005, "ridge coordinates":[[[1,-1],[1,1]]]}],
99
"composition models":[{"model":"uniform", "compositions":[0], "max depth":10e3},
10-
{"model":"uniform", "compositions":[1], "min depth":10e3, "max depth":95e3}]},
10+
{"model":"uniform", "compositions":[1], "min depth":10e3, "max depth":95e3}],
11+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
1112

1213
{"model":"continental plate", "name":"continental plate", "coordinates":[[11.5,-1],[21,-1],[21,1],[11.5,1]],
1314
"temperature models":[{"model":"linear", "max depth":95e3, "bottom temperature":1600}],
1415
"composition models":[{"model":"uniform", "compositions":[2], "max depth":30e3},
15-
{"model":"uniform", "compositions":[3], "min depth":30e3, "max depth":65e3}]},
16+
{"model":"uniform", "compositions":[3], "min depth":30e3, "max depth":65e3}],
17+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
1618

1719
{"model":"mantle layer", "name":"upper mantle", "min depth":95e3, "max depth":660e3, "coordinates":[[-1,-1],[21,-1],[21,1],[-1,1]],
1820
"temperature models":[{"model":"linear", "min depth":95e3, "max depth":660e3, "top temperature":1600, "bottom temperature":1820}],
19-
"composition models":[{"model":"uniform", "compositions":[4]}]},
21+
"composition models":[{"model":"uniform", "compositions":[4]}],
22+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
2023

2124
{"model":"mantle layer", "name":"lower mantle", "min depth":660e3, "max depth":1160e3, "coordinates":[[-1,-1],[21,-1],[21,1],[-1,1]],
2225
"temperature models":[{"model":"linear", "min depth":660e3, "max depth":1160e3, "top temperature":1820, "bottom temperature":2000}],
23-
"composition models":[{"model":"uniform", "compositions":[5]}]},
26+
"composition models":[{"model":"uniform", "compositions":[5]}],
27+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]},
2428

2529
{"model":"subducting plate", "name":"Subducting plate", "coordinates":[[11.5,-1],[11.5,1]], "dip point":[20,0],
2630
"segments":[{"length":200e3, "thickness":[95e3], "angle":[0,45]}, {"length":200e3, "thickness":[95e3], "angle":[45]},
2731
{"length":200e3, "thickness":[95e3], "angle":[45,0]}, {"length":100e3, "thickness":[95e3], "angle":[0]}],
2832
"temperature models":[{"model":"plate model", "density":3300, "plate velocity":0.01, "adiabatic heating":false}],
2933
"composition models":[{"model":"uniform", "compositions":[0], "max distance slab top":10e3},
30-
{"model":"uniform", "compositions":[1], "min distance slab top":10e3, "max distance slab top":95e3}]}
34+
{"model":"uniform", "compositions":[1], "min distance slab top":10e3, "max distance slab top":95e3}],
35+
"velocity models":[{"model":"uniform", "velocity":[1,0,0]}]}
3136
]
3237
}

cookbooks/3d_cartesian_curved_subduction/3d_cartesian_curved_subduction.grid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# output variables
22
grid_type = cartesian
33
dim = 3
4-
compositions = 0
4+
compositions = 3
55

66
# domain of the grid
77
x_min = 0e3

cookbooks/3d_cartesian_curved_subduction/3d_cartesian_curved_subduction.wb

Lines changed: 78 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@
99
"features":
1010
[
1111
// defining an oceanic plate for the North and South American plate
12-
{"model":"oceanic plate", "name":"NS American plate",
13-
"coordinates":[[1700e3,0],[1700e3,300e3],[1606e3,650e3],
14-
[1350e3,906e3],[1000e3,1000e3],[-1e3,1000e3],
15-
[-1e3,1501e3],[2501e3,1501e3],[2501e3,-501e3],
16-
[-1e3,-501e3],[-1e3,-50e3],[2000e3,-50e3],
17-
[2000e3,0e3]],
18-
"temperature models":[{"model":"linear", "max depth":100e3}],
19-
"composition models":[{"model":"uniform", "compositions":[0],
20-
"max depth":30e3}]},
21-
22-
// Defining an oceanic plate for the Caribbean plate
23-
{"model":"oceanic plate", "name":"Caribbean plate",
24-
"coordinates":[[1700e3,300e3],[1689e3,422e3],[1658e3,539e3],
25-
[1606e3,650e3],[1536e3,749e3],[1450e3,836e3],
26-
[1350e3,906e3],[1239e3,958e3],[1122e3,989e3],
27-
[1000e3,1000e3],[650e3,1000e3],[-1e3,1000e3],
28-
[-1e3,0e3],[1700e3,0e3]],
29-
"temperature models":[{"model":"linear", "max depth":100e3}],
30-
"composition models":[{"model":"uniform", "compositions":[1],
31-
"max depth":30e3}]},
12+
//{"model":"oceanic plate", "name":"NS American plate",
13+
// "coordinates":[[1700e3,0],[1700e3,300e3],[1606e3,650e3],
14+
// [1350e3,906e3],[1000e3,1000e3],[-1e3,1000e3],
15+
// [-1e3,1501e3],[2501e3,1501e3],[2501e3,-501e3],
16+
// [-1e3,-501e3],[-1e3,-50e3],[2000e3,-50e3],
17+
// [2000e3,0e3]],
18+
// "temperature models":[{"model":"linear", "max depth":100e3}],
19+
// "composition models":[{"model":"uniform", "compositions":[0],
20+
// "max depth":30e3}]},
21+
//
22+
//// Defining an oceanic plate for the Caribbean plate
23+
//{"model":"oceanic plate", "name":"Caribbean plate",
24+
// "coordinates":[[1700e3,300e3],[1689e3,422e3],[1658e3,539e3],
25+
// [1606e3,650e3],[1536e3,749e3],[1450e3,836e3],
26+
// [1350e3,906e3],[1239e3,958e3],[1122e3,989e3],
27+
// [1000e3,1000e3],[650e3,1000e3],[-1e3,1000e3],
28+
// [-1e3,0e3],[1700e3,0e3]],
29+
// "temperature models":[{"model":"linear", "max depth":100e3}],
30+
// "composition models":[{"model":"uniform", "compositions":[1],
31+
// "max depth":30e3}]},
3232

3333
// Defining a continental plate for the weak zone
3434
{"model":"continental plate", "name":"Caribbean weak zone",
@@ -39,68 +39,69 @@
3939
"composition models":[{"model":"uniform", "compositions":[2],
4040
"max depth":30e3},
4141
{"model":"uniform", "compositions":[3],
42-
"min depth":30e3}]},
42+
"min depth":30e3}],
43+
"velocity models":[{"model":"uniform","velocity":[1,2,3]}]}//,
4344

4445
// Defining a mantle layer for the lower mantle
45-
{"model":"mantle layer", "name":"660", "min depth":660e3,
46-
"coordinates":[[-1e3,-500e3],[-501e3,2500e3],[2501e3,2500e3],
47-
[2501e3,-501e3]],
48-
"composition models":[{"model":"uniform", "compositions":[4]}]},
49-
50-
// Defining a subducting plate for the Lesser Antilles slab
51-
{"model":"subducting plate", "name":"Lesser Antilles slab",
52-
"coordinates":[[1700e3,0],[1700e3,300e3],[1606e3,650e3],
53-
[1350e3,906e3],[1000e3,1000e3],[650e3,1000e3]],
54-
"dip point":[-1,-1],
55-
"min depth":0, "max depth":660e3,
56-
"segments":
57-
[
58-
{"length":300e3, "thickness":[100e3], "angle":[0,50]},
59-
{"length":371e3, "thickness":[100e3], "angle":[50]},
60-
{"length":275e3, "thickness":[100e3], "angle":[50,0]},
61-
{"length":0e3, "thickness":[100e3], "angle":[0]}
62-
],
63-
"sections":
64-
[
65-
{"coorindate":"0",
66-
"segments":
67-
[
68-
{"length":300e3, "thickness":[100e3], "angle":[0,25]},
69-
{"length":371e3, "thickness":[100e3], "angle":[50]},
70-
{"length":300e3, "thickness":[100e3], "angle":[50,0]},
71-
{"length":50, "thickness":[100e3], "angle":[0]}
72-
]
73-
},
74-
{"coorindate":"5",
75-
"segments":
76-
[
77-
{"length":300e3, "thickness":[100e3], "angle":[0,25]},
78-
{"length":371e3, "thickness":[100e3], "angle":[50]},
79-
{"length":50e3, "thickness":[100e3], "angle":[50,0]},
80-
{"length":0, "thickness":[100e3], "angle":[0]}
81-
]
82-
}
83-
],
84-
"temperature models":
85-
[
86-
{"model":"plate model", "density":3300, "plate velocity":0.0144,
87-
"thermal conductivity":2.5, "thermal expansion coefficient":2e-5 }
88-
],
89-
"composition models":
90-
[
91-
{"model":"uniform","compositions":[0], "min distance slab top":30e3}
92-
]
93-
},
46+
//{"model":"mantle layer", "name":"660", "min depth":660e3,
47+
// "coordinates":[[-1e3,-500e3],[-501e3,2500e3],[2501e3,2500e3],
48+
// [2501e3,-501e3]],
49+
// "composition models":[{"model":"uniform", "compositions":[4]}]},
50+
//
51+
//// Defining a subducting plate for the Lesser Antilles slab
52+
//{"model":"subducting plate", "name":"Lesser Antilles slab",
53+
// "coordinates":[[1700e3,0],[1700e3,300e3],[1606e3,650e3],
54+
// [1350e3,906e3],[1000e3,1000e3],[650e3,1000e3]],
55+
// "dip point":[-1,-1],
56+
// "min depth":0, "max depth":660e3,
57+
// "segments":
58+
// [
59+
// {"length":300e3, "thickness":[100e3], "angle":[0,50]},
60+
// {"length":371e3, "thickness":[100e3], "angle":[50]},
61+
// {"length":275e3, "thickness":[100e3], "angle":[50,0]},
62+
// {"length":0e3, "thickness":[100e3], "angle":[0]}
63+
// ],
64+
// "sections":
65+
// [
66+
// {"coorindate":"0",
67+
// "segments":
68+
// [
69+
// {"length":300e3, "thickness":[100e3], "angle":[0,25]},
70+
// {"length":371e3, "thickness":[100e3], "angle":[50]},
71+
// {"length":300e3, "thickness":[100e3], "angle":[50,0]},
72+
// {"length":50, "thickness":[100e3], "angle":[0]}
73+
// ]
74+
// },
75+
// {"coorindate":"5",
76+
// "segments":
77+
// [
78+
// {"length":300e3, "thickness":[100e3], "angle":[0,25]},
79+
// {"length":371e3, "thickness":[100e3], "angle":[50]},
80+
// {"length":50e3, "thickness":[100e3], "angle":[50,0]},
81+
// {"length":0, "thickness":[100e3], "angle":[0]}
82+
// ]
83+
// }
84+
// ],
85+
// "temperature models":
86+
// [
87+
// {"model":"plate model", "density":3300, "plate velocity":0.0144,
88+
// "thermal conductivity":2.5, "thermal expansion coefficient":2e-5 }
89+
// ],
90+
// "composition models":
91+
// [
92+
// {"model":"uniform","compositions":[0], "min distance slab top":30e3}
93+
// ]
94+
//},
9495

9596
// Defining a continental plate for the weakzone between the Caribbean and
9697
// South America
97-
{"model":"continental plate","name":"South Weakzone",
98-
"coordinates":[[-1e3,0e3],[-1e3,-50e3],[2000e3,-50e3],[2000e3,0e3]],
99-
"temperature models":[{"model":"linear", "max depth":100e3}],
100-
"composition models":
101-
[
102-
{"model":"uniform","compositions":[2], "max depth":30e3},
103-
{"model":"uniform", "compositions":[3], "min depth":30e3}]}
98+
//{"model":"continental plate","name":"South Weakzone",
99+
// "coordinates":[[-1e3,0e3],[-1e3,-50e3],[2000e3,-50e3],[2000e3,0e3]],
100+
// "temperature models":[{"model":"linear", "max depth":100e3}],
101+
// "composition models":
102+
// [
103+
// {"model":"uniform","compositions":[2], "max depth":30e3},
104+
// {"model":"uniform", "compositions":[3], "min depth":30e3}]}
104105

105106
]
106107
}

include/world_builder/features/continental_plate.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ namespace WorldBuilder
4646
{
4747
class Interface;
4848
} // namespace Temperature
49+
namespace Velocity
50+
{
51+
class Interface;
52+
} // namespace Temperature
4953
} // namespace ContinentalPlateModels
5054

5155
/**
@@ -147,6 +151,14 @@ namespace WorldBuilder
147151
*/
148152
std::vector<std::unique_ptr<Features::ContinentalPlateModels::Grains::Interface> > grains_models;
149153

154+
/**
155+
* A vector containing all the pointers to the velocity models. This vector is
156+
* responsible for the features and has ownership over them. Therefore
157+
* unique pointers are used.
158+
* @see Features
159+
*/
160+
std::vector<std::unique_ptr<Features::ContinentalPlateModels::Velocity::Interface> > velocity_models;
161+
150162

151163
double min_depth;
152164
Objects::Surface min_depth_surface;

0 commit comments

Comments
 (0)