Wednesday, December 9, 2015

A simple demonstration of chaos and unreliability of computer models

A simple demonstration of chaos and unreliability of computer models

A simple demonstration of chaos and unreliability of computer models

Guest essay by  Anthony R. E.
climate-model-1[1]
Recently, I read a posting by Kip Hansen on Chaos and Climate. (Part 1 and Part 2) I thought it will be easier for the layman to understand the behavior of computer models under chaotic conditions if there is a simple example that he could play. I used the attached file in a course where we have lots of “black box” computer models with advance cinematic features that laymen assume is reality.
Consider a thought experiment of a simple system in a vacuum consisting of a constant energy source per unit area of q/A and a fixed receptor/ emitter with an area A and initial absolute temperature, T0 . The emitter/receptor has mass m , specific heat C, and Boltzmann constant σ. The enclosure of the system is too far away such that heat emitted by the enclosure has no effect on the behaviour of the heat source and the emitter/receptor.
The energy balance in the fixed receptor/emitter at any time n is:
Energy in { q/A*A= q} + energy out {-2AσTn 4 } + stored/ released energy {- mC( Tn+1 – Tn )} = 0 eq. (1)
If Tn+1 > Tn the fixed body is a heat receptor, that is, it receives more energy than it emits and if Tn > Tn+1 it is an emitter, that is, it emits more energy than it receives. If Tn = Tn+1 the fixed body temperature is at equilibrium.
Eq (1) could be rearranged as :
Tn+1 = Tn -2AC Tn 4 /mC +q/mC eq(2)
Since 2AC/mC is a constant, we could call this α, and q/mC is also a constant we could call this β to facilitate calculations. Eq (2) could be written as:
Tn+1 = Tn – αTn 4 + β eq.(3)
The reader will note this equation exhibits chaotic properties as described by Kip Hansen in this previous post at WUWT on November 23, 2015, titled “Chaos & Climate –Part 2 Chaos=Stability”. At equilibrium, Tn=+1 = Tn , and if the equilibrium temperature is T then from equation (3)
T 4 =β/α or α = β / T4 if eq. (4)
And eq (3) could be written as
Tn+1 = Tn – βTn 4 /T4 + β or Tn+1 =Tn +β(1-Tn4 /T4 ) eq (5)
Eq (5) could be easily programmed in Excel. However, there are several ways of writing T4 . One programmer could write it as T*T*T*T, another programmer could write it as T ^2* T ^2, another programmer could write it as T*T ^3 and another could write as T^4. From what we learned in basic algebra, it does not matter as all those expressions are the same. The reader could try all the variations of writing T4 . For purposes of illustration, let us look at β= 100, T =243 ( I am using this out of habit that if it were not for greenhouse gases the earth would be -30o C or 2430 K but you could try other temperatures) and initial temperature of 300 K. After the 17th iteration the temperature has reached its steady state and the difference between coding T4 as T^4 and T*T*T*T is zero. This is the non-chaotic case. Extract from the Excel spreadsheet is shown below:




beta= 100
Iteration w T^4 w T*T*T*T % diff. T ∞= 243
0 300.00 300.00 0.00

1 167.69 167.69 0.00

2 245.01 245.01 0.00

3 241.66 241.66 0.00

4 243.85 243.85 0.00

5 242.44 242.44 0.00

6 243.36 243.36 0.00

7 242.77 242.77 0.00

8 243.15 243.15 0.00

9 242.90 242.90 0.00

10 243.06 243.06 0.00

11 242.96 242.96 0.00

12 243.03 243.03 0.00

13 242.98 242.98 0.00

14 243.01 243.01 0.00

15 242.99 242.99 0.00

16 243.00 243.00 0.00

17 243.00 243.00 0.00

18 243.00 243.00 0.00

19 243.00 243.00 0.00

20 243.00 243.00 0.00

If β is changed to170 with the same initial T and T∞, T does not gradually approach T∞ unlike in the non chaotic case but fluctuates as shown below. While the difference in coding T4 as T^4 and T*T*T*T is zero to the fourth decimal place, differences are really building up as shown in the third table.




beta 170
Iteration w T^4 w T*T*T*T % diff T ∞ 243
0 300.0000 300.0000 0.0000

1 75.0803 75.0803 0.0000

2 243.5310 243.5310 0.0000

3 242.0402 242.0402 0.0000

4 244.7102 244.7102 0.0000

5 239.8738 239.8738 0.0000

6 248.4547 248.4547 0.0000

7 232.6689 232.6689 0.0000

8 259.7871 259.7871 0.0000

9 207.7150 207.7150 0.0000

10 286.9548 286.9548 0.0000

11 126.3738 126.3738 0.0000

12 283.9386 283.9386 0.0000

By the 69th the difference between coding T4 as T^4 and T*T*T*T is now apparent at the fourth decimal place as shown below:
69 88.6160 88.6153 0.0008
70 255.6095 255.6088 0.0003
71 217.4810 217.4824 0.0007
72 278.4101 278.4086 0.0005
73 155.4803 155.4850 0.0030
74 296.9881 296.9894 0.0004
The difference between the two codes builds up rapidly that by the 95th iteration, the difference is 4.5 per cent and by the 109th iteration is a huge 179 per cent as shown below.
95 126.5672 132.2459 4.4866
96 284.0558 287.3333 1.1538
97 136.6329 125.0047 8.5105
98 289.6409 283.0997 2.2584
99 116.5073 139.9287 20.1029
100 277.5240 291.2369 4.9412
101 158.3056 110.4775 30.2125
102 297.6853 273.2144 8.2204
103 84.8133 171.5465 102.2637
104 252.2905 299.3233 18.6423
105 224.7630 77.9548 65.3169
106 270.3336 246.1543 8.9442
107 179.9439 237.1541 31.7934
108 298.8261 252.9321 15.3581
109 80.0515 223.3877 179.0549
However, the divergence is not monotonically increasing. There are instance such as in the 104th iteration, the divergence drops from 102 per cent to 18 per cent. One is tempted to conclude T^4 ≠ T*T*T*T.
Conclusion:
Under chaotic conditions, the same one line equation with the same initial conditions and constant but coded differently will have vastly differing results. Under chaotic conditions predictions made by computer models are unreliable.
The calculations are made for purposes of illustrating the effect of instability of simple non-linear dynamic system and may not have any physical relevance to more complex non-linear system such as the earth’s climate.
Note:
For the above discussion, a LENOVO G50 64 bit computer is used. If a 32 bit computer is used the differences would be noticeable at a much earlier iterations. A different computer processor with the same number of bit will also give different results.

No comments:

Post a Comment