POLYMATH Report          DEQ 
 Ordinary Differential Equations       2016-May-31 

Calculated values of DEQ variables
  Variable Initial value Final value Minimal value Maximal value
1 alpha 0.9 0.9 0.9 0.9
2 deltaTs 25 25 25 25
3 deltax 8 8 8 8
4 t 0 365 0 365
5 t0 37 37 37 37
6 T1 30.9018 30.9016 26.0001 75.9937
7 T10 51 50.9248 50.9248 51
8 T11 51 51 51 51
9 T2 51 48.6618 39.6826 61.7579
10 T3 51 53.1843 45.4021 55.4854
11 T4 51 52.644 48.0841 52.7077
12 T5 51 51.4173 49.4224 51.4173
13 T6 51 50.7581 50.1131 51
14 T7 51 50.6162 50.4867 51
15 T8 51 50.701 50.6949 51
16 T9 51 50.8255 50.8255 51
17 tau 365 365 365 365
18 Tm 51 51 51 51
19 Ts 30.9018 30.9016 26.0001 75.9937

Differential equations
1 d(T4)/d(t) = alpha/deltax^2*(T5-2*T4+T3)
2 d(T5)/d(t) = alpha/deltax^2*(T6-2*T5+T4)
3 d(T3)/d(t) = alpha/deltax^2*(T4-2*T3+T2)
4 d(T6)/d(t) = alpha/deltax^2*(T7-2*T6+T5)
5 d(T2)/d(t) = alpha/deltax^2*(T3-2*T2+T1)
6 d(T7)/d(t) = alpha/deltax^2*(T8-2*T7+T6)
7 d(T8)/d(t) = alpha/deltax^2*(T9-2*T8+T7)
8 d(T9)/d(t) = alpha/deltax^2*(T10-2*T9+T8)
9 d(T10)/d(t) = alpha/deltax^2*(T11-2*T10+T9)

Explicit equations
1 alpha = 0.9
2 deltax = 8
3 Tm = 51
4 deltaTs = 25
5 tau = 365
6 t0 = 37
7 T11 = Tm
8 Ts = Tm-deltaTs*cos((2*3.1416/tau)*(t-t0))
9 T1 = Ts

Problem source text
# S. 27* - Single Partial Diff. Eq.
# Unsteady State Heat Conduction.
# Verified final values: T2= 48.6618, T4= 52.644
# T6= 50.7581, T8= 50.701, T10= 50.9248
# Ref.:Prob. 9.12 in Problem Solving in Chemical...
d(T4)/d(t)=alpha/deltax^2*(T5-2*T4+T3)
d(T5)/d(t)=alpha/deltax^2*(T6-2*T5+T4)
d(T3)/d(t)=alpha/deltax^2*(T4-2*T3+T2)
d(T6)/d(t)=alpha/deltax^2*(T7-2*T6+T5)
d(T2)/d(t)=alpha/deltax^2*(T3-2*T2+T1)
d(T7)/d(t)=alpha/deltax^2*(T8-2*T7+T6)
d(T8)/d(t)=alpha/deltax^2*(T9-2*T8+T7)
d(T9)/d(t)=alpha/deltax^2*(T10-2*T9+T8)
d(T10)/d(t)=alpha/deltax^2*(T11-2*T10+T9)
alpha=0.9
deltax=8
Tm=51
deltaTs=25
tau=365
t0=37
T11=Tm
Ts=Tm-deltaTs*cos((2*3.1416/tau)*(t-t0))
T1=Ts
t(0)=0
T4(0)=51
T5(0)=51
T3(0)=51
T6(0)=51
T2(0)=51
T7(0)=51
T8(0)=51
T9(0)=51
T10(0)=51
t(f)=365

Matlab formatted problem
Create m file called PolyOde.m and paste the following text into it.
% S. 27* - Single Partial Diff. Eq.
% Unsteady State Heat Conduction.
% Verified final values: T2= 48.6618, T4= 52.644
% T6= 50.7581, T8= 50.701, T10= 50.9248
% Ref.:Prob. 9.12 in Problem Solving in Chemical...
function PolyOde
   tspan = [0 365]; % Range for the independent variable
   y0 = [51; 51; 51; 51; 51; 51; 51; 51; 51]; % Initial values for the dependent variables
   [t,y]=ode45(@ODEfun,tspan, y0);
   plot (t,y);
   xlabel('t');
   legend('T4','T5','T3','T6','T2','T7','T8','T9','T10');
   fprintf('T4 = %16.6f \n',y(length(y),1));
   fprintf('T5 = %16.6f \n',y(length(y),2));
   fprintf('T3 = %16.6f \n',y(length(y),3));
   fprintf('T6 = %16.6f \n',y(length(y),4));
   fprintf('T2 = %16.6f \n',y(length(y),5));
   fprintf('T7 = %16.6f \n',y(length(y),6));
   fprintf('T8 = %16.6f \n',y(length(y),7));
   fprintf('T9 = %16.6f \n',y(length(y),8));
   fprintf('T10 = %16.6f \n',y(length(y),9));
