-
Notifications
You must be signed in to change notification settings - Fork 64
added overhang shading implementation for #1467 #1468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,12 @@ model OuterWall "Opaque building envelope construction" | |
| parameter Modelica.Units.SI.Length dh(min=-hWal) = 0 | ||
| "Height difference between top of object and top of wall" | ||
| annotation (Dialog(group="Building shade", enable=hasBuildingShade)); | ||
| parameter Modelica.Units.SI.Length LOv(min=0) = 0 | ||
| "Distance between overhang edge and wall, perpendicular to wall" | ||
| annotation (Dialog(group="Building shade", enable=hasBuildingShade)); | ||
| parameter Modelica.Units.SI.Length dhOv(min=-hWal) = 0 | ||
| "Height difference between bottom of overhang and top of wall" | ||
| annotation (Dialog(group="Building shade", enable=hasBuildingShade)); | ||
| parameter Modelica.Units.SI.Length hWal(min=0) = 0 "Wall height" | ||
| annotation (Dialog(group="Building shade", enable=hasBuildingShade)); | ||
| final parameter Real U_value=1/(1/8 + sum(constructionType.mats.R) + 1/25) | ||
|
|
@@ -52,6 +58,8 @@ model OuterWall "Opaque building envelope construction" | |
| final haveBoundaryPorts=false, | ||
| final L=L, | ||
| final dh=dh, | ||
| final LOv=LOv, | ||
| final dhOv=dhOv, | ||
| final hWin=hWal) if hasBuildingShade | ||
| constrainedby IDEAS.Buildings.Components.Shading.Interfaces.PartialShading( | ||
| final azi=aziInt) | ||
|
|
@@ -304,6 +312,10 @@ The correct shading parameter values should then be passed through the redeclara | |
| </html>", revisions="<html> | ||
| <ul> | ||
| <li> | ||
| October 19, 2025 by Filip Jorissen:<br/> | ||
| Added support for shading overhangs <a href=\"https://github.com/open-ideas/IDEAS/issues/1467\">#1467</a>. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added support for shading overhangs. |
||
| </li> | ||
| <li> | ||
| August 18, 2025, by Klaas De Jonge:<br/> | ||
| Changed inc to incInt where nececarry. | ||
| </li> | ||
|
|
@@ -386,4 +398,4 @@ Adjusted implementation for grouping of solar calculations. | |
| </li> | ||
| </ul> | ||
| </html>")); | ||
| end OuterWall; | ||
| end OuterWall; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,15 +7,23 @@ model BuildingShade | |
| parameter Modelica.Units.SI.Length L(min=0) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update model documentation: "Component for modeling shade cast by distant opposite objects such as buildings and treelines and/or an overhang" |
||
| "Distance to object perpendicular to window" | ||
| annotation (Dialog(group="Dimensions (see illustration in documentation)")); | ||
| parameter Modelica.Units.SI.Length LOv(min=0) = 0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would unify the parameter naming of this model and the
|
||
| "Overhang length perpendicular to window" | ||
| annotation (Dialog(group="Dimensions (see illustration in documentation)")); | ||
| parameter Modelica.Units.SI.Length dh | ||
| "Height difference between top of object and top of window glazing" | ||
| annotation (Dialog(group="Dimensions (see illustration in documentation)")); | ||
| parameter Modelica.Units.SI.Length dhOv = 0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| "Height difference between bottom of overhang and top of window glazing" | ||
| annotation (Dialog(group="Dimensions (see illustration in documentation)")); | ||
| parameter Modelica.Units.SI.Length hWin(min=0) = 1 | ||
| "Window height: distance between top and bottom of window glazing" | ||
| annotation (Dialog(group="Dimensions (see illustration in documentation)")); | ||
| parameter Real fraSha(min=0,max=1) = 1 | ||
| "Fraction of the light that is shaded, e.g. smaller than 1 for shading cast by tree lines."; | ||
| final parameter Real fraSunDifSky(final min=0,final max=1, final unit="1") = 1-vieAngObj/(Modelica.Constants.pi/2) | ||
| "Fraction of the light that is absorbed, e.g. smaller than 1 for shading cast by tree lines."; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fraction of the light that is absorbed by the opposite object |
||
| parameter Real fraShaOv(min=0,max=1) = fraSha | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| "Fraction of the light that is absorbed for overhang, e.g. smaller than 1 for shading cast by screens."; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| final parameter Real fraSunDifSky(final min=0,final max=1, final unit="1") = max(0, 1-(vieAngObj + vieAngOv)/(Modelica.Constants.pi/2)) | ||
| "Fraction of window area exposed to diffuse sun light"; | ||
|
|
||
| Real fraSunDir(final min=0,final max=1, final unit="1") | ||
|
|
@@ -24,37 +32,60 @@ model BuildingShade | |
| // Computation assumes that window base is at ground level. | ||
| // Viewing angle computed from center of glazing. | ||
| protected | ||
| final parameter Boolean haveOverhang = LOv > Modelica.Constants.small | ||
| "To avoid divisions by zero and obsolete computations"; | ||
| parameter Modelica.Units.SI.Angle vieAngObj=atan((hWin/2 + dh)/L) | ||
| "Viewing angle of opposite object"; | ||
| parameter Modelica.Units.SI.Angle vieAngOv=if haveOverhang then Modelica.Constants.pi/2 - atan((hWin/2 + dhOv)/LOv) else 0 | ||
| "Viewing angle of overhang"; | ||
|
Comment on lines
37
to
+40
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| final parameter Modelica.Units.SI.Angle rot=0 | ||
| "Rotation angle of opposite building. Zero when parallel, positive when rotated clockwise" | ||
| annotation (Evaluate=true); | ||
| final parameter Real coeff = 1-fraSha "More efficient implementation"; | ||
| final parameter Real hWinInv = 1/hWin "More efficient implementation"; | ||
| final parameter Real coeff = 1-fraSha | ||
| "More efficient implementation"; | ||
| final parameter Real coeffOv = 1-fraShaOv | ||
| "More efficient implementation"; | ||
| final parameter Real hWinInv = 1/hWin | ||
| "More efficient implementation"; | ||
|
Comment on lines
+44
to
+49
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| Real tanZen = tan(min(angZen, Modelica.Constants.pi/2.01)); | ||
| Modelica.Units.SI.Length L1 | ||
| Modelica.Units.SI.Length L1 = max(0, L/cos(verAzi)) | ||
| "Horizontal distance to object when following vertical plane through sun ray"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "opposite object" (clarify now that the model has two different shading objects) |
||
| Modelica.Units.SI.Length L2 | ||
| "Distance to object, taking into account sun position"; | ||
| Modelica.Units.SI.Angle alt=(Modelica.Constants.pi/2) - angZen; | ||
| Modelica.Units.SI.Angle verAzi | ||
| Modelica.Units.SI.Length L2 = L1*tan(alt) | ||
| "Maximum height of object before it casts some shade"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "opposite object" (clarify now that the model has two different shading objects) |
||
| Modelica.Units.SI.Length L1Ov = max(0, LOv/cos(verAzi)) | ||
| "Horizontal distance to overhang edge when following vertical plane through sun ray"; | ||
| Modelica.Units.SI.Length L2Ov = L1Ov*tan(alt) | ||
| "Minimum vertical distance between overhang and window before overhang casts some shade"; | ||
| Modelica.Units.SI.Angle alt=(Modelica.Constants.pi/2) - angZen | ||
| "Solar altitude angle"; | ||
| Modelica.Units.SI.Angle verAzi = Modelica.Math.acos(cos(angInc)/cos(alt)) | ||
| "Angle between downward projection of sun's rays and normal to vertical surface"; | ||
| initial equation | ||
| assert(fraSunDifSky>=0 and fraSunDifSky<=1, "In " + getInstanceName() + | ||
| ": The parameter fraSunDifSky has the value " +String(fraSunDifSky) + " and | ||
| should be within [0,1]. Please contact the IDEAS developers."); | ||
|
|
||
|
|
||
| equation | ||
|
|
||
| verAzi = Modelica.Math.acos(cos(angInc)/cos(alt)); | ||
| L1 = max(0,L/cos(verAzi)); | ||
| L2 = L1*tan(alt); | ||
| if noEvent(L2<dh) then | ||
| fraSunDir=coeff; | ||
| elseif noEvent(L2<dh+hWin) then | ||
| fraSunDir=coeff + (L2-dh)*fraSha*hWinInv; | ||
| // the below implementation does not yet consider the case where both overhang and object | ||
| // cast shade at the same time | ||
|
|
||
| if haveOverhang then | ||
| if noEvent(L2<dh) then | ||
| fraSunDir=coeff; | ||
| elseif noEvent(L2<dh+hWin) then | ||
| fraSunDir=coeff + (L2-dh)*fraSha*hWinInv; | ||
| elseif noEvent(L2Ov>dhOv+hWin) then | ||
| fraSunDir=coeffOv; | ||
| elseif noEvent(L2Ov>dhOv) then | ||
| fraSunDir=coeffOv + (L2Ov-dhOv)*fraShaOv*hWinInv; | ||
|
Comment on lines
+69
to
+76
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You first check L2 and then L2Ove, is it always guaranteed that only 1 elseif statement is true? |
||
| else | ||
| fraSunDir=1; | ||
| end if; | ||
| else | ||
| fraSunDir=1; | ||
| if noEvent(L2<dh) then | ||
| fraSunDir=coeff; | ||
| elseif noEvent(L2<dh+hWin) then | ||
| fraSunDir=coeff + (L2-dh)*fraSha*hWinInv; | ||
| else | ||
| fraSunDir=1; | ||
| end if; | ||
|
|
||
| end if; | ||
|
|
||
| HShaDirTil=fraSunDir*HDirTil; | ||
|
|
@@ -96,6 +127,10 @@ can be modelled by changing the value of parameter <code>fraSha</code> according | |
| </html>", revisions="<html> | ||
| <ul> | ||
| <li> | ||
| October 18, 2025 by Filip Jorissen:<br/> | ||
| Added support for shading overhangs <a href=\"https://github.com/open-ideas/IDEAS/issues/1467\">#1467</a> and updated documentation image. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added support for shading overhangs and updated documentation image. |
||
| </li> | ||
| <li> | ||
| July 18, 2022 by Filip Jorissen:<br/> | ||
| Refactored for <a href=\"https://github.com/open-ideas/IDEAS/issues/1270\">#1270</a> for including thermal effect of screens. | ||
| </li> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would apply the
minattribute in the BuildingShade model, in case someone uses this model for e.g. a window.