Bus
that
is used in the library to provide weather data to the different models.
Name | Description |
---|---|
UsersGuide | User's Guide |
ReaderTMY3 | Reader for TMY3 weather data |
Bus | Data bus that stores weather data |
Examples | Collection of models that illustrate model use and test models |
BaseClasses | Library with base classes to read weather data |
This component reads TMY3 weather data (Wilcox and Marion, 2008).
The parameter
lon
is the longitude of the weather station, and
the parameter timZone
is the time zone
relative to Greenwich Mean Time.
By default, the reader obtains values for these parameters
by scanning the TMY3 weather data file.
To read weather data from the TMY3 weather data file, there are two data readers in this model. One data reader obtains all data except solar radiation, and the other data reader reads only the solar radiation data, shifted by 30 minutes. The reason for this time shift is as follows: The TMY3 weather data file contains for solar radiation the "...radiation received on a horizontal surface during the 60-minute period ending at the timestamp." Thus, as the figure below shows, a more accurate interpolation is obtained if time is shifted by 30 minutes prior to reading the weather data.
Type | Name | Default | Description |
---|---|---|---|
String | filNam | Name of weather data file |
Type | Name | Description |
---|---|---|
Bus | weaBus | Weather Data Bus |
block ReaderTMY3 "Reader for TMY3 weather data " public parameter String filNam "Name of weather data file"; final parameter Modelica.SIunits.Angle lon(displayUnit="deg")= Buildings.BoundaryConditions.WeatherData.BaseClasses.getLongitudeTMY3(filNam) "Longitude"; final parameter Modelica.SIunits.Time timZon(displayUnit="h")= Buildings.BoundaryConditions.WeatherData.BaseClasses.getTimeZoneTMY3(filNam) "Time zone";Bus weaBus "Weather Data Bus"; protected Modelica.Blocks.Tables.CombiTable1Ds datRea( final tableOnFile=true, final tableName="tab1", final fileName=filNam, final smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative, final columns={2,3,4,5,6,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29, 30}) "Data reader"; Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertTemperature conTemDryBul "Converts unit for dry bulb temperature "; Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertTemperature conTemDewPoi "Converts unit for dew point temperature"; Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertRelativeHumidity conHum "Converts the relative humidity from percentage to [0, 1] and constrains it to [0, 1]"; BaseClasses.CheckPressure chePre "Checks the air pressure"; BaseClasses.CheckSkyCover cheTotSkyCov "Checks the total sky cover"; BaseClasses.CheckSkyCover cheOpaSkyCov "Checks the opaque sky cover"; Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertRadiation cheGloHorRad "Checks the global horizontal radiation"; Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertRadiation cheDifHorRad "Checks the diffuse horizontal radiation"; Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertRadiation cheDirNorRad "Checks the direct normal radiation"; BaseClasses.CheckCeilingHeight cheCeiHei "Checks the ceiling height"; BaseClasses.CheckWindSpeed cheWinSpe "Checks the wind speed"; BaseClasses.ConvertRadiation cheRadHor "Checks the horizontal radiation"; BaseClasses.CheckWindDirection cheWinDir "Checks the wind direction"; SkyTemperature.BlackBody TBlaSky(calTSky=0) "Checks the sky black-body temperature"; Utilities.SimulationTime simTim "Simulation time"; Modelica.Blocks.Math.Add add "Adds 30 minutes to time to shift weather data reader"; Modelica.Blocks.Sources.Constant con30mins(k=1800) "Constant used to shift weather data reader"; Buildings.BoundaryConditions.WeatherData.BaseClasses.LocalCivilTime locTim( lon=lon, timZon=timZon) "Local civil time"; Modelica.Blocks.Tables.CombiTable1Ds datRea1( final tableOnFile=true, final tableName="tab1", final fileName=filNam, final smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative, final columns=8:11) "Data reader"; Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertTime conTim1 "Converts simulation time to calendar time"; BaseClasses.ConvertTime conTim "Converts simulation time to calendar time"; BaseClasses.EquationOfTime eqnTim "Equation of time"; BaseClasses.SolarTime solTim "Solar time"; equationconnect(conTemDryBul.TemK, weaBus.TDryBul); connect(conTemDewPoi.TemK, weaBus.TDewPoi); connect(conHum.relHumOut, weaBus.relHum); connect(chePre.POut, weaBus.pAtm); connect(cheTotSkyCov.nOut, weaBus.nTot); connect(cheOpaSkyCov.nOut, weaBus.nOpa); connect(cheGloHorRad.HOut, weaBus.HGloHor); connect(cheDifHorRad.HOut, weaBus.HDifHor); connect(cheDirNorRad.HOut, weaBus.HDirNor); connect(cheCeiHei.ceiHeiOut, weaBus.celHei); connect(cheWinSpe.winSpeOut, weaBus.winSpe); connect(cheRadHor.HOut, weaBus.radHor); connect(cheWinDir.nOut, weaBus.winDir); connect(conTemDryBul.TemK, TBlaSky.TDryBul); connect(conTemDewPoi.TemK, TBlaSky.TDewPoi); connect(cheOpaSkyCov.nOut, TBlaSky.nOpa); connect(cheRadHor.HOut, TBlaSky.radHor); connect(TBlaSky.TBlaSky, weaBus.TBlaSky); connect(simTim.y, weaBus.cloTim); connect(simTim.y, add.u2); connect(con30mins.y, add.u1); connect(datRea1.y[1], cheRadHor.HIn); connect(datRea1.y[3], cheDirNorRad.HIn); connect(datRea1.y[2], cheGloHorRad.HIn); connect(datRea1.y[4], cheDifHorRad.HIn); connect(add.y,conTim1. simTim); connect(conTim1.calTim, datRea1.u); connect(simTim.y, locTim.cloTim); connect(simTim.y, conTim.simTim); connect(conTim.calTim, datRea.u); connect(simTim.y, eqnTim.nDay); connect(eqnTim.eqnTim, solTim.equTim); connect(locTim.locTim, solTim.locTim); connect(solTim.solTim, weaBus.solTim); connect(datRea.y[11], cheWinDir.nIn); connect(datRea.y[1], conTemDryBul.TemC); connect(datRea.y[2], conTemDewPoi.TemC); connect(datRea.y[3], conHum.relHumIn); connect(datRea.y[13], cheTotSkyCov.nIn); connect(datRea.y[14], cheOpaSkyCov.nIn); connect(datRea.y[12], cheWinSpe.winSpeIn); connect(datRea.y[4], chePre.PIn); connect(datRea.y[16], cheCeiHei.ceiHeiIn); end ReaderTMY3;
This component is an expandable connector that is used to implement a bus that contains the weather data.
Extends from Modelica.Icons.SignalBus (Icon for signal bus).
expandable connector Bus "Data bus that stores weather data" extends Modelica.Icons.SignalBus;end Bus;