Buildings.BoundaryConditions.SolarGeometry

Package with models to compute solar geometry

Information

This package contains models to compute the solar geometry and incidence angles on tilted surfaces.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.BoundaryConditions.SolarGeometry.IncidenceAngle IncidenceAngle Solar incidence angle on a tilted surface
Buildings.BoundaryConditions.SolarGeometry.ProjectedShadowLength ProjectedShadowLength Length of shadow projected onto a direction
Buildings.BoundaryConditions.SolarGeometry.ZenithAngle ZenithAngle Zenith angle
Buildings.BoundaryConditions.SolarGeometry.Examples Examples Collection of models that illustrate model use and test models
Buildings.BoundaryConditions.SolarGeometry.BaseClasses BaseClasses Package with base classes for Buildings.BoundaryConditions.SolarGeometry

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

Solar incidence angle on a tilted surface

Buildings.BoundaryConditions.SolarGeometry.IncidenceAngle

Information

This component computes the solar incidence angle on a tilted surface. For a definition of the parameters, see the User's Guide Buildings.BoundaryConditions.UsersGuide.

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

Parameters

TypeNameDefaultDescription
Anglelat Latitude [rad]
Angleazi Surface azimuth [rad]
Angletil Surface tilt [rad]

Connectors

TypeNameDescription
output RealOutputyIncidence angle [rad]
BusweaBusWeather data

Modelica definition

block IncidenceAngle "Solar incidence angle on a tilted surface" extends Modelica.Blocks.Icons.Block; parameter Modelica.SIunits.Angle lat "Latitude"; parameter Modelica.SIunits.Angle azi "Surface azimuth"; parameter Modelica.SIunits.Angle til "Surface tilt"; Modelica.Blocks.Interfaces.RealOutput y( final quantity="Angle", final unit="rad", displayUnit="deg") "Incidence angle"; WeatherData.Bus weaBus "Weather data"; protected Buildings.BoundaryConditions.SolarGeometry.BaseClasses.Declination decAng "Declination angle"; Buildings.BoundaryConditions.SolarGeometry.BaseClasses.SolarHourAngle solHouAng "Solar hour angle"; Buildings.BoundaryConditions.SolarGeometry.BaseClasses.IncidenceAngle incAng( final lat=lat, final azi=azi, final til=til) "Incidence angle"; equation connect(incAng.incAng, y); connect(decAng.decAng, incAng.decAng); connect(solHouAng.solHouAng, incAng.solHouAng); connect(weaBus.cloTim, decAng.nDay); connect(weaBus.solTim, solHouAng.solTim); end IncidenceAngle;

Buildings.BoundaryConditions.SolarGeometry.ProjectedShadowLength Buildings.BoundaryConditions.SolarGeometry.ProjectedShadowLength

Length of shadow projected onto a direction

Buildings.BoundaryConditions.SolarGeometry.ProjectedShadowLength

Information

This component computes the length of a shadow projected onto a horizontal plane into the direction that is perpendicular to the surface azimuth azi.

The parameter azi is the azimuth of the surface that is perpendicular to the direction of the view. For example, if azi=Buildings.Types.Azimuth.S, then one is looking towards South. Hence, in the Northern hemisphere, at noon, the length of the shadow is negative as one is looking towards South but the shadow is in ones back. Similarly, for azi=Buildings.Types.Azimuth.E, there is a shade of negative length in the morning, and of positive length in the afternoon. The example Buildings.BoundaryConditions.SolarGeometry.Examples.ProjectedShadowLength illustrates this.

For a definition of the parameters, see the User's Guide Buildings.BoundaryConditions.UsersGuide. The surface azimuth is defined in Buildings.Types.Azimuth.

The component requires as parameters the longitude, latitude and time zone. These can automatically be assigned by setting the parameter filNam to a weather data file, in which case these values are read from the weather data file.

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

Parameters

TypeNameDefaultDescription
Lengthh Height of surface [m]
Angleazi Surface azimuth [rad]
Location
StringfilNam""Name of weather data file (used to read longitude, latitude and time zone)
AnglelonBuildings.BoundaryConditions...Longitude [rad]
AnglelatBuildings.BoundaryConditions...Latitude [rad]
TimetimZonBuildings.BoundaryConditions...Time zone [s]

Connectors

TypeNameDescription
output RealOutputyProjected shadow length [m]

Modelica definition

