LBL logo

Buildings.BoundaryConditions.SolarGeometry.BaseClasses

Package with base classes for Buildings.BoundaryConditions.SolarGeometry

Information

This package contains base classes that are used to construct the models in Buildings.BoundaryConditions.SolarGeometry.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.BoundaryConditions.SolarGeometry.BaseClasses.Declination Declination Declination angle
Buildings.BoundaryConditions.SolarGeometry.BaseClasses.IncidenceAngle IncidenceAngle The solar incidence angle on a tilted surface
Buildings.BoundaryConditions.SolarGeometry.BaseClasses.SolarAzimuth SolarAzimuth Solar azimuth
Buildings.BoundaryConditions.SolarGeometry.BaseClasses.SolarHourAngle SolarHourAngle Solar hour angle
Buildings.BoundaryConditions.SolarGeometry.BaseClasses.ZenithAngle ZenithAngle Zenith angle
Buildings.BoundaryConditions.SolarGeometry.BaseClasses.AltitudeAngle AltitudeAngle Solar altitude angle
Buildings.BoundaryConditions.SolarGeometry.BaseClasses.WallSolarAzimuth WallSolarAzimuth Angle measured in a horizontal plane between the projection of the sun's rays and the normal to a vertical surface
Buildings.BoundaryConditions.SolarGeometry.BaseClasses.Examples Examples Collection of models that illustrate model use and test models

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.Declination Buildings.BoundaryConditions.SolarGeometry.BaseClasses.Declination

Declination angle

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.Declination

Information

This component computes the angle between the equatorial plane and the solar beam.


Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
input RealInputnDayOne-based day number in seconds [s]
output RealOutputdecAngDeclination angle [rad]

Modelica definition

block Declination "Declination angle" extends Modelica.Blocks.Icons.Block; public Modelica.Blocks.Interfaces.RealInput nDay(quantity="Time", unit="s") "One-based day number in seconds"; Modelica.Blocks.Interfaces.RealOutput decAng( final quantity="Angle", final unit="rad", displayUnit="deg") "Declination angle"; equation decAng = Modelica.Math.asin(-sin(23.45*2*Modelica.Constants.pi/360)* Modelica.Math.cos((nDay/86400 + 10)*2*Modelica.Constants.pi/365.25)) "(A4.5)"; end Declination;

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.IncidenceAngle Buildings.BoundaryConditions.SolarGeometry.BaseClasses.IncidenceAngle

The solar incidence angle on a tilted surface

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.IncidenceAngle

Information

This component computes the solar incidence angle on a tilted surface using the solar hour angle and the declination angle as input.


Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
Anglelat Latitude [rad]
Angleazi Surface azimuth. azi=-90 degree if surface outward unit normal points toward east; azi=0 if it points toward south [rad]
Angletil Surface tilt. til=90 degree for walls; til=0 for ceilings; til=180 for roof [rad]

Connectors

TypeNameDescription
input RealInputsolHouAngSolar hour angle [rad]
input RealInputdecAngDeclination [rad]
output RealOutputincAngIncidence angle on a tilted surfce [rad]

Modelica definition

block IncidenceAngle "The solar incidence angle on a tilted surface" extends Modelica.Blocks.Icons.Block; public parameter Modelica.SIunits.Angle lat "Latitude"; parameter Modelica.SIunits.Angle azi(displayUnit="degree") "Surface azimuth. azi=-90 degree if surface outward unit normal points toward east; azi=0 if it points toward south"; parameter Modelica.SIunits.Angle til(displayUnit="degree") "Surface tilt. til=90 degree for walls; til=0 for ceilings; til=180 for roof"; Modelica.Blocks.Interfaces.RealInput solHouAng(quantity="Angle", unit="rad") "Solar hour angle"; Modelica.Blocks.Interfaces.RealInput decAng(quantity="Angle", unit="rad") "Declination"; Modelica.Blocks.Interfaces.RealOutput incAng( final quantity="Angle", final unit="rad", displayUnit="deg") "Incidence angle on a tilted surfce"; protected Real dec_c=Modelica.Math.cos(decAng); Real dec_s=Modelica.Math.sin(decAng); Real sol_c=Modelica.Math.cos(solHouAng); Real sol_s=Modelica.Math.sin(solHouAng); Real lat_c=Modelica.Math.cos(lat); Real lat_s=Modelica.Math.sin(lat); equation incAng = Modelica.Math.acos(Modelica.Math.cos(til)*(dec_c*sol_c*lat_c + dec_s *lat_s) + Modelica.Math.sin(til)*(Modelica.Math.sin(azi)*dec_c*sol_s + Modelica.Math.cos(azi)*(dec_c*sol_c*lat_s - dec_s*lat_c))) "(A.4.13)"; end IncidenceAngle;

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.SolarAzimuth Buildings.BoundaryConditions.SolarGeometry.BaseClasses.SolarAzimuth

