Sun related calculations

Using solar energy frequently involves calculations. This page is to show how various calculations can be done. If you have calculated anything to do with solar energy and are prepared to share your method with other people, please post it here. Just click on the "edit" button, above, and add your material near the bottom of the page, just above the "External Links" line. Put a couple of "equals" signs (=) before and after the title of your addition. This will make Appropedia format it properly. If the title is done correctly, your item will automatically be added to the table of contents at the top of the page. If you have any problems with formatting and the like, don't worry. Someone will tidy it up for you. Or, if you're uncomfortable with editing the article, go to the "discussion" page and put your calculation there. Someone will move it into the main article for you.

The Equation of Time is the difference between the time that is shown by a sundial and the time that is shown by a clock that is set to local mean time. Essentially, the Equation of Time shows the longitude of the sun in the sky, relative to its mean position. The Solar Declination is the sun's latitude. Both of these quantities must be known for many purposes related to solar energy.

The following subroutine, here written in QBasic but easily translatable to other languages, calculates the Equation of Time and the Solar Declination on any day of the year. It is quite accurate. Its Root-Mean-Square error for the Equation of Time is only 3.7 seconds. The Declination is calculated with errors that are always small compared with the angular radius of the sun as seen from the earth (about 0.25 degrees).

A program that includes the routine is ETIMSDEC, which is listed below. Anyone who wants further information should look at the Sun related texts page. The article titled "The Latitude and Longitude of the Sun", which I wrote several years ago, describes the astronomical logic behind the routine.

The following calculation is essentially the same as the one above, with minor changes. Angles are in degrees instead of radians. Some explanation follows each line. And, although it can be written as a computer program, the calculation can be done with a pocket calculator or similar tool.

Angles are in degrees. Asterisks mean multiplication. Slashes mean division. The conventional order of operations applies.

W is the Earth's mean angular orbital velocity in degrees per day.

D is the date, in days starting at zero on January 1 (i.e. the days part of the ordinal date -1). 10 is the approximate number of days from the December solstice to January 1. "A" is the angle the earth would move on its orbit at its average speed from the December solstice to date D.

B is the angle the Earth moves from the solstice to date D, including a first-order correction for the Earth's orbital eccentricity, 0.0167. The number 2 is the number of days from January 1 to the date of the Earth's perihelion. This expression for B can be simplified by combining constants to: .

C is the difference between the angles moved at mean speed, and at the corrected speed projected onto the equatorial plane, and divided by 180 to get the difference in "half turns". The number 23.44 is the obliquity (tilt) of the Earth's axis in degrees. The subtraction gives the conventional sign to the equation of time. For any given value of x, arctan(x) (sometimes written as tan−1x) has multiple values, differing from each other by integer numbers of half turns. The value generated by a calculator or computer may not be the appropriate one for this calculation. This may cause C to be wrong by an integer number of half turns. The excess half turns are removed in the next step of the calculation:

EoT is the equation of time in minutes. The expression nint(C) means the nearest integer to C. On a computer, it can be programmed, for example, as INT(C+0.5). It is 0, 1, or 2 at different times of the year. Subtracting it leaves a small positive or negative fractional number of half turns, which is multiplied by 720, the number of minutes (12 hours) that the Earth takes to rotate one half turn relative to the Sun, to get the equation of time.

Compared with published values, this calculation has a Root Mean Square error of only 3.7 seconds of time. The greatest error is 6.0 seconds.

The value of B in the above calculation is an accurate value for the Sun's ecliptic longitude (shifted by 90 degrees), so the solar declination becomes readily available:

which is accurate to within a fraction of a degree.

[edit]Program to calculate sun's position and heliostat mirror alignment

This program, written in QBasic but easily translatable to other programming languages, calculates the position of the sun in the sky, as angles of azimuth (true compass bearing) and elevation, as seen from any place on the earth, at any time on any date. It also calculates the correct alignment of a heliostat mirror to reflect sunlight onto any specified target. It is accurate to within 0.25 degree.

For detailed explanations of how the program works, see the Sun related texts page of this wiki.

