@@ -278,7 +278,7 @@ Temp = 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
280280trench = Trench (Start= (0.0 ,- 100.0 ), End= (0.0 ,100.0 ), Thickness= 80.0 , θ_max= 30.0 , Length= 300 , Lb= 150 );
281- # addSlab!(Phases, Temp, Grid2D, trench, phase = ConstantPhase(2), T=HalfspaceCoolingTemp(Age=40));
281+ addSlab! (Phases, Temp, Grid2D, trench, phase = ConstantPhase (2 ), T= HalfspaceCoolingTemp (Age= 40 ));
282282
283283T_slab = LinearWeightedTemperature ( F1= HalfspaceCoolingTemp (Age= 40 ), F2= McKenzie_subducting_slab (Tsurface= 0 ,v_cm_yr= 4 , Adiabat = 0.0 ), crit_dist= 600 )
284284addSlab! (Phases, Temp, Grid2D, trench, phase = ConstantPhase (2 ), T= T_slab);
@@ -291,40 +291,42 @@ addSlab!(Phases, Temp, Grid2D, trench, phase = ConstantPhase(2), T=T_slab);
291291# Write_Paraview(Grid2D,"Grid2D_SubductionCurvedMechanical");
292292
293293
294- # More seophisticated 2D example with overriding plate
294+ # More sophisticated 2D example with overriding plate
295295nx,nz = 512 ,128
296296x = range (- 1000 ,1000 , nx);
297297z = range (- 660 ,0 , nz);
298298Grid2D = CartData (XYZGrid (x,0 ,z))
299299Phases = zeros (Int64, nx, 1 , nz);
300300Temp = fill (1350.0 , nx, 1 , nz);
301301lith = 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 ));
302+
303+ # Lets add the overriding plate. Note that we add this twice with a different thickness to properly represent the transition around the trench
304+ AddBox! (Phases, Temp, Grid2D; xlim= (200 ,1000 ), zlim= (- 150.0 , 0.0 ), phase = lith, T= HalfspaceCoolingTemp (Age= 80 ));
305+ AddBox! (Phases, Temp, Grid2D; xlim= (0 ,200 ), zlim= (- 60.0 , 0.0 ), phase = lith, T= HalfspaceCoolingTemp (Age= 80 ));
303306
304307# The horizontal part of the oceanic plate is as before
305308v_spread_cm_yr = 3 # spreading velocity
306309lith = LithosphericPhases (Layers= [15 55 ], Phases= [1 2 ], Tlab= 1250 )
307310AddBox! (Phases, Temp, Grid2D; xlim= (- 800 ,0.0 ), zlim= (- 150.0 , 0.0 ), phase = lith, T= SpreadingRateTemp (SpreadingVel= v_spread_cm_yr));
308311
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
312+ # Yet, now we add a trench as well.
310313AgeTrench_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));
314314
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`.
315+ # 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`.
316316T_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 )
317317
318318# # 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 ,
319+ trench = Trench (Start= (0.0 ,- 100.0 ), End= (0.0 ,100.0 ), Thickness= 90.0 , θ_max= 30.0 , Length= 600 , Lb= 200 ,
320320 WeakzoneThickness= 15 , WeakzonePhase= 6 , d_decoupling= 125 );
321- addSlab! (Phases, Temp, Grid2D, trench, phase = lith, T= T_slab);
321+ addSlab! (Phases, Temp, Grid2D, trench, phase = lith, T= T_slab);
322322
323323# Lithosphere-asthenosphere boundary:
324324ind = findall (Temp .> 1250 .&& (Phases.== 2 .|| Phases.== 5 ));
325325Phases[ind] .= 0 ;
326326
327- Grid2D = CartData (Grid2D. x. val,Grid2D. y. val,Grid2D. z. val, (;Phases, Temp))
328- Write_Paraview (Grid2D," Grid2D_SubductionCurvedOverriding" );
327+ @test sum (Temp) ≈ 8.292000736425713e7
328+ @test extrema (Phases) == (0 , 6 )
329+ # Grid2D = CartData(Grid2D.x.val,Grid2D.y.val,Grid2D.z.val, (;Phases, Temp))
330+ # Write_Paraview(Grid2D,"Grid2D_SubductionCurvedOverriding");
329331
330332
0 commit comments