@@ -1067,37 +1067,32 @@ Compute the temperature field of a `McKenzie_subducting_slab` scenario
10671067"""
10681068function Compute_ThermalStructure (Temp, X, Y, Z,Phase, s:: McKenzie_subducting_slab )
10691069 @unpack Tsurface, Tmantle, Adiabat, v_cm_yr, κ, it = s
1070- @show Tsurface, Tmantle, Adiabat, v_cm_yr, κ, it
10711070
10721071 # Thickness of the layer:
10731072 D0 = (maximum (Z)- minimum (Z));
1073+ Zshift = Z .- Z[1 ] # McKenzie model is defined with Z = 0 at the bottom of the slab
10741074
10751075 # Convert subduction velocity from cm/yr -> m/s;
10761076 convert_velocity = 1 / (100.0 * 365.25 * 60.0 * 60.0 * 24.0 );
1077-
10781077 v_s = v_cm_yr* convert_velocity;
10791078
1080- # calculate the Reynolds number
1081- Re = (v_s* D0* 1000 )/ 2 / κ;
1082- @show Re, κ, v_s, v_cm_yr, D0
1083-
1079+ # calculate the thermal Reynolds number
1080+ Re = (v_s* D0* 1000 )/ 2 / κ; # factor 1000 to transfer D0 from km to m
1081+
10841082 # McKenzie model
10851083 sc = 1 / D0
1086-
1087- σ = zeros (size (Temp));
1088-
1084+ σ = ones (size (Temp));
10891085 # Dividi et impera
10901086 for i= 1 : it
1091- a = (- 1 ). ^ (i). / (i.* pi )
1092- b = (Re .- (Re.^ 2 .+ i . ^2. * pi .^ 2 ) .^ (0.5 )) .* X .* sc;
1093- c = sin .(i .* pi .* (1 .- abs .(Z .* sc))) ;
1087+ a = (- 1.0 ). ^ (i). / (i.* pi )
1088+ b = (Re .- (Re.^ 2 .+ i^ 2.0 .* pi ^ 2.0 ) . ^ (0.5 )) .* X .* sc;
1089+ c = sin .(i .* pi .* (1 .- abs .(Zshift .* sc))) ;
10941090 e = exp .(b);
1095- σ .+ = a.* e.* c
1091+ σ .+ = 2 * a.* e.* c
10961092 end
1097- @show extrema (σ)
10981093
1099- Temp .= Tmantle .+ 2 * (Tmantle- Tsurface). * σ;
1100- # Temp .= Temp + (Adiabat*abs.(Z))
1094+ Temp .= Tsurface .+ (Tmantle- Tsurface). * σ;
1095+ Temp .= Temp + (Adiabat* abs .(Z))
11011096
11021097 return Temp
11031098end
0 commit comments