I am the author of this program. My name and address are on it so anyone who has questions or problems can contact me. The program is in the public domain, not copyright. Anyone is free to use it, or any part of it, for any purpose, commercial or non-commercial.

If it is marked with the dates on which the Sun is at various points on it, the analemma summarises the apparent movements of the Sun, relative to its mean position, throughout the year. A diagram of the analemma, with equal scales in both north-south and east-west directions, can be used as a tool to estimate quantities such as the times of sunrise and sunset, which depend on the Sun's position. Generally, making these estimates depends on visualizing the analemma as a rigid structure in the sky, which moves around the Earth at constant speed so it rises and sets once a day, with the Sun slowly moving around it once a year. Some approximations are involved in the process, chiefly the use of a plane diagram to represent things on the celestial sphere, and the use of drawing and measurement instead of numerical calculation. Because of these, the estimates are not perfectly precise, but they are usually good enough for practical purposes. Also, they have instructional value, showing in a simple visual way how the times of sunrises and sunsets vary.

The analemma can be used to find the dates of the earlest and latest sunrises and sunsets of the year. These do not occur on the dates of the solstices.

If we visualize the analemma in the eastern sky, with its lowest point just above the horizon, that point has just risen above the horizon. If the Sun were at that point, sunrise would have just occurred. This would be the latest sunrise of the year, since all other points on the analemma would rise earlier. Therefore the date when the Sun is at this lowest point is the date of the latest sunrise. Similarly, when the Sun is at the highest point on the analemma, the earliest sunrise of the year will occur. Likewise, at sunset, the earliest sunset will occur when the Sun is at its lowest point on the analemma when it is close to the western horizon, and the latest sunset when it is at the highest point.

None of these points is exactly at one of the ends of the analemma, where the Sun is at a solstice. As seen from north-mid-temperate latitudes, the earliest sunset occurs some time before the December solstice - typically a week or two before it - and the latest sunrise happens a week or two after the solstice. Thus, the darkest evening occurs in early to mid-December, but the mornings keep getting darker until about the New Year.

The exact dates are those on which the Sun is at the points where the horizon is tangential to the analemma, which in turn depend on how much the analemma, or the north-south meridian passing through it, is tilted from the vertical. This angle of tilt is essentially the co-latitude (90 degrees minus the latitude) of the observer. Calculating these dates numerically is complex, but they can be estimated fairly accurately by placing a straight-edge, tilted at the appropriate angle, tangential to a diagram of the analemma, and reading the dates when the Sun is at the positions of contact. In temperate latitudes, the dates get further from the solstices as the latitude decreases. In near-equatorial latitudes, the situation is more complex. The analemma lies almost horizontal, and there are two widely separated dates in the year when the Sun rises earlier than on adjoining dates, and so on.

A similar geometrical method, based on the analemma, can be used to find the times of sunrise and sunset at any place on the Earth (except within or close to the Arctic or Antarctic Circle), on any date.

The "origin" of the analemma, where the solar declination and the equation of time are both zero, rises and sets at 6 am and 6 pm local mean time on every day of the year, irrespective of the latitude of the observer. (This estimation does not take account of atmospheric refraction.) If the analemma is drawn in a diagram, tilted at the appropriate angle for an observer's latitude (as described above), and if a horizontal line is drawn to pass through the position of the Sun on the analemma on any given date, then at sunrise this line represents the horizon. The origin moves along the celestial equator at a speed of 15 degrees per hour, the speed of the Earth's rotation. The distance along the equator from the point where it intersects the horizon to the position of the origin of the analemma at sunrise is the distance the origin moves between 6 am and the time of sunrise on the given date. Measuring the length of this equatorial segment therefore gives the difference between 6 am and the time of sunrise.

The measurement should, of course, be done on the diagram, but it should be expressed in terms of the angle that would be subtended at an observer on the ground by the corresponding distance in the analemma in the sky. It can be useful to compare it with the length of the analemma, which subtends 47 degrees. Thus, for example, if the length of the equatorial segment on the diagram is 0.2 times the length of the analemma on the diagram, then the segment in the celestial analemma would subtend 0.2 x 47 or 9.4 degrees at the observer on the ground. The angle, in degrees, should be divided by 15 to get the time difference in hours between sunrise and 6 am. The sign of the difference is clear from the diagram. If the horizon line at sunrise passes above the origin of the analemma, the Sun rises before 6 am, and vice versa.

