ClearAll["Global`*"]; 
X  =  Y  =  Z  =  0; 
T1'  =  350; 
 T2'  =  350; 
 T3'  =  350; 
eps  =  0.0001; 
yag  =  0.632 ; 
temppara = 50.9762; 
para1  =  1; 
scanv  =  {0,  1. ,  2.5,  3.34,  5.01,  10. ,  20. ,  
            30. ,     49.98,  50. ,  75. ,  100}; 
Pinc  =  {18,  20,  30,  32,  37,  49,  50,  100}; 
T0  =  {350,  250,  300,  350,  400,  450,  500}; 
  rx  =  {10,  20,  30,  40,  50,  100,  150,  200,  
            300,  500}; 
  thconds  =  {0.548,  0.1235,  0.561};
 absorp  =  {0.0005,  0,  0.0009}; 
  diffs  =  {0.248,  0.00676,  0.2}; 
  l1n  =  {1000, 12.5, 540,  0.5,  1. ,  2. ,  5. ,  
            10. ,  20. ,  50. ,  100. ,  540}; 
  l2n  =  {0,  0.6,  1. ,  1.5,  2.5,  5.5,  10.5,  
            20.5,  50.5,  100.5}; 
	 l3n = {0, 12.5, 50.6,  51, 51.5, 52.5, 55.5}; 
  
l2fill = {1000, 59.5, 11.5, 5.5, 2.5, 0.7};
 s  =  1;
r  =  5; 
p  =  1; 
l1  =  1; 
l2  =  1; 
l3  =  1;  
  
lammax1 = 0.999999;
lammax2 = 0.999999;
lammax3 = 0.999999;
ksimax1 = 1000;
ksimax2 = 1000;
ksimax3 = 1000;
Label[begin1]; 
L1  =  l1n[[l1]]/rx[[r]]; 
L2  =  l1n[[l2]]/rx[[r]]; 
L3  =  l1n[[l3]]/rx[[r]]; 
AC  =  299; 
BC  =  99; 
Tk  =  99; 
Td  =  128; 
	T10 = 623;
T1  =  273  +  T1'; 
T2  =  273  +  T2'; 
T3  =  273  +   T3'; 
RS1  =  0.419  +  0.0000429*T1; 
RS2  =  0.0419  +  0.0000429*T2; 
RS3  =  0.367  +  0.0000429*T3; 
PA1  =  para1*(1  -  RS1)*Pinc[[p]]; 
PA2  =  
            para1*(1  -  RS1)*(1  -  RS2) *Pinc[[p]];    
 PA3  =  
            para1*(1  -  RS1)*(1  -  RS2)*(1  -  RS3) *
              Pinc[[p]];
	K10 = 314/(T10 - 50)  // N;
K1  =  N[299/(T1  -  Tk)]; 
K2  =  K1/13 // N;
K3  =  N[299/(T3  -  Tk)]; 
D1  = K1/cp1 // N; 
D2  = K2/cp2 // N; 
D3  =  N[299/(T3  -  Td)]; 
V1  =  0.0001*scanv[[s]]*rx[[r]]/D1; 
V2  =  0.0001*scanv[[s]]*rx[[r]]/D2; 
V3  =  0.0001*scanv[[s]]*rx[[r]]/D3; 
delL1  =  L2  -  L1; 
delL2  =  L3  -  L2; 
omega1  =  Sqrt[ksi^2  +  I*V1*lambda*ksi]; 
omega2  =  Sqrt[ksi^2  +  I*V2*lambda*ksi]; 
omega3  =  Sqrt[ksi^2  +  I*V3*lambda*ksi]; 
K1O2  =  K1*omega1/(K2*omega2); 
K2O3  =  K2*omega2/(K3*omega3); 
O1dL1  =  omega1*delL1; 
O2dL2  =  omega2*delL2; 
D0  =  IdentityMatrix[2]; 
\(C1\  = \ {{\((1\  + \ K1O2)\)*Exp[O1dL1], \ \((1\  - \ K1O2)\)*
                Exp[O1dL1]}, \ 
\ \ \ \ {\((1\  - \ K1O2)\)*
                Exp[\(-O1dL1\)], \ \((1\  + \ K1O2)\)*Exp[\(-O1dL1\)]}};\) 
