Skip to content

Conversation

@Mathadon
Copy link
Member

closes #1467

Copy link
Contributor

@jelgerjansen jelgerjansen left a 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
Copy link
Contributor

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:

  1. dep (as used in the Overhang model)
  2. 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
Copy link
Contributor

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
Copy link
Contributor

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.

Comment on lines +44 to +49
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";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Update parameter declaration to something like "Intermediate parameter to simplify model equations and expressions"
  2. Do you really need the coeff parameters? I guess the final expressions are more understandable if fraSha and fraShaOve are 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";
Copy link
Contributor

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.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. absorbed by the overvang
  2. 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.";
Copy link
Contributor

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)
Copy link
Contributor

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"

Comment on lines 37 to +40
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";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Isn't view factor a better word?
  2. I would expect vieAngOve to be equal to atan(LOve/(hWin/2+dhOve)). How did you derive your expression?

Comment on lines +69 to +76
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;
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include overhang in BuildingShade model

2 participants