FB_BA_ShdCorr

Function block for the shading evaluation of a window group on a facade

FB_BA_ShdCorr 1:

Functional description

The function block FB_BA_ShdCorr calculates whether a window group lies in the shadow of surrounding objects. The result, which is output at the output bGrpNotShdd, can be used to judge whether sun shading makes sense for this window group.
The function block thereby accesses two lists, which are to be defined:

On the basis of the facade orientation (lrFcdOrtn), the direction of the sun (lrAzm) and the height of the sun (lrElv), a calculation can be performed for each corner of a window to check whether this lies in a shaded area. A window group is considered to be completely shaded if all corners are shaded.

In the northern hemisphere, the following applies for the facade orientation (looking out of the window):

Line of sight

Facade orientation

North

β=0°

East

β=90°

South

β=180°

West

β=270°

The function block performs its calculations only if the sun is actually shining on the facade. If one regards the drawing presented in the introduction, then this is the case if the following is true:

Facade orientation < azimuth angle < facade orientation + 180°

FB_BA_ShdCorr 2:

In addition, a calculation is also not required, if the sun has not yet risen, i.e. the solar altitude (elevation) is below 0°. In both cases the output bFcdSunlit is set to FALSE.

The situation is different for the southern hemisphere. The following applies to the facade orientation (looking out the window):

Line of sight

Facade orientation

South

β=0°

East

β=90°

North

β=180°

West

β=270°

The internal calculation or the relationship between facade and sunbeam also changes:

FB_BA_ShdCorr 3:

To distinguish between the situation in the northern and southern hemisphere, set the input parameter bSouth to FALSE (northern hemisphere) or TRUE (southern hemisphere)

Inputs/outputs

VAR_INPUT

stTiActl   : TIMESTRUCT;
lrFcdOrtn  : LREAL;
lrAzm      : LREAL;
lrElv      : LREAL;
bSouth     : BOOL;
usiGrpID   : USINT;
arrShdObj  : ARRAY[1..gBA_cMaxShdObj] OF ST_BA_ShdObj;

stTiActl: input of the current time - local time in this case, since this time takes into account the shaded months. If the UTC time (or GMT) is used, the month may change in the middle of the day, depending on the location on the earth.

lrFcdOrtn: facade orientation, see illustration above

lrAzm: direction of the sun at the time of observation [°]

lrElv: sun elevation at the time of observation [°]

bSouth: FALSE: calculations refer to conditions in the northern hemisphere - TRUE: in the southern hemisphere

usiGrpId: window group regarded. The group 0 is reserved here for unused window elements, see FB_BA_FcdElemEntry. A 0-entry would lead to an error output (bErr=TRUE). The function block is then not executed any further and bGrpNotShdd is set to FALSE.

arrShdObj: list of shading objects.

VAR_OUTPUT

bGrpNotShdd : BOOL;
bFcdSunlit  : BOOL;
bErr        : BOOL;
udiErrId    : UDINT;
udiErrArg   : UDINT;

bGrpNotShdd : Is TRUE as long as the window group is not calculated as shaded.

bFcdSunlit: This output is set to TRUE if the sun is shining on the facade. See description above.

bErr: This output is switched to TRUE if the parameters entered are erroneous.

udiErrId / udiErrArg: Contains the error number and the error argument. See Error codes.

VAR_IN_OUT

arrFcdElem     : ARRAY[1..gBA_cMaxColumnFcd, 1..gBA_cMaxRowFcd] OF ST_BA_FcdElem;

arrFcdElem: list of facade elements.

Requirements

Development environment

Target system

required library

required supplement

TwinCAT 2.11 R3/x64

PC/CX

TcBA library from V1.0.0

TS8040 | TwinCAT Building Automation from V1.0.0