Solar azimuth

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.SolarAzimuth

Information

This component computes the solar azimuth angle.


Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
Anglelat Latitude [rad]

Connectors

TypeNameDescription
input RealInputzenZenith angle [rad]
input RealInputsolTimSolar time [s]
output RealOutputsolAziSolar Azimuth [rad]
input RealInputdecAngDecline angle [rad]

Modelica definition

block SolarAzimuth "Solar azimuth" extends Modelica.Blocks.Icons.Block; public parameter Modelica.SIunits.Angle lat "Latitude"; Modelica.Blocks.Interfaces.RealInput zen(quantity="Angle", unit="rad") "Zenith angle"; Modelica.Blocks.Interfaces.RealInput solTim(quantity="Time", unit="s") "Solar time"; Modelica.Blocks.Interfaces.RealOutput solAzi( final quantity="Angle", final unit="rad", displayUnit="deg") "Solar Azimuth"; Modelica.Blocks.Interfaces.RealInput decAng(quantity="Angle", unit="rad") "Decline angle"; protected Real arg "cos(solAzi) after data validity check"; Real tmp "cos(solAzi) before data validity check"; constant Modelica.SIunits.Time day=86400 "Number of seconds in a day"; constant Modelica.SIunits.Angle polarCircle = 1.1617 "Latitude of polar circle (66 degree 33 min 44 sec)"; final parameter Boolean outsidePolarCircle = lat < polarCircle and lat > -polarCircle "Flag, true if latitude is outside polar region"; algorithm tmp :=(Modelica.Math.sin(lat)*Modelica.Math.cos(zen) - Modelica.Math.sin( decAng))/(Modelica.Math.cos(lat)*Modelica.Math.sin(zen)); arg :=min(1.0, max(-1.0, tmp)); solAzi := Modelica.Math.acos(arg); // Solar azimuth (A4.9a and b) as a positive number if outsidePolarCircle then // Outside the polar circle, the only non-differentiability is at night when the sun is set. // Hence, we use noEvent. if noEvent(solTim - integer(solTim/day)*day < 43200) then solAzi :=-solAzi; end if; else // Inside the polar circle, there is a jump at (solar-)midnight when the sun can // be above the horizon. Hence, we do not use noEvent(...) if solTim - integer(solTim/day)*day < 43200 then solAzi :=-solAzi; end if; end if; end SolarAzimuth;

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.SolarHourAngle Buildings.BoundaryConditions.SolarGeometry.BaseClasses.SolarHourAngle

Solar hour angle

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.SolarHourAngle

Information

This component computes the solar hour angle, which is defined as the angle between the circle that passes through an observer, the north pole and the south pole, and the circle that passes through the sun, the north and the south pole.


Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
input RealInputsolTimSolar time [s]
output RealOutputsolHouAngSolar hour angle [rad]

Modelica definition

block SolarHourAngle "Solar hour angle" extends Modelica.Blocks.Icons.Block; public Modelica.Blocks.Interfaces.RealInput solTim(quantity="Time", unit="s") "Solar time"; Modelica.Blocks.Interfaces.RealOutput solHouAng( final quantity="Angle", final unit="rad", displayUnit="deg") "Solar hour angle"; equation solHouAng = (solTim/3600 - 12)*2*Modelica.Constants.pi/24 "Our unit is s instead of h in (A4.6)"; end SolarHourAngle;

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.ZenithAngle Buildings.BoundaryConditions.SolarGeometry.BaseClasses.ZenithAngle

Zenith angle

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.ZenithAngle

Information

This component computes the zenith angle, which is the angle between the earth surface normal and the sun's beam. Input are the solar hour angle and the declination angle.


Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
Anglelat Latitude [rad]

Connectors

TypeNameDescription
input RealInputsolHouAngSolar hour angle [rad]
input RealInputdecAngDeclination [rad]
output RealOutputzenZenith angle [rad]

Modelica definition