end

function dYfuncvecdt = ODEfun(t,Yfuncvec)
   T4 = Yfuncvec(1);
   T5 = Yfuncvec(2);
   T3 = Yfuncvec(3);
   T6 = Yfuncvec(4);
   T2 = Yfuncvec(5);
   T7 = Yfuncvec(6);
   T8 = Yfuncvec(7);
   T9 = Yfuncvec(8);
   T10 = Yfuncvec(9);
   alpha = 0.9;
   deltax = 8;
   Tm = 51;
   deltaTs = 25;
   tau = 365;
   t0 = 37;
   T11 = Tm;
   Ts = Tm - (deltaTs * cos(2 * 3.1416 / tau * (t - t0)));
   T1 = Ts;
   dT4dt = alpha / (deltax ^ 2) * (T5 - (2 * T4) + T3);
   dT5dt = alpha / (deltax ^ 2) * (T6 - (2 * T5) + T4);
   dT3dt = alpha / (deltax ^ 2) * (T4 - (2 * T3) + T2);
   dT6dt = alpha / (deltax ^ 2) * (T7 - (2 * T6) + T5);
   dT2dt = alpha / (deltax ^ 2) * (T3 - (2 * T2) + T1);
   dT7dt = alpha / (deltax ^ 2) * (T8 - (2 * T7) + T6);
   dT8dt = alpha / (deltax ^ 2) * (T9 - (2 * T8) + T7);
   dT9dt = alpha / (deltax ^ 2) * (T10 - (2 * T9) + T8);
   dT10dt = alpha / (deltax ^ 2) * (T11 - (2 * T10) + T9);
   dYfuncvecdt = [dT4dt; dT5dt; dT3dt; dT6dt; dT2dt; dT7dt; dT8dt; dT9dt; dT10dt];
end

General Settings
Total number of equations 18
Number of differential equations 9
Number of explicit equations 9
Reporting digits 8
Elapsed time 0.20 sec
Solution method RKF_45
Step size guess. h 1E-06
Truncation error tolerance. eps 1E-06
Calculated Intermediate data points 50

Calculated data points
    t T4 T5 T3 T6 T2 T7 T8 T9 T10 T11 Ts T1