block ProjectedShadowLength "Length of shadow projected onto a direction" extends Modelica.Blocks.Icons.Block; parameter String filNam="" "Name of weather data file (used to read longitude, latitude and time zone)"; parameter Modelica.SIunits.Angle lon(displayUnit="deg")= Buildings.BoundaryConditions.WeatherData.BaseClasses.getLongitudeTMY3( absFilNam) "Longitude"; parameter Modelica.SIunits.Angle lat(displayUnit="deg")= Buildings.BoundaryConditions.WeatherData.BaseClasses.getLatitudeTMY3( absFilNam) "Latitude"; parameter Modelica.SIunits.Time timZon(displayUnit="h")= Buildings.BoundaryConditions.WeatherData.BaseClasses.getTimeZoneTMY3(absFilNam) "Time zone"; parameter Modelica.SIunits.Length h "Height of surface"; parameter Modelica.SIunits.Angle azi "Surface azimuth"; Modelica.Blocks.Interfaces.RealOutput y( final quantity="Length", final unit="m") "Projected shadow length"; protected final parameter String absFilNam = Buildings.BoundaryConditions.WeatherData.BaseClasses.getAbsolutePath(filNam) "Absolute path of the file"; WeatherData.BaseClasses.LocalCivilTime locTim( final lon=lon, final timZon=timZon) "Local civil time"; WeatherData.BaseClasses.EquationOfTime eqnTim "Equation of time"; WeatherData.BaseClasses.SolarTime solTim "Solar time"; Utilities.Time.ModelTime modTim "Model time"; BaseClasses.Declination decAng "Declination angle"; Buildings.BoundaryConditions.SolarGeometry.BaseClasses.ZenithAngle zen( final lat=lat) "Solar zenith angle"; Modelica.Blocks.Math.Tan tan "Tangent of solar zenith angle"; Modelica.Blocks.Math.Gain shaLen(k=-h) "Length of shadow"; BaseClasses.SolarAzimuth solAzi( final lat=lat) "Solar azimuth"; Modelica.Blocks.Sources.Constant surAzi(final k=azi) "Surface azimuth"; Modelica.Blocks.Math.Add add( final k1=1, final k2=-1) "Angle between surface azimuth and solar azimuth"; Modelica.Blocks.Math.Cos cos "Cosine"; Modelica.Blocks.Math.Product proShaLen "Projected shadow length"; BaseClasses.SolarHourAngle solHouAng "Solar hour angle"; Modelica.Blocks.Sources.RealExpression pShaLen( y=noEvent(if abs(zen.zen) < 0.5*Modelica.Constants.pi then proShaLen.y else 0.0)) "Projected shadow length"; equation connect(tan.u, zen.zen); connect(tan.y, shaLen.u); connect(solAzi.zen, zen.zen); connect(add.u1, surAzi.y); connect(solAzi.solAzi, add.u2); connect(add.y, cos.u); connect(shaLen.y, proShaLen.u2); connect(proShaLen.u1, cos.y); connect(solHouAng.solHouAng, zen.solHouAng); connect(modTim.y,locTim. cloTim); connect(modTim.y,eqnTim. nDay); connect(eqnTim.eqnTim, solTim.equTim); connect(locTim.locTim, solTim.locTim); connect(solHouAng.solTim, solTim.solTim); connect(decAng.nDay, modTim.y); connect(zen.decAng, decAng.decAng); connect(solAzi.decAng, decAng.decAng); connect(solAzi.solTim, solTim.solTim); connect(pShaLen.y, y); end ProjectedShadowLength;

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

Zenith angle

Buildings.BoundaryConditions.SolarGeometry.ZenithAngle

Information

This component computes the zenith angle, which is the angle between the earth surface normal and the sun beam. For a definition of the parameters, see the User's Guide Buildings.BoundaryConditions.UsersGuide.

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

Parameters

TypeNameDefaultDescription
Anglelat Latitude [rad]

Connectors

TypeNameDescription
output RealOutputyZenith angle [rad]
BusweaBusWeather data

Modelica definition

block ZenithAngle "Zenith angle" extends Modelica.Blocks.Icons.Block; parameter Modelica.SIunits.Angle lat "Latitude"; Modelica.Blocks.Interfaces.RealOutput y( final quantity="Angle", final unit="rad", displayUnit="deg") "Zenith angle"; WeatherData.Bus weaBus "Weather data"; protected Buildings.BoundaryConditions.SolarGeometry.BaseClasses.ZenithAngle zen(final lat=lat); equation connect(zen.zen, y); connect(weaBus.solDec, zen.decAng); connect(weaBus.solHouAng, zen.solHouAng); end ZenithAngle;