block ZenithAngle "Zenith angle" extends Modelica.Blocks.Icons.Block; public parameter Modelica.SIunits.Angle lat "Latitude"; Modelica.Blocks.Interfaces.RealInput solHouAng(quantity="Angle", unit="rad") "Solar hour angle"; Modelica.Blocks.Interfaces.RealInput decAng(quantity="Angle", unit="rad") "Declination"; Modelica.Blocks.Interfaces.RealOutput zen( final quantity="Angle", final unit="rad", displayUnit="deg") "Zenith angle"; equation zen = Modelica.Math.acos(Modelica.Math.cos(lat)*Modelica.Math.cos(decAng)* Modelica.Math.cos(solHouAng) + Modelica.Math.sin(lat)*Modelica.Math.sin( decAng)) "(A4.8)"; end ZenithAngle;

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.AltitudeAngle Buildings.BoundaryConditions.SolarGeometry.BaseClasses.AltitudeAngle

Solar altitude angle

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.AltitudeAngle

Information

This block computes the altitude angle of the sun with respect to a horizontal surface. The altitude angle is the angle between the sun ray and the projection of the ray on a horizontal surface. It is the complementory angle to the zenith angle.


Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
input RealInputzenZenith angle [rad]
output RealOutputaltAltitude angle [rad]

Modelica definition

block AltitudeAngle "Solar altitude angle" extends Modelica.Blocks.Icons.Block; public Modelica.Blocks.Interfaces.RealInput zen(quantity="Angle", unit="rad") "Zenith angle"; Modelica.Blocks.Interfaces.RealOutput alt( final quantity="Angle", final unit="rad", displayUnit="deg") "Altitude angle"; equation alt = (Modelica.Constants.pi/2) - zen; end AltitudeAngle;

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.WallSolarAzimuth Buildings.BoundaryConditions.SolarGeometry.BaseClasses.WallSolarAzimuth

Angle measured in a horizontal plane between the projection of the sun's rays and the normal to a vertical surface

Buildings.BoundaryConditions.SolarGeometry.BaseClasses.WallSolarAzimuth

Information

This block computes the wall solar azimuth angle. It is the angle between the projection of the sun ray on a horizontal surface and the line perpendicular to the wall. The value of this angle varies from 0 to 180 degrees. In the northern hemisphere at solar noon, the value of the wall solar azimuth angle is zero if the wall is facing south.


Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
input RealInputincAngSolar incidence angle [rad]
input RealInputaltSolar altitude angle (angle between sun ray and horizontal surface) [rad]
output RealOutputverAziAngle between projection of sun's rays and normal to vertical surface [rad]

Modelica definition

block WallSolarAzimuth "Angle measured in a horizontal plane between the projection of the sun's rays and the normal to a vertical surface" extends Modelica.Blocks.Icons.Block; Modelica.Blocks.Interfaces.RealInput incAng(quantity="Angle", unit="rad", displayUnit="rad") "Solar incidence angle"; Modelica.Blocks.Interfaces.RealInput alt(quantity="Angle", unit="rad", displayUnit="rad") "Solar altitude angle (angle between sun ray and horizontal surface)"; Modelica.Blocks.Interfaces.RealOutput verAzi( final quantity="Angle", final unit="rad", displayUnit="deg") "Angle between projection of sun's rays and normal to vertical surface"; protected constant Modelica.SIunits.Angle delta = 1*Modelica.Constants.pi/180 "Small angle"; constant Modelica.SIunits.Angle ninety= Modelica.Constants.pi/2-delta "+89 degree"; constant Real deltaX = 1E-4 "Small number used for smoothing"; Real alt_c "Cosine of altitude, bounded away from zero"; Real rat "Ratio of cosines"; equation alt_c=Modelica.Math.cos(Buildings.Utilities.Math.Functions.smoothLimit( x=alt, l=-ninety, u=ninety, deltaX=delta)); rat = Modelica.Math.cos(incAng)/alt_c; // Due to the smoothLimit, rat can be about 1E-3 greater than 1 or smaller than -1. // Hence, below we use another call to smoothLimit to ensure that the argument of // acos(.) is inside the interval [-1, 1]. verAzi=Modelica.Math.acos( Buildings.Utilities.Math.Functions.smoothLimit(x=rat, l=-1+deltaX, u=1-deltaX, deltaX=deltaX/10)); end WallSolarAzimuth;

Automatically generated Thu Jun 19 10:54:25 2014.