1 0 51 51 51 51 51 51 51 51 51 51 30.9018 30.9018
2 16.7188 50.9674 50.9982 50.5598 50.9999 46.8263 51 51 51 51 51 27.9524 27.9524
3 22.5588 50.9273 50.9945 50.2582 50.9997 45.6043 51 51 51 51 51 27.1082 27.1082
4 34.2388 50.7897 50.9765 49.5305 50.9978 43.5003 50.9998 51 51 51 51 26.1195 26.1195
5 40.0788 50.6924 50.9602 49.1304 50.9958 42.617 50.9996 51 51 51 51 26.0001 26.0001
6 45.9188 50.5777 50.9381 48.7204 50.9925 41.847 50.9992 50.9999 51 51 51 26.1332 26.1332
7 51.7588 50.4472 50.9098 48.3093 50.9878 41.1919 50.9986 50.9999 51 51 51 26.5174 26.5174
8 63.4388 50.148 50.8334 47.5143 50.9729 40.2321 50.9962 50.9995 51 51 51 28.021 28.021
9 69.2788 49.984 50.7853 47.1434 50.9622 39.9298 50.9943 50.9993 50.9999 51 51 29.1253 29.1253
10 75.1188 49.8139 50.7309 46.7977 50.9491 39.7467 50.9918 50.9988 50.9999 51 51 30.4505 30.4505
11 80.9588 49.6401 50.6707 46.4822 50.9334 39.6826 50.9884 50.9982 50.9998 51 51 31.9832 31.9832
12 92.6388 49.292 50.5346 45.9577 50.8938 39.906 50.9792 50.9964 50.9995 50.9999 51 35.6073 35.6073
13 98.4788 49.1226 50.4602 45.7555 50.87 40.1889 50.9731 50.9951 50.9992 50.9999 51 37.6621 37.6621
14 104.319 48.9594 50.3825 45.5972 50.8435 40.5812 50.9659 50.9935 50.9989 50.9998 51 39.8516 39.8516
15 110.159 48.8048 50.3024 45.4845 50.8144 41.0782 50.9575 50.9915 50.9985 50.9998 51 42.1536 42.1536
16 121.839 48.5292 50.1388 45.4021 50.7493 42.3632 50.9371 50.9862 50.9973 50.9995 51 47.0016 47.0016
17 127.679 48.412 50.0571 45.4337 50.7136 43.1373 50.9251 50.9828 50.9965 50.9994 51 49.4985 49.4985
18 133.519 48.3107 49.9768 45.514 50.6763 43.9886 50.9119 50.9789 50.9955 50.9992 51 52.0106 52.0106
19 139.359 48.2267 49.8987 45.6423 50.6375 44.9083 50.8974 50.9745 50.9943 50.9989 51 54.5125 54.5125
20 151.039 48.1151 49.753 46.038 50.5572 46.9144 50.8652 50.964 50.9914 50.9982 51 59.385 59.385
21 156.879 48.0893 49.6871 46.3018 50.5163 47.9803 50.8475 50.9578 50.9896 50.9978 51 61.7064 61.7064
22 162.719 48.0841 49.627 46.6064 50.4755 49.0738 50.8289 50.9511 50.9875 50.9972 51 63.9196 63.9196
23 168.559 48.1 49.5733 46.9488 50.4352 50.1837 50.8096 50.9437 50.9852 50.9966 51 66.0024 66.0024
24 180.239 48.1949 49.488 47.7334 50.3573 52.4079 50.769 50.9274 50.9797 50.9951 51 69.6941 69.6941
25 186.079 48.2734 49.4573 48.1679 50.3206 53.4997 50.748 50.9184 50.9765 50.9942 51 71.2656 71.2656
26 191.919 48.3718 49.4354 48.625 50.2858 54.5632 50.7268 50.909 50.9731 50.9932 51 72.6325 72.6325
27 197.759 48.4894 49.4224 49.1001 50.2534 55.5876 50.7055 50.899 50.9693 50.992 51 73.7809 73.7809
28 209.439 48.7776 49.4243 50.0857 50.197 57.4787 50.6635 50.8781 50.9609 50.9893 51 75.3784 75.3784
29 215.279 48.9456 49.4394 50.5864 50.1735 58.3262 50.643 50.8671 50.9563 50.9878 51 75.8114 75.8114
30 221.119 49.1276 49.4638 51.0858 50.1536 59.0968 50.6232 50.8559 50.9514 50.9862 51 75.9937 75.9937
31 226.959 49.3219 49.4974 51.579 50.1374 59.7827 50.6042 50.8446 50.9463 50.9844 51 75.9237 75.9237
32 238.639 49.7397 49.5912 52.527 50.117 60.8739 50.5691 50.8218 50.9354 50.9805 51 75.0319 75.0319
33 244.479 49.9593 49.6506 52.9726 50.1131 61.2682 50.5534 50.8104 50.9297 50.9783 51 74.2191 74.2191
34 250.319 50.1832 49.7177 53.3932 50.1134 61.5561 50.5391 50.7992 50.9238 50.976 51 73.1718 73.1718
35 256.159 50.4093 49.7918 53.7848 50.118 61.7347 50.5262 50.7882 50.9178 50.9737 51 71.9007 71.9007
36 267.839 50.8595 49.9587 54.4654 50.14 61.7579 50.5056 50.7671 50.9056 50.9686 51 68.7402 68.7402
37 273.679 51.0791 50.0499 54.7479 50.1571 61.6025 50.498 50.7573 50.8994 50.966 51 66.8827 66.8827
38 279.519 51.2923 50.1451 54.9879 50.1783 61.3374 50.4922 50.7479 50.8932 50.9633 51 64.8649 64.8649
39 285.359 51.497 50.2435 55.1831 50.2032 60.9655 50.4884 50.7392 50.887 50.9605 51 62.7071 62.7071
40 297.039 51.8731 50.4459 55.4321 50.2634 59.9171 50.4867 50.7236 50.875 50.9549 51 58.0597 58.0597
41 302.879 52.0408 50.5482 55.4835 50.2982 59.2514 50.4888 50.717 50.8692 50.952 51 55.6171 55.6171
42 308.719 52.1928 50.6497 55.4854 50.3357 58.5 50.4929 50.7112 50.8636 50.9492 51 53.1279 53.1279
43 314.559 52.3277 50.7497 55.4379 50.3755 57.6706 50.4988 50.7062 50.8582 50.9463 51 50.6173 50.6173
44 326.239 52.541 50.9411 55.1973 50.4606 55.8119 50.5162 50.6989 50.8483 50.9408 51 45.6328 45.6328
45 332.079 52.6174 51.0307 55.0068 50.5052 54.8016 50.5275 50.6966 50.8438 50.9381 51 43.2093 43.2093
46 337.919 52.6726 51.1151 54.7719 50.5505 53.7507 50.5403 50.6953 50.8396 50.9354 51 40.8646 40.8646
47 343.759 52.7062 51.1935 54.4951 50.5961 52.6699 50.5546 50.6949 50.8358 50.9329 51 38.6221 38.6221
48 355.439 52.7077 51.3295 53.8277 50.6866 50.4626 50.5868 50.6968 50.8294 50.9282 51 34.5336 34.5336
49 361.279 52.6756 51.3858 53.4439 50.7307 49.3584 50.6045 50.6991 50.8269 50.9261 51 32.7289 32.7289
50 365 52.644 51.4173 53.1843 50.7581 48.6618 50.6162 50.701 50.8255 50.9248 51 30.9016 30.9016