MatrixForm[C1]; 
C11  =  C1[[1, 1]]; 
C12  =  C1[[1, 2]]; 
C21  =  C1[[2, 1]]; 
C22  =  C1[[2, 2]]; 
\(C2\  = \ {{\((1\  + \ K2O3)\)*Exp[O2dL2], \ \((1\  - \ K2O3)\)*
                Exp[O2dL2]}, \ 
\ \ \ \ {\((1\  - \ K2O3)\)*
                Exp[\(-O2dL2\)], \ \((1\  + \ K2O3)\)*Exp[\(-O2dL2\)]}};\) 
MatrixForm[C2]; 
D2  =  0.5*C2  .  C1; 
MatrixForm[D2]; 
D11  =  D2[[1, 1]]; 
D12  =  D2[[1, 2]]; 
D21  =  D2[[2, 1]]; 
D22  =  D2[[2, 2]]; 
\(func0\  = \ \((I*Cos[X*lambda*ksi]\  + \ 
                  Sin[X*lambda*ksi])\)/\((I*Sqrt[1\  - \ lambda^2])\)*
            ksi/omega1*
\ \ \ \ Cos[Y*ksi*Sqrt[1\  - \ lambda^2]]*
            Exp[\(-0.5\)*ksi^2];\) 
A1  =  -D12/(D11*Exp[omega1*L1]  +  
                D12*Exp[-omega1*L1]); 
B1  =  
          D11/(D11*Exp[omega1*L1]  +  D12*Exp[-omega1*L1]); 
g0  =  
          Exp[-omega1*Z]  +  A1*Exp[omega1*(Z  -  L1)]  +  
            B1*Exp[-omega1*(Z  -  L1)]; 
pk100  =  N[PA1/K10]; 
pk200  =  N[K10/AC]; 
integral0  =  
          NIntegrate[
            Re[func0*g0],  {lambda,  0,  lammax1},  {ksi,  0,  
              ksimax1}]; 
thetamax  =  0.1013*pk100*integral0; 
 T1'  =  
          99  +  (T0  -  99)*Exp[pk200*thetamax]  -  273; 
