Skip to content
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

Change AOI to incAng for naming convention #1527

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ equation
OutTotalRadTilted.I_diff = 0.5*(1 + cos(from_deg(Tilt)))*InDiffRadHor;
OutTotalRadTilted.I_gr = GroundReflection*(InBeamRadHor + InDiffRadHor)*((1 - cos(from_deg(Tilt)))/2);

OutTotalRadTilted.AOI = Modelica.Math.acos(cos_theta); // in rad
OutTotalRadTilted.incAng = Modelica.Math.acos(cos_theta); // in rad

annotation (
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ equation
OutTotalRadTilted.I_dir = BeamRadTilt;
OutTotalRadTilted.I_diff = DiffRadTilt;
OutTotalRadTilted.I_gr = RadGroundRefl;
OutTotalRadTilted.AOI = Modelica.Math.acos(cos_theta); // in rad
OutTotalRadTilted.incAng = Modelica.Math.acos(cos_theta); // in rad

//Output
BeamRadTilt=BeamRadTiltOut;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ equation
connect(Toutside.port, outerWall.port_outside) annotation (Line(points={{20,22},{2,22},{2,25},{-17.7,25}}, color={191,0,0}));
connect(WindSpeed.y, outerWall.WindSpeedPort) annotation (Line(points={{11.1,56},{-4,56},{-4,66.8},{-17.7,66.8}}, color={0,0,127}));
connect(varRad.solarRad_out[1], outerWall.SolarRadiationPort) annotation (Line(points={{41,80},{12,80},{12,77.25},{-16.2,77.25}}, color={255,128,0}));
connect(Solarradiation.y, varRad.AOI[1]) annotation (Line(points={{77.1,79},{68.55,79},{68.55,87},{59,87}}, color={0,0,127}));
connect(Solarradiation.y, varRad.incAng[1]) annotation (Line(points={{77.1,79},{68.55,79},{68.55,87},{59,87}}, color={0,0,127}));
connect(Solarradiation.y, varRad.I_gr[1]) annotation (Line(points={{77.1,79},{67.55,79},{67.55,83.1},{58.9,83.1}}, color={0,0,127}));
connect(Solarradiation.y, varRad.I_diff[1]) annotation (Line(points={{77.1,79},{68.55,79},{68.55,79},{59,79}}, color={0,0,127}));
connect(Solarradiation.y, varRad.I_dir[1]) annotation (Line(points={{77.1,79},{67.55,79},{67.55,75},{59,75}}, color={0,0,127}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ equation
connect(SolarRadiation.y, varRad.I_gr[1]) annotation (Line(
points={{-79,50},{-74,50},{-74,46.9},{-64.9,46.9}},
color={0,0,127}));
connect(SolarRadiation.y, varRad.AOI[1]) annotation (Line(
connect(SolarRadiation.y, varRad.incAng[1]) annotation (Line(
points={{-79,50},{-74,50},{-74,43},{-65,43}},
color={0,0,127}));
connect(Tinside1.port, windowSimple.radPort) annotation (Line(points={{38,42},{26,42},{26,21.6},{10.2,21.6}}, color={191,0,0}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ equation
30},{-20,2},{42,2}}, color={0,0,127}));
connect(const.y, preSolRad.I_gr[1]) annotation (Line(points={{-39,-10},{-30,-10},
{-30,-6.2},{42.2,-6.2}}, color={0,0,127}));
connect(hDirTil.inc, preSolRad.AOI[1]) annotation (Line(points={{-39,66},{-26,
connect(hDirTil.inc, preSolRad.incAng[1]) annotation (Line(points={{-39,66},{-26,
66},{-26,-14},{42,-14}}, color={0,0,127}));
connect(preSolRad.solarRad_out[1], solRadOut)
annotation (Line(points={{78,0},{110,0}}, color={255,128,0}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ equation
solRadOut.I_diff = solRadIn.I_diff*gShaDir*redFacDifRad;
end if;
solRadOut.I_gr = solRadIn.I_gr;
solRadOut.AOI = solRadIn.AOI;
solRadOut.incAng = solRadIn.incAng;

connect(shaLen.weaBus, weaBus) annotation (Line(
points={{-40,0},{-74,0},{-74,80},{-100,80}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ equation
Rad_Out[i].I_dir=Rad_In[i].I_dir*gsunblind[i];
Rad_Out[i].I_diff=Rad_In[i].I_diff*gsunblind[i];
Rad_Out[i].I_gr=Rad_In[i].I_gr*gsunblind[i];
Rad_Out[i].AOI=Rad_In[i].AOI;
Rad_Out[i].incAng=Rad_In[i].incAng;
sunblindonoff[i]=1-gsunblind[i];
else // quantity of solar radiation remains unchanged
Rad_Out[i].I=Rad_In[i].I;
Rad_Out[i].I_dir=Rad_In[i].I_dir;
Rad_Out[i].I_diff=Rad_In[i].I_diff;
Rad_Out[i].I_gr=Rad_In[i].I_gr;
Rad_Out[i].AOI=Rad_In[i].AOI;
Rad_Out[i].incAng=Rad_In[i].incAng;
sunblindonoff[i]=0;
end if;
end for;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ equation
Rad_Out[i].I_dir=Rad_In[i].I_dir*gsunblind[i]*combiTimeTable.y[1];
Rad_Out[i].I_diff=Rad_In[i].I_diff*gsunblind[i]*combiTimeTable.y[1];
Rad_Out[i].I_gr=Rad_In[i].I_gr*gsunblind[i]*combiTimeTable.y[1];
Rad_Out[i].AOI=Rad_In[i].AOI;
Rad_Out[i].incAng=Rad_In[i].incAng;
sunblindonoff[i]=1-gsunblind[i]*combiTimeTable.y[1];
end for;
annotation (Placement(transformation(extent={{-112,-56},{-80,-24}}), iconTransformation(extent={{-100,-40},{-80,-20}})),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ equation
Rad_Out[i].I_dir=Rad_In[i].I_dir*gsunblind[i]*combiTimeTable.y[1];
Rad_Out[i].I_diff=Rad_In[i].I_diff*gsunblind[i]*combiTimeTable.y[1];
Rad_Out[i].I_gr=Rad_In[i].I_gr*gsunblind[i]*combiTimeTable.y[1];
Rad_Out[i].AOI=Rad_In[i].AOI;
Rad_Out[i].incAng=Rad_In[i].incAng;
sunblindonoff[i]=1-gsunblind[i]*combiTimeTable.y[1];
end for;
annotation (Placement(transformation(extent={{-112,-56},{-80,-24}}), iconTransformation(extent={{-100,-40},{-80,-20}})),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ model CorG_ASHRAE140
parameter Real Rout = 0.0476 "Exterior combined heat transfer coefficient";
parameter Real RairGab = 0.1588 "Heat transfer coefficient of air gap";

Real[n] AOI " Angle of incidence";
Real[n] AOI_help;
Real[n] incAng " Angle of incidence";
Real[n] incAng_help;
Real[n] AOR "Angle of refraction";
Real[n] RPERP "Perpendicular reflectance(component of polarization)";
Real[n] RPAR "Parallel reflectance(component of polarization)";
Expand Down Expand Up @@ -45,15 +45,15 @@ model CorG_ASHRAE140
equation
for i in 1:n loop
// Snell's Law
AOI[i] = SR_input[i].AOI; // in rad
AOI_help[i] = to_deg(SR_input[i].AOI); // angle of solar incidence in deg
y=AOI_help[i];
incAng[i] = SR_input[i].incAng; // in rad
incAng_help[i] = to_deg(SR_input[i].incAng); // angle of solar incidence in deg
y=incAng_help[i];

AOR[i] = asin(sin(AOI[i])/INDRG); // Angle of refraction in deg
AOR[i] = asin(sin(incAng[i])/INDRG); // Angle of refraction in deg

//Fresnel Equations(Reflectance at 1 air to glass interface)
RPERP[i]*(sin(AOR[i]+(AOI[i])))^2 = (sin(AOR[i]-(AOI[i])))^2;
RPAR[i]*(tan(AOR[i]+(AOI[i])))^2 = (tan(AOR[i]- (AOI[i])))^2;
RPERP[i]*(sin(AOR[i]+(incAng[i])))^2 = (sin(AOR[i]-(incAng[i])))^2;
RPAR[i]*(tan(AOR[i]+(incAng[i])))^2 = (tan(AOR[i]- (incAng[i])))^2;
R[i] = (RPERP[i]+RPAR[i])/2;

//Fresnel Equations(Transmittance due to reflectance with several panes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Real[n] Qsek2_dir;
Real[n] CorG_dir; // transmission coefficient correction factor for direct irradiations
equation
for i in 1:n loop
theta[i] = SR_input[i].AOI;
theta[i] = SR_input[i].incAng;
Ta_dir[i]= (((((A6*to_deg(theta[i])+A5)*to_deg(theta[i])+A4)*to_deg(theta[i])+A3)*to_deg(theta[i])+A2)*to_deg(theta[i])+A1)*to_deg(theta[i])+A0;
Tai_dir[i]= 0.907^(1/sqrt(1-(sin(theta[i])/1.515)^2));
Ta1_dir[i]= Ta_dir[i]*Tai_dir[i];
Expand Down
2 changes: 1 addition & 1 deletion AixLib/ThermalZones/HighOrder/Examples/OFDHeatLoad.mo
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ equation
points={{79,80},{74,80},{74,66.9},{68.9,66.9}},
color={0,0,127},
smooth=Smooth.None));
connect(constSun.y,varRad. AOI) annotation (Line(
connect(constSun.y,varRad. incAng) annotation (Line(
points={{79,80},{74,80},{74,63},{69,63}},
color={0,0,127},
smooth=Smooth.None));
Expand Down
2 changes: 1 addition & 1 deletion AixLib/Utilities/Interfaces/SolarRad_in.mo
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ connector SolarRad_in
"diffuse radiation normal to the surface";
input Modelica.Units.SI.RadiantEnergyFluenceRate I_gr
"radiation due to the ground reflection normal to the surface";
input Real AOI(unit = "rad") "Angle of incidence of surface";
input Real incAng(unit = "rad") "Angle of incidence of surface";
annotation(Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics={ Ellipse(extent = {{-20, 58}, {96, -58}}, lineColor = {255, 128, 0}), Rectangle(extent = {{52, 100}, {100, -100}}, lineColor = {0, 0, 0}, fillColor = {215, 215, 215},
fillPattern = FillPattern.Solid), Line(points = {{38, 62}, {38, 80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-24, 0}, {-78, 0}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-6, 44}, {-46, 80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-20, 22}, {-72, 40}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{14, 58}, {2, 80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{14, -58}, {2, -80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-8, -44}, {-46, -80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-20, -22}, {-74, -40}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{38, -80}, {38, -62}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Polygon(points = {{0, 6}, {0, 28}, {0, 28}, {52, 0}, {0, -26}, {0, -26}, {0, -6}, {0, 6}}, lineColor = {0, 0, 0}, fillColor = {255, 0, 0},
fillPattern = FillPattern.Solid)}), Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics={ Ellipse(extent = {{-20, 58}, {96, -58}}, lineColor = {255, 128, 0}), Rectangle(extent = {{52, 100}, {100, -100}}, lineColor = {0, 0, 0}, fillColor = {215, 215, 215},
Expand Down
2 changes: 1 addition & 1 deletion AixLib/Utilities/Interfaces/SolarRad_out.mo
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ connector SolarRad_out
output Modelica.Units.SI.RadiantEnergyFluenceRate I_gr
"radiation due to the ground reflection normal to the surface";

output Real AOI(unit = "rad") "Angle of incidence of surface";
output Real incAng(unit = "rad") "Angle of incidence of surface";
annotation(Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics={ Ellipse(extent = {{18, 58}, {-98, -58}}, lineColor = {255, 128, 0}), Line(points = {{-40, 62}, {-40, 80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{24, 0}, {78, 0}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{6, 44}, {46, 80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{20, 22}, {72, 40}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-14, 58}, {-2, 80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-14, -58}, {-2, -80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{8, -44}, {46, -80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{20, -22}, {74, -40}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-40, -80}, {-40, -62}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Rectangle(extent = {{-100, 100}, {-60, -100}}, lineColor = {0, 0, 0}, fillColor = {215, 215, 215},
fillPattern = FillPattern.Solid), Polygon(points = {{-60, 6}, {-60, 28}, {-60, 28}, {-8, 0}, {-60, -26}, {-60, -26}, {-60, -6}, {-60, 6}}, lineColor = {0, 0, 0}, fillColor = {255, 0, 0},
fillPattern = FillPattern.Solid)}), Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics={ Ellipse(extent = {{18, 58}, {-98, -58}}, lineColor = {255, 128, 0}), Line(points = {{-40, 62}, {-40, 80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{24, 0}, {78, 0}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{6, 44}, {46, 80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{20, 22}, {72, 40}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-14, 58}, {-2, 80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-14, -58}, {-2, -80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{8, -44}, {46, -80}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{20, -22}, {74, -40}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Line(points = {{-40, -80}, {-40, -62}}, color = {255, 128, 0}, smooth = Smooth.Bezier), Rectangle(extent = {{-100, 100}, {-60, -100}}, lineColor = {0, 0, 0}, fillColor = {215, 215, 215},
Expand Down
4 changes: 2 additions & 2 deletions AixLib/Utilities/Sources/PrescribedSolarRad.mo
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ model PrescribedSolarRad "variable radiation condition"
annotation (Placement(transformation(extent={{-120,-4},{-80,36}}), iconTransformation(extent={{-100,0},{-80,20}})));
Modelica.Blocks.Interfaces.RealInput I_gr[n] "radiation on surface (W/m2)"
annotation (Placement(transformation(extent={{-120,-38},{-80,2}}), iconTransformation(extent={{-100,-42},{-78,-20}})));
Modelica.Blocks.Interfaces.RealInput AOI[n] "radiation on surface (W/m2)"
Modelica.Blocks.Interfaces.RealInput incAng[n] "radiation on surface (W/m2)"
annotation (Placement(transformation(extent={{-120,-76},{-80,-36}}), iconTransformation(extent={{-100,-80},{-80,-60}})));
equation
solarRad_out[:].I = I[:] "Radiant energy fluence rate";
solarRad_out[:].I_dir = I_dir[:] "Radiant energy fluence rate";
solarRad_out[:].I_diff = I_diff[:] "Radiant energy fluence rate";
solarRad_out[:].I_gr = I_gr[:] "Radiant energy fluence rate";
solarRad_out[:].AOI = AOI[:] "Radiant energy fluence rate";
solarRad_out[:].incAng = incAng[:] "Radiant energy fluence rate";

annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}),graphics={
Expand Down