I think all three implementations of the TJ clear-sky model in this repo are flawed in that the arguments to sin
are interpreted as radians but should be interpreted as degrees. Here are the relevant lines of code:
|
a_tj = 1160 + 75 * np.sin((360 * (day_of_year - 275)) / 365) |
|
k_tj = 0.174 + 0.035 * np.sin((360 * (day_of_year - 100)) / 365) |
|
c_tj = 0.095 + 0.04 * np.sin((360 * (day_of_year - 100)) / 365) |
|
A = 1160 + 75 .* sin((360.*(doy-275))./365); |
|
k = 0.174 + 0.035 .* sin((360.*(doy-100))./365); |
|
C = 0.095 + 0.04 .* sin((360.*(doy-100))./365); |
|
A = 1160 + 75 * sin((360 * (doy - 275)) / 365) |
|
k = 0.174 + 0.035 * sin((360 * (doy - 100)) / 365) |
|
C = 0.095 + 0.04 * sin((360 * (doy - 100)) / 365) |
As an aside, I think the implementation in the clear-sky-models
repo has the same problem: https://github.com/JamieMBright/clear-sky-models/blob/86fe607e9ba66226be6102895491b7d756473a7e/R/1-TJ.R#L26-L28
The 360/365
coefficient seems like it is intended to produce one period per year in degrees. Treating it as radians introduces an undesirable amplitude variation of period ~6 days, as these two screenshots show:
![image](https://user-images.githubusercontent.com/57452607/147829062-b889ee6b-4320-4c3c-bae7-8f51d1c9e21e.png)
![image](https://user-images.githubusercontent.com/57452607/147829077-52214619-dcb5-41ea-ba95-989ac8e1ca9c.png)
Changing the 360
s to 2*np.pi
seems to resolve the issue in the python implementation. I did not check the R or MATLAB versions.
As far as I can tell, these equations for A, k, and C do not come from the 1957 Threlkeld & Jordan paper but rather from G Masters' "Renewable and Efficient Electric Power Systems", which contains this example (Example 7.8). It only gives the correct answer if the argument to sin
is interpreted as degrees:
![image](https://user-images.githubusercontent.com/57452607/147829368-a25d0ffd-4d2c-4746-87b7-d4aa21507130.png)