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

How is the surface outside face beam solar incident angle cosine value calculated in EnergyPlus?

I output the hourly solar altitude angle, solar azimuth angle, and the Surface Outside Face Beam Solar Incident Angle Cosine Value for a window facing south. I found the surface outside face beam solar incident angle cosine value has some deviations.

Especially, at 04/11 16:30, the incident angle cosine value output from energyplus is a negative value, but according to the solar altitude angle and the amuzith angle, it should be a positive value, because the solar amuzith is smaller than 270 deg, which indicates that the direct solar beam can hit the fouth facade.

The formula for south facade I used is ：

cosAngle = cos(180-azimuth)*cos(altitude)

I also try to find the result, but I only find the function SurfCosIncAng is used to calculate the value in EnergyPlus, and I cannot find the implementation of the function SurfCosIncAng.

Real64 CosInc = state.dataHeatBal->SurfCosIncAng(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, SurfNum);

I don't know if there is any EneryPlus developers in this forum who can answer this question.

edit retag close merge delete

Sort by » oldest newest most voted

I have found the answer by reading the source code. This is because the solar positions are updated every 20 days if default settings are used. The solar direction is an averaged direction over the 20 days for the same hour. I set the update frequency to one day, and then the output for Surface Outside Face Beam Solar Incident Angle Cosine Value matched with the calculated ones.

Below is the source code snippet (Solar Shading.cc)

void PerformSolarCalculations(EnergyPlusData &state){

...

PerDayOfYear = state.dataEnvrn->DayOfYear;
SumDec = 0.0;
SumET = 0.0;
SUN3(PerDayOfYear, SinDec, EqTime);
SumDec += SinDec;
SumET += EqTime;
++PerDayOfYear;
}

//  Compute Period Values
AvgCosSolarDeclin = std::sqrt(1.0 - pow_2(AvgSinSolarDeclin));
CalcPerSolarBeam(state, AvgEqOfTime, AvgSinSolarDeclin, AvgCosSolarDeclin);
...

}

more