Skip to content

Commit

Permalink
Define beta_max as a protected parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jelgerjansen committed Jul 5, 2024
1 parent 13cab1f commit 7a0f921
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions IDEAS/Buildings/Components/Shading/HorizontalFins.mo
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ model HorizontalFins "Horizontal fin shading with 2 control input options"

Real shaFrac "Shaded fraction of the glazing for direct solar irradiation";
Real shaFracDif "Shaded fraction of the glazing for diffuse solar irradiation";
Modelica.Units.SI.Angle beta_max "Maximum fin inclination angle";


protected
Modelica.Units.SI.Length dy1=s - sin(beta_internal)*w - cos(beta_internal)*t;
Expand All @@ -27,6 +25,9 @@ protected
"Horizontal ray displacement along the ray direction";
Modelica.Units.SI.Length dy3=max(0, min(dz*tan(angAlt), s));

parameter Modelica.Units.SI.Angle beta_max(min=0,max=Modelica.Constants.pi/2)=acos(t/s)
"Maximum fin inclination angle";

Modelica.Blocks.Interfaces.RealInput beta_internal
"Internal variable for inclination angle";
Modelica.Blocks.Interfaces.RealInput Ctrl_to_beta_internal
Expand All @@ -53,7 +54,6 @@ initial equation
"In " + getInstanceName() + ": Either use_betaInput or use_displacementInput should be false.");

equation
beta_max = acos(t/s);
if not use_betaInput then
beta_internal = beta;
else
Expand Down

0 comments on commit 7a0f921

Please sign in to comment.