added overhang shading implementation for #1467#1468
added overhang shading implementation for #1467#1468Mathadon wants to merge 3 commits intoopen-ideas:masterfrom
Conversation
jelgerjansen
left a comment
There was a problem hiding this comment.
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.
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 |
| 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.
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.
- 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.
"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.
- 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.
Fraction of the light that is absorbed by the opposite object
| @@ -7,15 +7,23 @@ model BuildingShade | |||
| parameter Modelica.Units.SI.Length L(min=0) | |||
There was a problem hiding this comment.
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.
- 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.
You first check L2 and then L2Ove, is it always guaranteed that only 1 elseif statement is true?
closes #1467