Calculation of sun position
The ASCEND model library contains a file models/johnpye/sunpos.a4c that can be loaded in ASCEND and used to calculate the position of the sun at any location on earth and at any time of day or day of the year. It uses the method of Duffie and Beckman[1], which is accurate to the extent required for solar thermal energy calculations, but probably unsuitable for use in astronomy.
The following is a code snippet, taken from the models/johnpye/sunpos.a4c file, that solves Example 1.6.1 from that book. It can be run and solved using ASCEND with the command ascend johnpye/sunpos.a4c.
(* For Madison (Wisconsin), calculate the angle of incidence of beam radiation on a surface at 10:30 AM solar time on February 13, if the surface is tilted 45 from the horizontal and pointed 15 degrees west of south. *) MODEL example_1_6_1 REFINES sunpos; METHODS METHOD specify; RUN sunpos::specify; FREE t; FIX t_solar; END specify; METHOD values; RUN sunpos::values; t_solar := 43{d} + 10{h} + 30{min}; beta := 45 {deg}; gamma := 15 {deg}; L_st := -90{deg}; (* USA Central time*) L_loc := -89.4{deg}; phi := +43{deg}; END values; METHOD self_test; ASSERT abs(theta-35.0{deg}) < 0.15{deg}; ASSERT abs(delta-(-13.80{deg})) < 0.02{deg}; END self_test; END example_1_6_1;
It is intended that this sun position calculation would be linked together with the experimental Data reader component to allow solar energy engineering problems to be solved over the course of days, weeks or years, along the lines of the TRNSYS simulation tool.
References
- ↑ Duffie & Beckman, (2006) Solar Engineering of Thermal Processes, Wiley.
See also
- A more accurate sun position algorithm from the Plataforma Solar de Almería (described in this paper)
- An even more accurate algorithm by Roberto Grena from Centro Ricerche Casaccia in Rome, published in Solar Energy.
- [1] (syntax highlighter used on this page)