overhangSunlitFraction¶
Fraction of a window lit by the direct sun below an overhang: the superposition of rectangles of Buildings.HeatTransfer.Windows.BaseClasses.Overhang, with its smooth minima, maxima and steps, explicit
FastSmoothBuildings.Envelope.Functions.overhangSunlitFraction, function (source)
Purpose
Fraction f of the area of a window lit by the direct sun below an overhang of depth dep, at the
distance gap above the top of the window and extending wL and wR beyond its
left and right edges (seen from outside). The sun is given by its altitude alt, the angle
verAzi between the horizontal projection of its rays and the normal of the wall, and
side, positive when it is left of the normal.
Equations
The extension on the side of the sun, w = wL when side > 0 and
wR otherwise, and the corner of the shadow,
y1 = dep tan(alt)/cos(verAzi),
x1 = dep tan(verAzi).
The shaded area is the superposition of four rectangles of heights H = {gap,
gap + hWin, gap, gap + hWin} and widths
W = {w + wWin, w, w, w + wWin}; for each,
with x2 = x1 H/y1 and
u = min(x1, x2) − W,
a = min(y1, H) W − min(y1, H) min(x2, y1)/2 + max((y1/x1) u, 0) max(u, 0)/2,
Ashd = a4 + a3 − a2 −
a1. The whole window is in the shade when the sun is behind the wall (verAzi >
π/2) or below the horizon (alt < 0):
f = 1 − Ashd/Awin, limited to [0, 1],
Awin = hWin wWin.
Smoothing
- min and max are smoothMin and smoothMax over a hundredth of the width of the window, the limits of f over 0.01.
- The tangents are a sine over a cosine bounded below by 10−3; x1 and
y1 are bounded below by 10−8
hWinwhere they divide. - The side of the sun is chosen by regStep over 0.005, the shade behind the wall and below the horizon by regStep over 0.01 rad.
Relation to Buildings
The superposition of rectangles of Buildings.HeatTransfer.Windows.BaseClasses.Overhang, written
explicitly with smooth minima, maxima and steps.
Validation
Within 0.0006 of the closed form of the shadow; for instance 0.5000 = 1 − tan 45°/2 for a sun facing the wall 45° high and an overhang 1 m deep, 10 m wider on each side, flush with the top of a window 2 m high.
Use
Window with haveOverhang = true;
Validation.ShadingFractions.
Revisions¶
- October 2026: moved from trano's
FastModel.Envelope.Functions.