Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page

# How to find hourly position of the Sun?

What is the best way to find hourly position of the Sun? Is it by outputting azimuth and altitude angle (code below), which will give horizontal and vertical location of the Sun or there is some other way of doing it?

Output:Variable,*,Site Solar Azimuth Angle,hourly; !- Zone Average [deg]
Output:Variable,*,Site Solar Altitude Angle,hourly; !- Zone Average [deg]

edit retag close merge delete

Sort by ยป oldest newest most voted

and this is the chart by plotting solar azimuth vs solar altitude:

... which is quite different from similar chart such as this one:

May I ask why the local sun altitude and azimuth are not reported by the three variables? and why the scatter plot of the two variables generated from EnergyPlus is different from other similar chart?

more

Even though they're both plotting solar azimuth and altitude, the two plots look different because they're grouped differently. The top plot shows sun positions for the same hour over 365 days. These figure 8s are called analemma, the Web has pictures of lots of them. The bottom plot shows sun positions for each month over a typical day. If you connect the dots on the top plot for the same day, the result should be the same. Note that the top plot shows sun positions below the horizon and seems to be for a location in the tropics, while the bottom plot is for a northern location.

( 2017-12-30 19:05:41 -0600 )edit

Which is the location for this figure? Is it for everywhere? Thanks.

( 2021-07-24 21:06:58 -0600 )edit

Hi Waseem,

For hourly position of the sun, there are three output variables to consider.

Output:Variable,*,Site Solar Azimuth Angle,hourly; !- Zone Average [deg]

This relates the angle from the sun's position away from the north axis on a horizontal plane

Output:Variable,*,Site Solar Altitude Angle,hourly; !- Zone Average [deg]

This relates the angle from the sun's position upward from the horizontal plane / horizon

Output:Variable,*,Site Solar Hour Angle,hourly; !- Zone Average [deg]

This gives the apparent solar time for the current time period, expressed in deg (+ before noon, - after noon).

For more details on these outputs, you can reference the Shading Module portion of the Engineering Reference HERE

I hope this helps!

more

Hi Aaron, I tried your suggestion and added the three output variables related to solar altitude, azimuth and solar angle. However, the hourly values as reported for the 3 variables are the same regardless of the epw files been used. May I ask if this is expected? and how to get local sun altitude and azimuth as those used to draw the sun path? Thanks.

( 2017-12-29 07:18:03 -0600 )edit

@oat EnergyPlus calculates solar angles depending upon Latitude and Longitude settings in the Site:Location object. Are you updating this object when you apply a different EPW file?

( 2018-01-02 14:47:05 -0600 )edit

Would anyone output this information for the baseline model already.

( 2021-07-23 09:59:35 -0600 )edit

@llfan_123 by "baseline model" do you mean the default for all EnergyPlus simulations? Some users may only want to see these outputs for initial simulations to inform design decisions and not want them generated for every simulation of every model.

If you have a list of Output:Variable objects that you want to generate between models, you can save a file that is essentially a list of them to copy into models. Or, search in the RDD output file after a simulation.

( 2021-07-23 10:08:44 -0600 )edit

I think the sun location should be in the epw/weather file, and I think this should be updated when applying a different EPW file @Aaron Boranian

( 2021-07-23 11:08:03 -0600 )edit