IEA EBC Annex 60 EBC logo

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples

Collection of models that illustrate model use and test models

Information

This package contains examples for the use of models that can be found in Annex60.BoundaryConditions.WeatherData.BaseClasses.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckBlackBodySkyTemperature CheckBlackBodySkyTemperature Test model for CheckBlackBodySkyTemperature
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckCeilingHeight CheckCeilingHeight Test model for ceiling height check
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckPressure CheckPressure Test model for pressure check
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckRadiation CheckRadiation Test model for CheckRadiation
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckRelativeHumidity CheckRelativeHumidity Test model for CheckRelativeHumidity
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckSkyCover CheckSkyCover Test model for checking sky cover
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckTemperature CheckTemperature Test model for CheckTemperature
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckWindDirection CheckWindDirection Test model for wind direction check
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckWindSpeed CheckWindSpeed Test model for wind speed check
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRadiation ConvertRadiation Test model for ConvertRadiation
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRelativeHumidity ConvertRelativeHumidity Test model for converting relative humidity and checking its validity
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertTime ConvertTime Test model for converting time
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.EquationOfTime EquationOfTime Test model for equation of time
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.GetAbsolutePath GetAbsolutePath Test model to get the absolute path of a URI
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.GetHeaderElement GetHeaderElement Test model to get header element
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.LocalCivilTime LocalCivilTime Test model for calculate local civil time
Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.SolarTime SolarTime Test model for solar time

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckBlackBodySkyTemperature Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckBlackBodySkyTemperature

Test model for CheckBlackBodySkyTemperature

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckBlackBodySkyTemperature

Information

This example tests the model that checks the black-body sky temperature.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model CheckBlackBodySkyTemperature "Test model for CheckBlackBodySkyTemperature" extends Modelica.Icons.Example; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckBlackBodySkyTemperature cheSkyBlaBodTem "Check for the black body sky temperature"; Modelica.Blocks.Sources.Ramp TBlaBod( height=140-0.02, duration=1, offset=273.15 - 69.99) "Black body sky temperature"; equation connect(TBlaBod.y, cheSkyBlaBodTem.TIn); end CheckBlackBodySkyTemperature;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckCeilingHeight Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckCeilingHeight

Test model for ceiling height check

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckCeilingHeight

Information

