-
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?
Conversation
jelgerjansen
left a comment
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.
Thanks for implementing this @Mathadon. I've added some feedback and remaks.
I'm not very familiar with all calculations of angles, so for that I'm trusting your expertise on this.
| parameter Modelica.Units.SI.Length L(min=0) | ||
| "Distance to object perpendicular to window" | ||
| annotation (Dialog(group="Dimensions (see illustration in documentation)")); | ||
| parameter Modelica.Units.SI.Length LOv(min=0) = 0 |
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 unify the parameter naming of this model and the Overhang model. So either:
dep(as used in the Overhang model)LOve(use three characters) and apply this change to the Overhang model as well
| 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 |
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.
gap or dhOve
| 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 |
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 min attribute in the BuildingShade model, in case someone uses this model for e.g. a window.
| 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"; |
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.
- Update parameter declaration to something like "Intermediate parameter to simplify model equations and expressions"
- Do you really need the
coeffparameters? I guess the final expressions are more understandable iffraShaandfraShaOveare directly used.
| 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"; |
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.
"opposite object" (clarify now that the model has two different shading objects)
| 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."; | ||
| parameter Real fraShaOv(min=0,max=1) = fraSha | ||
| "Fraction of the light that is absorbed for overhang, e.g. smaller than 1 for shading cast by screens."; |
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.
- absorbed by the overvang
- I find the example somewhat weird. Couldn't you say something like "equal to 1 for a concrete overhang and smaller than 1 for a glass overhang"
| 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."; |
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.
Fraction of the light that is absorbed by the opposite object
| extends IDEAS.Buildings.Components.Shading.Interfaces.PartialShadingDevice( | ||
| final controlled=false); | ||
|
|
||
| parameter Modelica.Units.SI.Length L(min=0) |
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.
Update model documentation: "Component for modeling shade cast by distant opposite objects such as buildings and treelines and/or an overhang"
| 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"; |
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.
- Isn't view factor a better word?
- I would expect
vieAngOveto be equal toatan(LOve/(hWin/2+dhOve)). How did you derive your expression?
| 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; |
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.
You first check L2 and then L2Ove, is it always guaranteed that only 1 elseif statement is true?
closes #1467