T1  =  T1'  +  273; 
Print[]; 
Print[{integral0,  thetamax}]
lineartemp[r_, l2_]:=
Module[{func, g1, g2, g3, integral1, integral2, integral3},
Do[      znormal =  
                        OpenAppend ["znyamadaLtmodulelammax512903" ];            			
 \(zttemp = \ 
                        OpenAppend\ [\ "zttyamadaLtmodulelammax512903"\ ]\);             		
T1' = 350 + 273;
         T2' = 350 + 273;
         T3' = 350 + 273;	
     scanv  =  {0,  1. ,  2.5,  3.34,  
                        5.01,  10. ,  20. ,  30. ,  49.98, 50. , 75. , 
                        100}; 
    Pinc  =  {18,  20,  30,  32,  37,  49,  
                        50,  100}; 
    T0  =  {350,  250,  300,  350,  400,  
                        450,  500}; 
    rx  =  {10,  20,  30,  40,  50,  100,  
                        150,  200,  300,  500}; 
l1n = {540, 0.5, 1.0, 2.0, 5.0, 
                        10.0, 20.0, 50.0, 100.0, 540};
l2n = {0, 0.6, 1.0, 1.5, 2.5, 
                        5.5, 10.5, 20.5, 50.5, 100.5};
l3n = {0, 50.6, 51, 51.5, 52.5, 
                        55.5, 55.5, 60.5, 70.5, 100.5, 150.5};
  
l2fill = {1000, 59.5, 11.5, 5.5, 2.5, 0.7, 
                          0.725, 0.7375, 0.1, 0.1};
        s = 5;
p = 1;	
l1 = 2;
l3 = 9;
  
lammax1 = 0.999999;
lammax2 = 0.999999;
lammax3 = 0.999999;
ksimax1 = 1000;
ksimax2 = 1000;
ksimax3 = 1000;
Label[begin1];	
     
	  
     	
  L1  = l1n[[l1]]/rx[[r]];
  L2  = l2n[[l2]]/rx[[r]];
  L3  = l3n[[l3]]/rx[[r]];
	z1max = L1;
delL1 = L2 - L1;	
dz2 =  delL1/2  // N;		
z2max = z1max  + 2*dz2;		
dz3 = 
                      l2fill[[l2]]*delL1 // N;	
z3max = z2max  + 2*dz3;
	  
	  
  cp1 = 2.21 ;       
cp2 = 3.09 ; 
	AC = 299;
	BC = 99;
	Tk = 99;
	Td = 128;
	T10 = 623;
	T1 =  T1';
	T2 =  T2';
	T3 =  T3';
RS1  =  0.419  +  0.0000429*T1; 
RS2  =  0.0419  +  0.0000429*T2; 
RS3  =  0.367  +  0.0000429*T3; 
PA1  =  
                        para1*(1  -  RS1)*Pinc[[p]]; 
PA2  =  
                        para1*(1  -  RS1)*(1  -  RS2) *
                          Pinc[[p]];    
 PA3  =  
                        para1*(1  -  RS1)*(1  -  RS2)*(1  -  
                              RS3) *Pinc[[p]];
	K10 = 314/(T10 - 50)  // N;
K1  =  N[299/(T1  -  Tk)]; 
K2  =  K1/13 // N;
K3  =  N[299/(T3  -  Tk)]; 
D1  = K1/cp1 // N; 
D2  = K2/cp2 // N; 
D3  =  299/(T3  -  Td) // N; 
V1 = 
                      0.0001 scanv[[s]] rx[[r]] /D1;
	V2 = 0.0001 scanv[[s]] rx[[r]] /D2;
	V3 = 0.0001 scanv[[s]] rx[[r]] /D3; 
 delL1 = L2 - L1;
delL2 = L3 - L2;
omega1 = Sqrt[ksi^2  +  I V1 lambda ksi];
omega2 = 
                      Sqrt[ksi^2  +  I V2 lambda ksi];
omega3 = Sqrt[ksi^2  +  I V3 lambda ksi];
K1O2 = K1 omega1/(K2 omega2);
K2O3 = K2 omega2/(K3 omega3);
O1dL1 = omega1 delL1;
O2dL2 = omega2 delL2;
D0 = IdentityMatrix[2];
\(C1 = {{\((1 + K1O2)\)\ Exp[
                              O1dL1], \((1 - K1O2)\)\ Exp[
                              O1dL1]}, 
		{\((1 - K1O2)\)\ Exp[\(-\ 
                                O1dL1\)], \((1 + K1O2)\)\ Exp[\(-O1dL1\)]}}\);
MatrixForm[C1];
C11 = C1[[1, 1]];
C12 = C1[[1, 2]];
C21 = C1[[2, 1]];
C22 = C1[[2, 2]];
\(C2 = {{\((1 + K2O3)\)\ Exp[
                              O2dL2], \((1 - K2O3)\)\ Exp[
                              O2dL2]}, 
		{\((1 - K2O3)\)\ Exp[\(-\ 
                                O2dL2\)], \((1 + K2O3)\)\ Exp[\(-O2dL2\)]}}\);
MatrixForm[C2];
D2 = 0.5 *C2 . C1;
MatrixForm[D2];
D11 = D2[[1, 1]];
D12 = D2[[1, 2]];
D21 = D2[[2, 1]];
D22 = D2[[2, 2]];
func = (I Cos[X lambda ksi] + 
                              Sin[X lambda ksi])/(I Sqrt[
                                1 - lambda^2]) (ksi/omega1)*
                        Cos[Y ksi Sqrt[1 - lambda^2]]*
                        Exp[-0.5  ksi^2];
A1 = -D12/(D11*Exp[omega1  L1]  +  
                            D12*Exp[-omega1  L1]);
B1 = 
                      D11/(D11*Exp[omega1  L1]  + 
                            D12* Exp[-omega1  L1]);
g1 = 
                      Exp[-omega1 Z] + A1 Exp[omega1 (Z - L1)] + 
                        B1  Exp[-omega1 (Z - L1)];
	pk11 = N[PA1/K10];
  pk20 = N[K10/AC];
  
(*	Print[thetamax];*)
    	integral1 =  
                      NIntegrate[
                        Re[func*g1], {lambda, 0, lammax1}, {ksi, 0, ksimax1}, 
                        MinRecursion -> 3, 
MaxRecursion -> 
                          10] ;		
	 theta1  =   0.10132*pk11 * integral1; 
   normalt1 =  theta1/thetamax;
    T1' =  
                      99  + (T10 - 99)*Exp[pk20*temppara*theta1 ] ;
	T1 = T1'	;
	TC1 = T1 - 273 // N;
 	Write[znormal, {Z, normalt1}]; Close[znormal];  
	Write[zttemp, {Z, TC1}]; Close[zttemp];  
	data1 = Table[Print[{Z,  normalt1, TC1}]],{Z, 0, z1max,  z1max/2}]
	Print[data1];
Do[znormal = 
                      OpenAppend["znyamadaLtmodulelammax512903"];  
    zttemp = 
                      OpenAppend["zttyamadaLtmodulelammax512903"];  
T1' = 350 + 273;
T2' = 350 + 273;
T3' = 350 + 273;
l1n = {540, 0.5, 1.0, 2.0, 5.0, 
                      10.0, 20.0, 50.0, 100.0, 540};
l2n = {0, 0.6, 1.0, 1.5, 2.5, 5.5, 
                      10.5, 20.5, 50.5, 100.5};
l3n = {0, 50.6, 51, 51.5, 52.5, 
                      55.5, 55.5, 60.5, 70.5, 100.5, 150.5};
  
l2fill = {1000, 59.5, 11.5, 5.5, 2.5, 0.7, 
                        0.725, 0.7375, 0.1, 0.1};
 s = 5;
p = 1;	
l1 = 2;
l3 = 9;
  
lammax1 = 0.999999;
lammax2 = 0.999999;
lammax3 = 0.999999;
ksimax1 = 1000;
ksimax2 = 1000;
ksimax3 = 1000;
Label[begin1];
      
L1 = l1n[[l1]]/rx[[r]];
L2 = 
                    l2n[[l2]]/rx[[r]];
L3 = l3n[[l3]]/rx[[r]];
z1max = L1;
delL1 = L2 - L1;
dz2 = delL1/2 // N;
z2max = z1max + 2*dz2;
dz3 = 
                    l2fill[[l2]]*delL1 // N;	
z3max = z2max + 2*dz3;
(*Print[{Z, dz1, dz2, dz3, z1max, z2max, 
                            z3max}];*)
  
cp1 = 2.21;  
cp2 = 3.09;
AC = 299;
BC = 99;
Tk = 99;
Td = 128;
T10 = 623;
T1 = T1';
T2 = T2';
T3 = T3';
RS1  =  0.419  +  0.0000429*T1; 
RS2  =  0.0419  +  0.0000429*T2; 
RS3  =  0.367  +  0.0000429*T3; 
PA1  =  
                      para1*(1  -  RS1)*Pinc[[p]]; 
PA2  =  
                      para1*(1  -  RS1)*(1  -  RS2) *
                        Pinc[[p]];    
 PA3  =  
                          para1*(1  -  RS1)*(1  -  
                                RS2)*(1  -  RS3) *Pinc[[p]];
	K10 = 314/(T10 - 50)  // N;
K1  =  N[299/(T1  -  Tk)]; 
K2  =  K1/13 // N;
K3  =  N[299/(T3  -  Tk)]; 
D1  = K1/cp1 // N; 
D2  = K2/cp2 // N; 
D3  =  299/(T3  -  Td) // N; 
V1 = 
                    0.0001 scanv[[s]] rx[[r]]/D1;
V2 = 
                    0.0001 scanv[[s]] rx[[r]]/D2;
V3 = 
                    0.0001 scanv[[s]] rx[[r]]/D3;
delL1 = L2 - L1;
delL2 = L3 - L2;
omega1 = 
                    Sqrt[ksi^2 + I V1 lambda ksi];
omega2 = 
                    Sqrt[ksi^2 + I V2 lambda ksi];
omega3 = 
                    Sqrt[ksi^2 + I V3 lambda ksi];
K1O2 = 
                    K1 omega1/(K2 omega2);
K2O3 = 
                    K2 omega2/(K3 omega3);
O1dL1 = omega1 delL1;
O2dL2 = omega2 delL2;
D0 = IdentityMatrix[2];
C1 = {{(1 + K1O2) Exp[
                            O1dL1], (1 - K1O2) Exp[
                            O1dL1]}, {(1 - K1O2) Exp[-O1dL1], (1 + 
                              K1O2) Exp[-O1dL1]}};
MatrixForm[C1];
C11 = C1[[1, 1]];
C12 = C1[[1, 2]];
C21 = C1[[2, 1]];
C22 = C1[[2, 2]];
C2 = {{(1 + K2O3) Exp[
                            O2dL2], (1 - K2O3) Exp[
                            O2dL2]}, {(1 - K2O3) Exp[-O2dL2], (1 + 
                              K2O3) Exp[-O2dL2]}};
MatrixForm[C2];
D2 = 0.5*C2 . C1;
MatrixForm[D2];
D11 = D2[[1, 1]];
D12 = D2[[1, 2]];
D21 = D2[[2, 1]];
D22 = D2[[2, 2]];
pk12 = N[PA2/K10];
pk20 = N[K10/AC];
  func = (I Cos[X lambda ksi] + 
                            Sin[X lambda ksi])/(I Sqrt[
                              1 - lambda^2]) (ksi/omega1)*
                      Cos[Y ksi Sqrt[1 - lambda^2]]*Exp[-0.5 ksi^2];
A2 = (C12 D11 - 
                          C11 D12)/(D11*Exp[omega1 L1] + 
                          D12*Exp[-omega1 L1]);
B2 = (C22 D11 - 
                          C21 D12)/(D11*Exp[omega1 L1] + 
                          D12*Exp[-omega1 L1]);
g2 = 
                    A2 Exp[omega2 (Z - L2)] + 
                      B2 Exp[-omega2 (Z - L2)];
integral2 = 
                    NIntegrate[
                      Re[func*g2], {lambda, 0, lammax2}, {ksi, 0, ksimax2}, 
                      MinRecursion -> 3, MaxRecursion -> 10];
theta2 = 0.10132*pk12*integral2;
normalt2 = theta2/thetamax;
T2' = 
                    99 + (T10 - 99)*Exp[pk20*temppara*theta2];
T2 = T2';
TC2 = T2 - 273 // N;
Write[znormal, {Z, normalt2}];Close[znormal];
Write[zttemp, {Z, TC2}];Close[zttemp];
RS2 = 0.419 + 0.0000429 T2 // N;
PA2 = (1 - RS2)*(1 - 
                            RS1) Pinc[[p]] // N;
IF[T2 < 900, 
                    K2 = 1.33*0.00001*(T2 - 350) + 0.12, 
                    K2 = -0.92/(T2 - 650) + 0.23];
IF[T2 < 900, 
                    D2 = 4.62*0.000001*(T2 - 350) + 0.0055, 
                    D2 = -0.38/(T2 - 650) + 0.00965];
K1 = 314/(T10 - 50) // N;
K3 = 299/(T3 - 90) // N;
D1 = K1/cp1 // N;
D3 = 299/(T3 - Td) // N;
data2 = 
                    Table[Print[{Z,  normalt2, TC2}]],{Z, z1max, z2max, dz2}];
Print[data2];
  
Do[
znormal = 
                      OpenAppend["znyamadaLtmodulelammax512903"];  
zttemp = 
                      OpenAppend["zttyamadaLtmodulelammax512903"];  

T1' = 350 + 273;
T2' = 350 + 273;
T3' = 350 + 273;
l1n = {540, 0.5, 1.0, 2.0, 5.0, 
                      10.0, 20.0, 50.0, 100.0, 540};
l2n = {0, 0.6, 1.0, 1.5, 2.5, 5.5, 
                      10.5, 20.5, 50.5, 100.5};
l3n = {0, 50.6, 51, 51.5, 52.5, 
                      55.5, 55.5, 60.5, 70.5, 100.5, 150.5};
  
l2fill = {1000, 59.5, 11.5, 5.5, 2.5, 0.7, 
                        0.725, 0.7375, 0.1, 0.1};
 s = 5;
p = 1;	
l1 = 2;
l3 = 9;
  
lammax1 = 0.999999;
lammax2 = 0.999999;
lammax3 = 0.999999;
ksimax1 = 1000;
ksimax2 = 1000;
ksimax3 = 1000;
Label[begin1];
      
L1 = l1n[[l1]]/rx[[r]];
L2 = l2n[[l2]]/rx[[r]];
L3 = 
                    l3n[[l3]]/rx[[r]];
z1max = L1;
delL1 = L2 - L1;
dz2 = delL1/2 // N;
z2max = z1max + 2*dz2;
dz3 = l2fill[[l2]]*delL1 // N;	
z3max = z2max + 2*dz3;
(* Print[{Z, dz1, dz2, dz3, z1max, z2max, 
                            z3max}];*)
cp1 = 2.21;  
cp2 = 3.09;
AC = 299;
BC = 99;
Tk = 99;
Td = 128;
T10 = 623;
T1 = T1';
T2 = T2';
T3 = T3';
RS1  =  0.419  +  0.0000429*T1; 
RS2  =  0.0419  +  0.0000429*T2; 
RS3  =  0.367  +  0.0000429*T3; 
PA1  =  
                      para1*(1  -  RS1)*Pinc[[p]]; 
PA2  =  
                      para1*(1  -  RS1)*(1  -  RS2) *
                        Pinc[[p]];    
 PA3  =  
                          para1*(1  -  RS1)*(1  -  
                                RS2)*(1  -  RS3) *Pinc[[p]];
	K10 = 314/(T10 - 50)  // N;
K1  =  N[299/(T1  -  Tk)]; 
K2  =  K1/13 // N;
K3  =  N[299/(T3  -  Tk)]; 
D1  = K1/cp1 // N; 
D2  = K2/cp2 // N; 
D3  =  299/(T3  -  Td) // N; 
V1 = 
                    0.0001 scanv[[s]] rx[[r]]/D1;
V2 = 
                    0.0001 scanv[[s]] rx[[r]]/D2;
V3 = 
                    0.0001 scanv[[s]] rx[[r]]/D3;
delL1 = L2 - L1;
delL2 = L3 - L2;
omega1 = 
                    Sqrt[ksi^2 + I V1 lambda ksi];
omega2 = 
                    Sqrt[ksi^2 + I V2 lambda ksi];
omega3 = 
                    Sqrt[ksi^2 + I V3 lambda ksi];
K1O2 = 
                    K1 omega1/(K2 omega2);
K2O3 = 
                    K2 omega2/(K3 omega3);
O1dL1 = omega1 delL1;
O2dL2 = omega2 delL2;
D0 = IdentityMatrix[2];
C1 = {{(1 + K1O2) Exp[
                            O1dL1], (1 - K1O2) Exp[
                            O1dL1]}, {(1 - K1O2) Exp[-O1dL1], (1 + 
                              K1O2) Exp[-O1dL1]}};
MatrixForm[C1];
C11 = C1[[1, 1]];
C12 = C1[[1, 2]];
C21 = C1[[2, 1]];
C22 = C1[[2, 2]];
C2 = {{(1 + K2O3) Exp[
                            O2dL2], (1 - K2O3) Exp[
                            O2dL2]}, {(1 - K2O3) Exp[-O2dL2], (1 + 
                              K2O3) Exp[-O2dL2]}};
MatrixForm[C2];
D2 = 0.5*C2 . C1;
MatrixForm[D2];
D11 = D2[[1, 1]];
D12 = D2[[1, 2]];
D21 = D2[[2, 1]];
D22 = D2[[2, 2]];
pk13 = N[PA3/K10];
pk20 = N[K10/AC];
  func = (I Cos[X lambda ksi] + 
                            Sin[X lambda ksi])/(I Sqrt[
                              1 - lambda^2]) (ksi/omega1)*
                      Cos[Y ksi Sqrt[1 - lambda^2]]*Exp[-0.5 ksi^2];
A3 = (D12 D11 - 
                          D11 D12)/(D11*Exp[omega1 L1] + 
                          D12*Exp[-omega1 L1]);
B3 = (D22 D11 - 
                          D21 D12)/(D11*Exp[omega1 L1] + 
                          D12*Exp[-omega1 L1]);
g3 = 
                    A3 Exp[omega3 (Z - L3)] + 
                      B3 Exp[-omega3 (Z - L3)];
integral3 = 
                    NIntegrate[
                      Re[func*g3], {lambda, 0, lammax3}, {ksi, 0, ksimax3}, 
                      MinRecursion -> 3, MaxRecursion -> 10];
theta3 = 0.10132*pk13*integral3;
normalt3 = theta3/thetamax;
T3' = 
                    99 + (T10 - 99)*Exp[pk20*temppara*theta3];
T3 = T3';
TC3 = T3 - 273 // N;
Write[znormal, {Z, normalt3}];Close[znormal]; . Write[zttemp, {Z, TC3}];Close[zttemp];
data3 = 
                    Table[Print[{Z,  normalt3, TC3}]],{Z, z2max, z3max, dz3}];
Print[data3]
]
Timing[
For[l2 = 2,l2 < 7,lineartemp[5, l2];Print["L2=", l2n[[l2]]] ;Print[];l2++]
            ]
\(Print["L1=", 
      l1n[\([l1]\)]\ \ 
Print["L3=", l3n[\([l3]\)]]]\)
Print["v=", scanv[[s]]]  
Print["rx=", rx[[5]]]

============L2 data====================