Skip to content

Commit e0a2be1

Browse files
committed
change nicer handling
Changes of the functions in the test files
1 parent 3c5027d commit e0a2be1

File tree

6 files changed

+44
-44
lines changed

6 files changed

+44
-44
lines changed

docs/src/man/Tutorial_NumericalModel_2D.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ Temp = fill(1350.0, nx, 1, nz);
4747
We will start with a simple subduction setup, which consists of a horizontal part:
4848

4949
```julia
50-
add_box!(Phases, Temp, Grid2D; xlim=(-800,0.0), zlim=(-80.0, 0.0), phase = ConstantPhase(1));
50+
add_box!(Phases, Temp, Grid2D; xlim=(-800.0,0.0), zlim=(-80.0, 0.0), phase = ConstantPhase(1));
5151
```
5252

5353
And with the inclined part:
5454

5555
```julia
56-
add_box!(Phases, Temp, Grid2D; xlim=(0,300), zlim=(-80.0, 0.0), phase = ConstantPhase(1), DipAngle=30);
56+
add_box!(Phases, Temp, Grid2D; xlim=(0.0,300.0), zlim=(-80.0, 0.0), phase = ConstantPhase(1), DipAngle=30);
5757
```
5858

5959
Add them to the `CartData` dataset:
@@ -100,8 +100,8 @@ LithosphericPhases([15 55], [1 2], nothing)
100100
and set the slab again:
101101

102102
```julia
103-
add_box!(Phases, Temp, Grid2D; xlim=(-800,0.0), zlim=(-80.0, 0.0), phase = lith);
104-
add_box!(Phases, Temp, Grid2D; xlim=(0,300), zlim=(-80.0, 0.0), phase = lith, DipAngle=30);
103+
add_box!(Phases, Temp, Grid2D; xlim=(-800.0,0.0), zlim=(-80.0, 0.0), phase = lith);
104+
add_box!(Phases, Temp, Grid2D; xlim=(0.0,300.0), zlim=(-80.0, 0.0), phase = lith, DipAngle=30);
105105
```
106106

107107
Which looks like:
@@ -124,8 +124,8 @@ We can do that by specifying a thermal structure. For example, we can use the ha
124124

125125
```julia
126126
therm = HalfspaceCoolingTemp(Age=40)
127-
add_box!(Phases, Temp, Grid2D; xlim=(-800,0.0), zlim=(-80.0, 0.0), phase = lith, T=therm);
128-
add_box!(Phases, Temp, Grid2D; xlim=(0,300), zlim=(-80.0, 0.0), phase = lith, T = therm, DipAngle=30);
127+
add_box!(Phases, Temp, Grid2D; xlim=(-800.0,0.0), zlim=(-80.0, 0.0), phase = lith, T=therm);
128+
add_box!(Phases, Temp, Grid2D; xlim=(0.0,300.0), zlim=(-80.0, 0.0), phase = lith, T = therm, DipAngle=30);
129129
```
130130