The same technique can be used, mutatis mutandis, to estimate the time of sunset. Note that the estimated times are in local mean time. Corrections must be applied to convert them to standard time or daylight saving time. These corrections will include a term that involves the observer's longitude, so both his latitude and longitude affect the final result.

The azimuths (true compass bearings) of the points on the horizon where the Sun rises and sets can be easily estimated, using the same diagram as is used to find the times of sunrise and sunset, as described above.

The origin of the analemma rises due east, and sets due west. Therefore, on the diagram, the point where the horizon intersects the equator, which is where the origin crosses the horizon, must represent due east or west. The point where the Sun is at sunrise or sunset represents the direction of sunrise or sunset. Simply measuring the distance along the horizon between these points, in angular terms, gives the angle between due east or west and the direction of sunrise or sunset.

The following QBasic program displays graphs of the Equation of Time and the Solar Declination, showing comparisons with published data. It also draws the analemma, with different colours used to show the parts of the analemma where the sun is in different months.

The dimensions of a symmetrical paraboloidal dish are related by the equation: where is the focal length, is the depth of the dish (measured along the axis of symmetry from the vertex to the plane of the rim), and is the radius of the rim. Of course, they must all be in the same units. If two of these three quantities are known, this equation can be used to calculate the third.

A more complex calculation is needed to find the diameter of the dish measured along its surface. This is sometimes called the "linear diameter". It is the diameter of a flat, circular sheet of material, usually metal, which is the right size to be cut and bent to make the dish. Two intermediate results are useful in the calculation: (or equivalently and where and are defined as above. The linear diameter, is then given by: where means the natural logarithm of , i.e. its logarithm to base "e". (This calculation is exactly accurate. Computer programs that approximate a parabola with a short sequence of straight line segments are less accurate. This includes some published programs.)

The volume of the dish, the amount of liquid it could hold if the rim were horizontal and the vertex at the bottom, is given by or equivalently or where the symbols are defined as above. This last version can be compared with the well-known formulae for the volumes of a cylinder and a cone. Of course, is the aperture area of the dish, the area enclosed by the rim, which is proportional to the amount of sunlight the reflector dish can intercept.

The surface area of a paraboloidal dish can be found using the area formula for a surface of revolution, which gives , providing .

Paraboloids can be made quite simply by rotating open-topped containers which hold liquids. The top surface of a liquid which is being rotated at constant speed around a vertical axis naturally takes the form of a paraboloid.

The focal length of the paraboloid is related to the angular speed at which the liquid is rotated by the equation: 2f=g, where f is the focal length, is the rotation speed, and g is the acceleration due to gravity. They must be in compatible units so, for example, f can be in metres, in radians per second, and g in metres per second-squared. The angle unit in must be radians. 1 radian per second is about 9.55 rotations per minute (RPM). On the Earth's surface, g is about 9.81 metres per second-squared. Putting these numbers into the equation produces the approximation: , where is the focal length in metres, and s is the rotation speed in RPM.

Paraboloidal reflectors that have their centres of mass coincident with their focal points are useful. If the paraboloidal reflector is axially symmetrical and is made of material of uniform thickness, its centre of mass coincides with its focus if the depth of the reflector, measured along its axis of symmetry from the vertex to the plane of the rim, is 1.8478 times its focal length. The radius of the rim of the reflector is 2.7187 times the focal length. The angular radius of the rim, as seen from the focal point, is 72.68 degrees. For details of how these numbers can be calculated, see the "Main article".

There are situations in which a calculation is impracticably difficult or impossible to do, even by a professional mathematician. Often, in these situations, a numerical answer can be obtained by using a computer program that performs a large number of iterations around a loop. Using these techniques requires the availability of a computer programming language (it makes little difference which one), and some proficiency in using it. Obtaining these is very useful.

Integration is an operation that can be extremely difficult or impossible. However, integration is really just summation of an infinite number of infinitessimal terms. By making the terms larger than infinitessimal, but still very small, a computer program can make the machine add a huge number of terms to come up with an acceptably accurate value for the definite integral. An example is shown in Focus-balanced paraboloid. The integration was impossibly difficult, at least for the writer. Writing the computer program was quite easy, and the answer was accurate to at least ten significant digits.

In "Dimensions of a dish", above, an expression is given that allows the "linear diameter" of a paraboloidal dish, which is represented by L, to be calculated from its focal length, F, and the radius of its rim, R. Doing the calculation in that direction is easy, using a pocket calculator. However, inverting it to calculate F from L and R, for example, is extremely difficult. One approach is to program a computer to perform a binary or bisection method search for the correct value of F. Using the given R and a trial value of F which is at the middle of an assumed range of possibility, the machine calculates a value for L. Depending on whether the calculated L is too high or too low, compared with the given one, the trial F is assigned as either the upper or the lower limit of a new range of possibility, half as large as the previous one. A new trial F is then calculated, in the middle of the new range, and the cycle is repeated. Within ten iterations, the range of possibility is reduced by a factor of a thousand. (210=1024) The true value of F is known to be within this small range. A few more iterations allow F to be found to any desired level of accuracy. This technique is frequently useful.

Glass and certain (but not all) "transparent" plastics will allow virtually all the visible and ultraviolet solar radiation striking their surface to pass through, but will absorb most of the infra-red radiation. That is, the visible sunlight comes through the glazing and is directly absorbed by the pot and the air inside, but the thermal energy reradiated by these will not pass directly outward through the glazing. To escape, it must heat the glazing so it radiates the energy outward. This process increases the temperature inside the cooker, as explained below. This greatly aids the cooking. Some facts:

Sunlight can be considered as having two parts roughly in the same proportion. Broadly the two parts are (1) the visible spectrum light and (2) the infra red rays.

Both parts can be directly absorbed by the pot and will heat it. However, the colour of the surface of the pot affects how much sunlight is absorbed, and how much is reflected.

Black paint is good at absorbing visible light, converting its energy into heat. It is also usually good at absorbing infra-red rays. When the pot becomes hot, the black surface re-radiates energy as infra-red rays (black body radiation).

Glazing materials are transparent to visible light, but fairly opaque to infra-red, especially "far" infra-red, which has wavelengths far from the visible spectrum. When they are hot, these materials radiate infra-red energy, like black bodies.

Some approximate calculations: Suppose the intensity of sunlight which strikes the glazing is represented by 2x, of which x is visible and the other x is i-r (infra-red). For the cooker to be in equilibrium, the glazing must be hot enough to radiate 2x outward. By symmetry, it also radiates 2x inward, to the pot. The pot therefore receives 2x of i-r, and also x of visible light which has passed unaffected through the glazing. To be in equilibrium, the pot must therefore radiate 3x of i-r outward. (Thus the glazing absorbs x in i-r from the sun, and 3x from the pot. This balances the 2x that it radiates in both directions.) If the glazing were not present, the pot would radiate 2x outward, to be in equilibrium with incoming sunlight. Thus the effect of the glazing is to raise the temperature of the pot so it radiates 50% more than if the glazing were not present. By the fourth-power law of radiation, the pot's temperature measured from absolute zero is raised by about ten percent, since At typical solar-cooking temperatures, this means that the glazing raises the temperature of the pot by about 35 degrees Celsius, or 65 deg. F. This is enough to make a large difference to the effectiveness of the cooker.

The last paragraph contains many approximations, but its conclusion is roughly right. It is true that glazing greatly improves the effectiveness of a cooker.

Note that the greenhouse effect depends on the glazing being hot (though not as hot as the cooking pot). If there is a wind which cools the glazing, the pot will be cooled too, even though it is protected from the wind.

Note also that this calculation makes no mention of reflection. It is often erroneously stated that glazing traps infra-red by reflecting it. This is not true. In fact, gases such as carbon dioxide produce a "greenhouse effect" without reflecting energy at all.