This example tests the model that constrains the ceiling height.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model CheckCeilingHeight "Test model for ceiling height check" extends Modelica.Icons.Example; Annex60.Utilities.Time.ModelTime modTim; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckCeilingHeight cheCeiHei "Block that constrains the ceiling height"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertTime conTim "Block that converts time"; protected Modelica.Blocks.Tables.CombiTable1Ds datRea( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( "modelica://Annex60/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), columns=2:30, smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) "Data reader"; equation connect(datRea.y[20], cheCeiHei.ceiHeiIn); connect(modTim.y, conTim.modTim); connect(conTim.calTim, datRea.u); end CheckCeilingHeight;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckPressure Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckPressure

Test model for pressure check

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckPressure

Information

This example tests the model that asserts that the pressure is within acceptable bounds.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model CheckPressure "Test model for pressure check" extends Modelica.Icons.Example; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckPressure chePre "Block that checks the pressure"; Annex60.Utilities.Time.ModelTime modTim "Block that outputs simulation time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertTime conTim "Block that converts time"; protected Modelica.Blocks.Tables.CombiTable1Ds datRea( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( "modelica://Annex60/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), columns=2:30, smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) "Data reader"; equation connect(datRea.y[4], chePre.PIn); connect(modTim.y, conTim.modTim); connect(conTim.calTim, datRea.u); end CheckPressure;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckRadiation Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckRadiation

Test model for CheckRadiation

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckRadiation

Information

This example tests the model that constrains the radiation.

Extends from Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRadiation (Test model for ConvertRadiation).

Modelica definition

model CheckRadiation "Test model for CheckRadiation" extends Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRadiation; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckRadiation cheGloRad "Check global horizontal radiation"; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckRadiation cheDifRad "Check diffuse horizontal radiation"; equation connect(conGloRad.HOut, cheGloRad.HIn); connect(conDifRad.HOut, cheDifRad.HIn); end CheckRadiation;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckRelativeHumidity Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckRelativeHumidity

Test model for CheckRelativeHumidity

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckRelativeHumidity

Information

This example tests the model that constrains the relative humidity.

Extends from Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRelativeHumidity (Test model for converting relative humidity and checking its validity).

Modelica definition

model CheckRelativeHumidity "Test model for CheckRelativeHumidity" extends Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRelativeHumidity; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckRelativeHumidity cheRelHum "Block that constrains the relative humidity"; equation connect(conRelHum.relHumOut, cheRelHum.relHumIn); end CheckRelativeHumidity;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckSkyCover Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckSkyCover

Test model for checking sky cover

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckSkyCover

Information

This example tests the model that constrains the sky cover.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model CheckSkyCover "Test model for checking sky cover" extends Modelica.Icons.Example; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckSkyCover cheTotSkyCov "Check total sky cover"; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckSkyCover cheOpaSkyCov "Check opaque sky cover"; protected Annex60.Utilities.Time.ModelTime modTim "Generate simulation time"; Modelica.Blocks.Tables.CombiTable1Ds datRea( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( "modelica://Annex60/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), columns=2:30, smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) "Data reader"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertTime conTim; Modelica.Blocks.Math.Gain conTotSkyCov(final k=0.1) "Convert sky cover from [0...10] to [0...1]"; Modelica.Blocks.Math.Gain conOpaSkyCov1(final k=0.1) "Convert sky cover from [0...10] to [0...1]"; equation connect(modTim.y, conTim.modTim); connect(conTim.calTim, datRea.u); connect(datRea.y[17], conTotSkyCov.u); connect(datRea.y[18], conOpaSkyCov1.u); connect(conTotSkyCov.y, cheTotSkyCov.nIn); connect(conOpaSkyCov1.y, cheOpaSkyCov.nIn); end CheckSkyCover;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckTemperature Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckTemperature

Test model for CheckTemperature

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckTemperature

Information

This example tests the model that checks the temperature.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model CheckTemperature "Test model for CheckTemperature" extends Modelica.Icons.Example; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckTemperature cheTemDryBul "Check dry bulb temperature "; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckTemperature cheTemDewPoi "Check dew point temperature"; Annex60.Utilities.Time.ModelTime modTim "Block that outputs the model time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertTime conTim "Block that converts time"; Modelica.Blocks.Math.UnitConversions.From_degC from_degC "Block that converts temperature"; Modelica.Blocks.Math.UnitConversions.From_degC from_degC1 "Block that converts temperature"; protected Modelica.Blocks.Tables.CombiTable1Ds datRea( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( "modelica://Annex60/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), columns=2:30, smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) "Data reader"; equation connect(modTim.y, conTim.modTim); connect(conTim.calTim, datRea.u); connect(datRea.y[1], from_degC.u); connect(from_degC.y, cheTemDryBul.TIn); connect(datRea.y[2], from_degC1.u); connect(from_degC1.y, cheTemDewPoi.TIn); end CheckTemperature;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckWindDirection Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckWindDirection

Test model for wind direction check

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckWindDirection

Information

This example tests the model that constrains the wind direction.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model CheckWindDirection "Test model for wind direction check" extends Modelica.Icons.Example; Annex60.Utilities.Time.ModelTime modTim; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckWindDirection cheWinDir "Block that constrains the wind direction"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertTime conTim "Block that converts time"; Modelica.Blocks.Math.UnitConversions.From_deg from_deg "Block that converts temperature"; protected Modelica.Blocks.Tables.CombiTable1Ds datRea( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( "modelica://Annex60/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), columns=2:30, smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) "Data reader"; equation connect(modTim.y, conTim.modTim); connect(conTim.calTim, datRea.u); connect(datRea.y[15], from_deg.u); connect(from_deg.y, cheWinDir.nIn); end CheckWindDirection;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckWindSpeed Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckWindSpeed

Test model for wind speed check

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.CheckWindSpeed

Information

This example tests the model that constrains the wind speed.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model CheckWindSpeed "Test model for wind speed check" extends Modelica.Icons.Example; Annex60.Utilities.Time.ModelTime modTim "Block that outputs simulation time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.CheckWindSpeed cheWinSpe "Block that constrains the wind speed"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertTime conTim "Block that converts time"; protected Modelica.Blocks.Tables.CombiTable1Ds datRea( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( "modelica://Annex60/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), columns=2:30, smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) "Data reader"; equation connect(datRea.y[16], cheWinSpe.winSpeIn); connect(modTim.y, conTim.modTim); connect(conTim.calTim, datRea.u); end CheckWindSpeed;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRadiation Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRadiation

Test model for ConvertRadiation

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRadiation

Information

This example tests the model that converts radiation.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model ConvertRadiation "Test model for ConvertRadiation" extends Modelica.Icons.Example; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertRadiation conGloRad "Convert units for global horizontal radiation"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertRadiation conDifRad "Convert units for diffuse horizontal radiation"; Annex60.Utilities.Time.ModelTime modTim "Block that outputs simulation time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertTime timCon "Convert simmulation time to calendar time"; protected Modelica.Blocks.Tables.CombiTable1Ds datRea( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( "modelica://Annex60/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), columns=2:30, smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) "Data reader"; equation connect(timCon.calTim, datRea.u); connect(datRea.y[8], conGloRad.HIn); connect(datRea.y[10], conDifRad.HIn); connect(modTim.y, timCon.modTim); end ConvertRadiation;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRelativeHumidity Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRelativeHumidity

Test model for converting relative humidity and checking its validity

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertRelativeHumidity

Information

This example tests the model that converts relative humidity.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model ConvertRelativeHumidity "Test model for converting relative humidity and checking its validity" extends Modelica.Icons.Example; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertRelativeHumidity conRelHum "Block that converts relative humidity"; Annex60.Utilities.Time.ModelTime modTim "Block that outputs simulation time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertTime conTim "Block that converts time"; protected Modelica.Blocks.Tables.CombiTable1Ds datRea( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( "modelica://Annex60/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), columns=2:30, smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) "Data reader"; equation connect(datRea.y[3], conRelHum.relHumIn); connect(modTim.y, conTim.modTim); connect(conTim.calTim, datRea.u); end ConvertRelativeHumidity;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertTime Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertTime

Test model for converting time

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.ConvertTime

Information

This example tests the model that converts time.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model ConvertTime "Test model for converting time" extends Modelica.Icons.Example; Annex60.Utilities.Time.ModelTime modTim "Block that outputs simulation time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.ConvertTime conTim "Block that converts time"; equation connect(modTim.y, conTim.modTim); end ConvertTime;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.EquationOfTime Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.EquationOfTime

Test model for equation of time

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.EquationOfTime

Information

This example tests the model that computes the equation of time.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model EquationOfTime "Test model for equation of time" extends Modelica.Icons.Example; Utilities.Time.ModelTime modTim "Block that outputs simulation time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.EquationOfTime eqnTim "Block that computes the equation of time"; equation connect(modTim.y, eqnTim.nDay); end EquationOfTime;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.GetAbsolutePath Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.GetAbsolutePath

Test model to get the absolute path of a URI

Information

This model tests the function that gets the absolute path of a URI.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
Stringf"modelica://Annex60/package....Name of a file that exists
StringfAbsAnnex60.BoundaryConditions.W...Absolute path of f

Modelica definition

model GetAbsolutePath "Test model to get the absolute path of a URI" extends Modelica.Icons.Example; parameter String f = "modelica://Annex60/package.mo" "Name of a file that exists"; parameter String fAbs= Annex60.BoundaryConditions.WeatherData.BaseClasses.getAbsolutePath(uri=f) "Absolute path of f"; final parameter Integer dummy = 1 "Dummy variable, used to have a result as needed for the unit tests"; initial algorithm Modelica.Utilities.Streams.print("Absolute path = " + fAbs); end GetAbsolutePath;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.GetHeaderElement Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.GetHeaderElement

Test model to get header element

Information

This example tests getting the header of the TMY3 weather data file.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
Anglelongitude Longitude [rad]
Anglelatitude Latitude [rad]
TimetimeZone Time zone [s]
StringfilNam"modelica://Annex60/Resource...Name of weather data file

Modelica definition

model GetHeaderElement "Test model to get header element" extends Modelica.Icons.Example; parameter Modelica.SIunits.Angle longitude(fixed=false, displayUnit="deg") "Longitude"; parameter Modelica.SIunits.Angle latitude(fixed=false, displayUnit="deg") "Latitude"; parameter Modelica.SIunits.Time timeZone(fixed=false, displayUnit="h") "Time zone"; parameter String filNam = "modelica://Annex60/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos" "Name of weather data file"; final parameter String absFilNam = Annex60.BoundaryConditions.WeatherData.BaseClasses.getAbsolutePath(filNam) "Absolute path of the file"; initial equation longitude = Annex60.BoundaryConditions.WeatherData.BaseClasses.getLongitudeTMY3( filNam=absFilNam); latitude = Annex60.BoundaryConditions.WeatherData.BaseClasses.getLatitudeTMY3( filNam=absFilNam); timeZone = Annex60.BoundaryConditions.WeatherData.BaseClasses.getTimeZoneTMY3( filNam=absFilNam); assert(abs(longitude*180/Modelica.Constants.pi+87.92) < 1, "Error when parsing longitude, longitude = " + String(longitude)); assert(abs(latitude*180/Modelica.Constants.pi-41.98) < 1, "Error when parsing latitude, latitude = " + String(latitude)); assert(abs(timeZone+6*3600) < 1, "Error when parsing time zone, timeZone = " + String(timeZone)); end GetHeaderElement;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.LocalCivilTime Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.LocalCivilTime

Test model for calculate local civil time

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.LocalCivilTime

Information

This example tests the model that computes the local civil time.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model LocalCivilTime "Test model for calculate local civil time" extends Modelica.Icons.Example; Annex60.Utilities.Time.ModelTime modTim "Block that outputs the model time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.LocalCivilTime locTim( timZon=-21600, lon=-1.5293932423067); equation connect(modTim.y, locTim.cloTim); end LocalCivilTime;

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.SolarTime Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.SolarTime

Test model for solar time

Annex60.BoundaryConditions.WeatherData.BaseClasses.Examples.SolarTime

Information

This example tests the model that computes the solar time.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model SolarTime "Test model for solar time" extends Modelica.Icons.Example; Utilities.Time.ModelTime modTim "Block that outputs simulation time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.LocalCivilTime locTim( timZon=-21600, lon=-1.7039261675061) "Block that computes the local civil time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.SolarTime solTim "Block that computes the solar time"; Annex60.BoundaryConditions.WeatherData.BaseClasses.EquationOfTime eqnTim "Block that computes the equation of time"; equation connect(modTim.y, locTim.cloTim); connect(locTim.locTim, solTim.locTim); connect(modTim.y, eqnTim.nDay); connect(eqnTim.eqnTim, solTim.equTim); end SolarTime;

http://iea-annex60.org