131131
Which looks like:
@@ -159,13 +159,13 @@ a spreading velocity (note that this simply relates to the thermal structure and
159159

160160
```julia
161161
lith = LithosphericPhases(Layers=[15 55], Phases=[1 2], Tlab=1250)
162-
add_box!(Phases, Temp, Grid2D; xlim=(-800,0.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
162+
add_box!(Phases, Temp, Grid2D; xlim=(-800.0,0.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
163163
```
164164

165165
For the subduction we use a thermal structure of a slab heated by hot asthenosphere
166166

167167
```julia
168-
add_box!(Phases, Temp, Grid2D; xlim=(0,300), zlim=(-80.0, 0.0), phase = lith, T = McKenzie_subducting_slab(Tsurface=0,v_cm_yr=3), DipAngle=30);
168+
add_box!(Phases, Temp, Grid2D; xlim=(0.0,300.0), zlim=(-80.0, 0.0), phase = lith, T = McKenzie_subducting_slab(Tsurface=0,v_cm_yr=3), DipAngle=30);
169169
```
170170

171171
We can set the mantle lithosphere that is hotter > 1250 C to mantle:
@@ -186,25 +186,25 @@ Saved file: Grid2D_SubductionRidge.vts
186186
![Mechanical2D_Tutorial_4](../assets/img/Mechanical2D_Tutorial_4.png)
187187

188188
#### Overriding slab and weak layer
189-
Ok, lets add an overriding slab as well. For this, we use the `AddLayer!` function
189+
Ok, lets add an overriding slab as well. For this, we use the `add_layer!` function
190190

191191
```julia
192192
lith = LithosphericPhases(Layers=[15 20 55], Phases=[3 4 5], Tlab=1250)
193-
add_box!(Phases, Temp, Grid2D; xlim=(0,1000), zlim=(-80.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
193+
add_box!(Phases, Temp, Grid2D; xlim=(0.0,1000.0), zlim=(-80.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
194194
```
195195

196196
The oceanic plate is as before
197197

198198
```julia
199199
lith = LithosphericPhases(Layers=[15 55], Phases=[1 2], Tlab=1250)
200-
add_box!(Phases, Temp, Grid2D; xlim=(-800,0.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
200+
add_box!(Phases, Temp, Grid2D; xlim=(-800.0,0.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
201201
```
202202

203203
For the inclined part, we set a layer above the slab (the "weak" layer to facilitate subduction initiation )
204204

205205
```julia
206206
lith = LithosphericPhases(Layers=[10 15 55], Phases=[6 1 2], Tlab=1250)
207-
add_box!(Phases, Temp, Grid2D; xlim=(0,300), zlim=(-80.0, 10.0), phase = lith, T = McKenzie_subducting_slab(Tsurface=0,v_cm_yr=3), DipAngle=30);
207+
add_box!(Phases, Temp, Grid2D; xlim=(0.0,300.0), zlim=(-80.0, 10.0), phase = lith, T = McKenzie_subducting_slab(Tsurface=0,v_cm_yr=3), DipAngle=30);
208208
```
209209

210210
Lithosphere-asthenosphere boundary:
@@ -236,7 +236,7 @@ z = range(-660,0, nz);
236236
Grid2D = CartData(xyz_grid(x,0,z))
237237
Phases = zeros(Int64, nx, 1, nz);
238238
Temp = fill(1350.0, nx, 1, nz);
239-
add_box!(Phases, Temp, Grid2D; xlim=(-800,0.0), zlim=(-80.0, 0.0), phase = ConstantPhase(1));
239+
add_box!(Phases, Temp, Grid2D; xlim=(-800.0,0.0), zlim=(-80.0, 0.0), phase = ConstantPhase(1));
240240
```
241241

242242
Next, we should define a `Trench` structure, which contains info about the trench which goes in 3D from `Start` - `End` coordinates (`x`,`y`)-coordinates respectively. As we are dealing with a 2D model, we set the `y`-coordinates to -100.0 and 100.0 respectively.
@@ -284,16 +284,16 @@ LithosphericPhases([15 20 55], [3 4 5], 1250)
284284
Lets start with defining the horizontal part of the overriding plate. Note that we define this twice with different thickness to deal with the bending subduction area:
285285

286286
```julia
287-
add_box!(Phases, Temp, Grid2D; xlim=(200,1000), zlim=(-150.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
288-
add_box!(Phases, Temp, Grid2D; xlim=(0,200), zlim=(-50.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
287+
add_box!(Phases, Temp, Grid2D; xlim=(200.0,1000.0), zlim=(-150.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
288+
add_box!(Phases, Temp, Grid2D; xlim=(0.0,200.0), zlim=(-50.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
289289
```
290290

291291
The horizontal part of the oceanic plate is as before:
292292

293293
```julia
294294
v_spread_cm_yr = 3 #spreading velocity
295295
lith = LithosphericPhases(Layers=[15 55], Phases=[1 2], Tlab=1250)
296-
add_box!(Phases, Temp, Grid2D; xlim=(-800,0.0), zlim=(-150.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=v_spread_cm_yr));
296+
add_box!(Phases, Temp, Grid2D; xlim=(-800.0,0.0), zlim=(-150.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=v_spread_cm_yr));
297297
```
298298

299299
Yet, now we add a trench as well. The starting thermal age at the trench is that of the horizontal part of the oceanic plate:

docs/src/man/Tutorial_NumericalModel_3D.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ Note that if the lowermost layer has the same phase as the mantle, you can defin
4343

4444
```julia
4545
lith = LithosphericPhases(Layers=[15 45 10], Phases=[0 1 2], Tlab=1250)
46-
add_box!(Phases, Temp, Grid; xlim=(-800,0.0), ylim=(-400, 400.0), zlim=(-80.0, 0.0), phase = lith,
46+
add_box!(Phases, Temp, Grid; xlim=(-800.0,0.0), ylim=(-400, 400.0), zlim=(-80.0, 0.0), phase = lith,
4747
Origin=(-0,0,0),
4848
T=SpreadingRateTemp(SpreadingVel=3, MORside="right"), StrikeAngle=30);
4949
```
5050

5151
And an an inclined part:
5252

5353
```julia
54-
add_box!(Phases, Temp, Grid; xlim=(0,300), ylim=(-400, 400.0), zlim=(-80.0, 0.0), phase = lith,
54+
add_box!(Phases, Temp, Grid; xlim=(0.0,300.0), ylim=(-400.0, 400.0), zlim=(-80.0, 0.0), phase = lith,
5555
Origin=(-0,0,0),
5656
T=McKenzie_subducting_slab(Tsurface=0,v_cm_yr=3), DipAngle=30, StrikeAngle=30);
5757
```
@@ -104,27 +104,27 @@ Overriding plate with a 30 km crust and mantle lithosphere that where T<1250 cel
104104

105105
```julia
106106
lith_cont = LithosphericPhases(Layers=[30 200 50], Phases=[3 4 2], Tlab=1250)
107-
add_box!(Phases, Temp, Grid; xlim=(400,1000), ylim=(-1000, 0.0), zlim=(-240.0, 0.0), phase = lith_cont, T=HalfspaceCoolingTemp(Age=150));
108-
add_box!(Phases, Temp, Grid; xlim=(200,1000), ylim=(-1000, 0.0), zlim=(-80.0, 0.0), phase = lith_cont, T=HalfspaceCoolingTemp(Age=150));
107+
add_box!(Phases, Temp, Grid; xlim=(400.0,1000.0), ylim=(-1000.0, 0.0), zlim=(-240.0, 0.0), phase = lith_cont, T=HalfspaceCoolingTemp(Age=150));
108+
add_box!(Phases, Temp, Grid; xlim=(200.0,1000.0), ylim=(-1000.0, 0.0), zlim=(-80.0, 0.0), phase = lith_cont, T=HalfspaceCoolingTemp(Age=150));
109109

110110
lith_cont = LithosphericPhases(Layers=[30 200 10], Phases=[5 6 2], Tlab=1250)
111-
add_box!(Phases, Temp, Grid; xlim=(400,1000), ylim=(0, 1000), zlim=(-240.0, 0.0), phase = lith_cont, T=HalfspaceCoolingTemp(Age=200));
112-
add_box!(Phases, Temp, Grid; xlim=(200,1000), ylim=(0, 1000), zlim=( -80.0, 0.0), phase = lith_cont, T=HalfspaceCoolingTemp(Age=200));
111+
add_box!(Phases, Temp, Grid; xlim=(400.0,1000.0), ylim=(0.0, 1000.0), zlim=(-240.0, 0.0), phase = lith_cont, T=HalfspaceCoolingTemp(Age=200));
112+
add_box!(Phases, Temp, Grid; xlim=(200.0,1000.0), ylim=(0.0, 1000.0), zlim=( -80.0, 0.0), phase = lith_cont, T=HalfspaceCoolingTemp(Age=200));
113113
```
114114

115115
Define an oceanic plate with ridge
116116

117117
```julia
118118
v_spread_cm_yr = 3 #spreading velocity
119119
lith = LithosphericPhases(Layers=[15 45 10], Phases=[0 1 2], Tlab=1250)
120-
add_box!(Phases, Temp, Grid; xlim=(-800 , 200), ylim=(-1000, -400.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
121-
add_box!(Phases, Temp, Grid; xlim=(-1000,-800), ylim=(-1000, -400.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3,MORside="right"));
120+
add_box!(Phases, Temp, Grid; xlim=(-800.0 , 200.0), ylim=(-1000.0, -400.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
121+
add_box!(Phases, Temp, Grid; xlim=(-1000.0,-800.0), ylim=(-1000.0, -400.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3,MORside="right"));
122122

123-
add_box!(Phases, Temp, Grid; xlim=(-700, 200), ylim=(-400, 200.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
124-
add_box!(Phases, Temp, Grid; xlim=(-1000,-700), ylim=(-400, 200.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3,MORside="right"));
123+
add_box!(Phases, Temp, Grid; xlim=(-700.0, 200.0), ylim=(-400.0, 200.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
124+
add_box!(Phases, Temp, Grid; xlim=(-1000.0,-700.0), ylim=(-400.0, 200.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3,MORside="right"));
125125

126-
add_box!(Phases, Temp, Grid; xlim=(-650, 200), ylim=(200, 1000.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
127-
add_box!(Phases, Temp, Grid; xlim=(-1000,-650), ylim=(200, 1000.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3,MORside="right"));
126+
add_box!(Phases, Temp, Grid; xlim=(-650.0, 200.0), ylim=(200.0, 1000.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3));
127+
add_box!(Phases, Temp, Grid; xlim=(-1000.0,-650.0), ylim=(200.0, 1000.0), zlim=(-80.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=3,MORside="right"));
128128
```
129129

130130
Subducting parts of the oceanic plate
@@ -153,7 +153,7 @@ T_slab = LinearWeightedTemperature( F1=HalfspaceCoolingTemp(Age=AgeTrench_Myrs)
153153
add_slab!(Phases, Temp, Grid, trench1, phase = lith, T=T_slab);
154154
```
155155

156-
Finally, it is often nice to see the deformation of the plate when it subducts. A simple way to do that is to put a `stripes` on top using `addStripes`, which has the same phase as the subducting crust.
156+
Finally, it is often nice to see the deformation of the plate when it subducts. A simple way to do that is to put a `stripes` on top using `add_stripes!`, which has the same phase as the subducting crust.
157157

158158
```julia
159159
add_stripes!(Phases, Grid; stripAxes = (1,1,0), phase = ConstantPhase(0), stripePhase = ConstantPhase(9), stripeWidth=50, stripeSpacing=200)

docs/src/man/tutorial_Polygon_structures.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ z = LinRange(-660,50,nz)
2525
Cart = CartData(xyz_grid(x, y, z))
2626

2727
# initialize phase and temperature matrix
28-
Phase = ones(Int32,size(X))
29-
Temp = ones(Float64,size(X))*1350
28+
Phase = fill(1,nx,ny,nz);
29+
Temp = fill(1350.0, nx,ny,nz);
3030

3131
# add different phases: crust->2, Mantle Lithosphere->3 Mantle->1
3232
add_box!(Phase, Temp, Cart; xlim=(0.0,800.0),ylim=(0.0,800.0), zlim=(-800.0,0.0), phase = LithosphericPhases(Layers=[15 30 100 800], Phases=[2 3 1 5], Tlab=1300 ), T=LinearTemp(Ttop=20, Tbot=1600))
@@ -61,8 +61,8 @@ For visualisation and comparison to actual measured data, the mode setup is save
6161

6262
```julia
6363
# # Save data to paraview:
64-
Data_Final = CartData(X,Y,Z,(Phase=Phase,Temp=Temp));
65-
write_paraview(Data_Final, "Sedimentary_basin");
64+
Cart = addfield(Cart,(;Phase, Temp))
65+
write_paraview(Cart, "Sedimentary_basin");
6666
```
6767

6868
After importing and looking at the file to paraview, some unresolved areas might be visible as they are visible in this model. That is due to the resolution and shape of the polygon. To reduce those artefacts an increase in resolution or a change of the polygon angle might help.

src/Setup_geometry.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ end
349349

350350

351351
"""
352-
add_sphere!(Phase, Temp, Grid::AbstractGeneralGrid; cen::NTuple{3, _T} = (0,0,-1), radius::NTuple{1, _T} = (0.5),
352+
add_sphere!(Phase, Temp, Grid::AbstractGeneralGrid; cen::NTuple{3, _T} = (0,0,-1), radius::Number,
353353
phase = ConstantPhase(1).
354354
T=nothing, cell=false ) where _T
355355
@@ -392,7 +392,7 @@ julia> write_paraview(Model3D,"LaMEM_ModelSetup") # Save model to para
392392
```
393393
"""
394394
function add_sphere!(Phase, Temp, Grid::AbstractGeneralGrid; # required input
395-
cen::NTuple{3, _T} = (0,0,-1), radius::NTuple{1, _T} = (0.5), # center and radius of the sphere
395+
cen::NTuple{3, _T} = (0,0,-1), radius::Number, # center and radius of the sphere
396396
phase = ConstantPhase(1), # Sets the phase number(s) in the sphere
397397
T=nothing, cell=false ) where _T # Sets the thermal structure (various functions are available)
398398

@@ -498,7 +498,7 @@ function add_ellipsoid!(Phase, Temp, Grid::AbstractGeneralGrid; # required i
498498
end
499499

500500
"""
501-
add_cylinder!(Phase, Temp, Grid::AbstractGeneralGrid; base::NTuple{3, _T} = (-1,-1,-1.5), cap::NTuple{3, _T} = (-1,-1,-0.5), radius::NTuple{1, _T} = (0.25),
501+
add_cylinder!(Phase, Temp, Grid::AbstractGeneralGrid; base::NTuple{3, _T} = (-1,-1,-1.5), cap::NTuple{3, _T} = (-1,-1,-0.5), radius::Number,
502502
phase = ConstantPhase(1),
503503
T=nothing, cell=false ) where _T
504504
@@ -542,7 +542,7 @@ julia> write_paraview(Model3D,"LaMEM_ModelSetup") # Save model to para
542542
```
543543
"""
544544
function add_cylinder!(Phase, Temp, Grid::AbstractGeneralGrid; # required input
545-
base::NTuple{3, _T} = (-1,-1,-1.5), cap::NTuple{3, _T} = (-1,-1,-0.5), radius=::NTuple{1, _T} = (0.25), # center and radius of the sphere
545+
base::NTuple{3, _T} = (-1,-1,-1.5), cap::NTuple{3, _T} = (-1,-1,-0.5), radius::Number, # center and radius of the sphere
546546
phase = ConstantPhase(1), # Sets the phase number(s) in the sphere
547547
T=nothing, cell=false ) where _T # Sets the thermal structure (various functions are available)
548548

@@ -638,7 +638,7 @@ julia> write_paraview(Model3D,"LaMEM_ModelSetup") # Save model to para
638638
639639
"""
640640
function add_polygon!(Phase, Temp, Grid::AbstractGeneralGrid; # required input
641-
xlim=(), ylim=::NTuple{2, _T} = (0,0.8), zlim=(), # limits of the box
641+
xlim=(), ylim::NTuple{2, _T} = (0,0.8), zlim=(), # limits of the box
642642
phase = ConstantPhase(1), # Sets the phase number(s) in the box
643643
T=nothing, cell=false ) where _T # Sets the thermal structure (various functions are available)
644644

test/test_lamem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ rm("test_topo.dat")
9393
Grid = read_LaMEM_inputfile("test_files/GeometricPrimitives.dat")
9494
Phases = zeros(Int32,size(Grid.X));
9595
Temp = zeros(Float64,size(Grid.X));
96-
add_sphere!(Phases,Temp,Grid, cen=(0,0,-6), radius=2, phase=ConstantPhase(1), T=ConstantTemp(800))
96+
add_sphere!(Phases,Temp,Grid, cen=(0,0,-6), radius=2.0, phase=ConstantPhase(1), T=ConstantTemp(800))
9797
@test Phases[55,55,55] == 1
9898
@test Phases[56,56,56] == 0
9999
@test Temp[44,52,21] == 800.0

test/test_setup_geometry.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ add_box!(Phase, Temp, Cart; xlim=(0.0,600.0),ylim=(0.0,600.0), zlim=(-80.0, 0.0)
195195

196196
# inclined slab
197197
Temp = ones(Float64,size(Cart))*1350;
198-
add_box!(Phase, Temp, Cart; xlim=(0.0,600.0),ylim=(0.0,600.0), zlim=(-80.0,0),StrikeAngle=0, DipAngle=45, phase = ConstantPhase(5), T=TsMK);
198+
add_box!(Phase, Temp, Cart; xlim=(0.0,600.0),ylim=(0.0,600.0), zlim=(-80.0,0.0),StrikeAngle=0, DipAngle=45, phase = ConstantPhase(5), T=TsMK);
199199
@test sum(Temp) 3.5125017626287365e8
200200

201201

@@ -299,7 +299,7 @@ z = range(-660,0, nz);
299299
Grid2D = CartData(xyz_grid(x,0,z))
300300
Phases = zeros(Int64, nx, 1, nz);
301301
Temp = fill(1350.0, nx, 1, nz);
302-
add_box!(Phases, Temp, Grid2D; xlim=(-800,0.0), zlim=(-80.0, 0.0), phase = ConstantPhase(1), T=HalfspaceCoolingTemp(Age=40));
302+
add_box!(Phases, Temp, Grid2D; xlim=(-800.0,0.0), zlim=(-80.0, 0.0), phase = ConstantPhase(1), T=HalfspaceCoolingTemp(Age=40));
303303

304304
trench = Trench(Start=(0.0,-100.0), End=(0.0,100.0), Thickness=80.0, θ_max=30.0, Length=300, Lb=150);
305305
add_slab!(Phases, Temp, Grid2D, trench, phase = ConstantPhase(2), T=HalfspaceCoolingTemp(Age=40));
@@ -325,13 +325,13 @@ Temp = fill(1350.0, nx, 1, nz);
325325
lith = LithosphericPhases(Layers=[15 20 55], Phases=[3 4 5], Tlab=1250)
326326

327327
# Lets add the overriding plate. Note that we add this twice with a different thickness to properly represent the transition around the trench
328-
add_box!(Phases, Temp, Grid2D; xlim=(200,1000), zlim=(-150.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
329-
add_box!(Phases, Temp, Grid2D; xlim=(0,200), zlim=(-60.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
328+
add_box!(Phases, Temp, Grid2D; xlim=(200.0,1000.0), zlim=(-150.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
329+
add_box!(Phases, Temp, Grid2D; xlim=(0.0,200.0), zlim=(-60.0, 0.0), phase = lith, T=HalfspaceCoolingTemp(Age=80));
330330

331331
# The horizontal part of the oceanic plate is as before
332332
v_spread_cm_yr = 3 #spreading velocity
333333
lith = LithosphericPhases(Layers=[15 55], Phases=[1 2], Tlab=1250)
334-
add_box!(Phases, Temp, Grid2D; xlim=(-800,0.0), zlim=(-150.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=v_spread_cm_yr));
334+
add_box!(Phases, Temp, Grid2D; xlim=(-800.0,0.0), zlim=(-150.0, 0.0), phase = lith, T=SpreadingRateTemp(SpreadingVel=v_spread_cm_yr));
335335

336336
# Yet, now we add a trench as well.
337337
AgeTrench_Myrs = 800e3/(v_spread_cm_yr/1e2)/1e6 #plate age @ trench

0 commit comments

Comments
 (0)