@@ -277,19 +277,54 @@ Phases = zeros(Int64, nx, 1, nz);
277277Temp = fill (1350.0 , nx, 1 , nz);
278278AddBox! (Phases, Temp, Grid2D; xlim= (- 800 ,0.0 ), zlim= (- 80.0 , 0.0 ), phase = ConstantPhase (1 ), T= HalfspaceCoolingTemp (Age= 40 ));
279279
280- trench = Trench (Start= (0.0 ,- 100.0 ), End= (0.0 ,100.0 ), Thickness= 80.0 , θ_max= 30.0 , Length= 300 , Lb= 150 , direction = 1.0 );
280+ trench = Trench (Start= (0.0 ,- 100.0 ), End= (0.0 ,100.0 ), Thickness= 80.0 , θ_max= 30.0 , Length= 300 , Lb= 150 );
281281# addSlab!(Phases, Temp, Grid2D, trench, phase = ConstantPhase(2), T=HalfspaceCoolingTemp(Age=40));
282282
283-
284283T_slab = LinearWeightedTemperature ( F1= HalfspaceCoolingTemp (Age= 40 ), F2= McKenzie_subducting_slab (Tsurface= 0 ,v_cm_yr= 4 , Adiabat = 0.0 ), crit_dist= 600 )
285284addSlab! (Phases, Temp, Grid2D, trench, phase = ConstantPhase (2 ), T= T_slab);
286285
287- # @test extrema(Phases) == (0, 2)
288-
286+ @test sum (Temp) ≈ 8.571402268095453e7
287+ @test extrema (Phases) == ( 0 , 2 )
289288
290289# Add them to the `CartData` dataset:
291- Grid2D = CartData (Grid2D. x. val, Grid2D. y. val, Grid2D. z. val ,(;Phases, Temp))
290+ # Grid2D = CartData(Grid2D.x.val, Grid2D.y.val, Grid2D.z.val ,(;Phases, Temp))
291+ # Write_Paraview(Grid2D,"Grid2D_SubductionCurvedMechanical");
292+
292293
293- Write_Paraview (Grid2D," Grid2D_SubductionCurvedMechanical" );
294+ # More seophisticated 2D example with overriding plate
295+ nx,nz = 512 ,128
296+ x = range (- 1000 ,1000 , nx);
297+ z = range (- 660 ,0 , nz);
298+ Grid2D = CartData (XYZGrid (x,0 ,z))
299+ Phases = zeros (Int64, nx, 1 , nz);
300+ Temp = fill (1350.0 , nx, 1 , nz);
301+ lith = LithosphericPhases (Layers= [15 20 55 ], Phases= [3 4 5 ], Tlab= 1250 )
302+ AddBox! (Phases, Temp, Grid2D; xlim= (0 ,1000 ), zlim= (- 150.0 , 0.0 ), phase = lith, T= HalfspaceCoolingTemp (Age= 80 ));
303+
304+ # The horizontal part of the oceanic plate is as before
305+ v_spread_cm_yr = 3 # spreading velocity
306+ lith = LithosphericPhases (Layers= [15 55 ], Phases= [1 2 ], Tlab= 1250 )
307+ AddBox! (Phases, Temp, Grid2D; xlim= (- 800 ,0.0 ), zlim= (- 150.0 , 0.0 ), phase = lith, T= SpreadingRateTemp (SpreadingVel= v_spread_cm_yr));
308+
309+ # Yet, now we add a trench as well. Note that we put a very thick slab to ensure that the thermal structure is smoothly transferring to the mantle
310+ AgeTrench_Myrs = 800e3 / (v_spread_cm_yr/ 1e2 )/ 1e6 # plate age @ trench
311+ trench = Trench (Start= (0.0 ,- 100.0 ), End= (0.0 ,100.0 ), Thickness= 150.0 , θ_max= 30.0 , Length= 400 , Lb= 200 ,
312+ WeakzoneThickness= 15 , WeakzonePhase= 6 , d_decoupling= 125 );
313+ addSlab! (Phases, Temp, Grid2D, trench, phase = lith, T= HalfspaceCoolingTemp (Age= AgeTrench_Myrs));
314+
315+ # In a next step, we want to add a smooth transition from a halfspace cooling thermal profile to a slab that is heated by the surrounding mantle below a decoupling depth `d_decoupling`.
316+ T_slab = LinearWeightedTemperature ( F1= HalfspaceCoolingTemp (Age= AgeTrench_Myrs), F2= McKenzie_subducting_slab (Tsurface= 0 ,v_cm_yr= v_spread_cm_yr, Adiabat = 0.0 ), crit_dist= 600 )
317+
318+ # # in this case, we have a more reasonable slab thickness:
319+ trench = Trench (Start= (0.0 ,- 100.0 ), End= (0.0 ,100.0 ), Thickness= 90.0 , θ_max= 30.0 , Length= 600 , Lb= 200 ,
320+ WeakzoneThickness= 15 , WeakzonePhase= 6 , d_decoupling= 125 );
321+ addSlab! (Phases, Temp, Grid2D, trench, phase = lith, T= T_slab);
322+
323+ # Lithosphere-asthenosphere boundary:
324+ ind = findall (Temp .> 1250 .&& (Phases.== 2 .|| Phases.== 5 ));
325+ Phases[ind] .= 0 ;
326+
327+ Grid2D = CartData (Grid2D. x. val,Grid2D. y. val,Grid2D. z. val, (;Phases, Temp))
328+ Write_Paraview (Grid2D," Grid2D_SubductionCurvedOverriding" );
294329
295330
0 commit comments