modelWeather
Complex weather model
Information
Overview
Supplies weather data using a TRY - data set.
Concept
Input: a TRY data set in an accepted Modelica format (.mat, .txt, with header). The structure should be exactly the one of a TRY, status: TRY 2011.
Output:
- Total radiation on "n" oriented surfaces
- Cloud cover
- Wind direction
- Wind speed
- Air temperature
- Air pressure
- Mass fraction of water in dry air
- Relative humidity
- Long wave sky radiation on horizontal surface
- Long wave terrestrial radiation from horizontal surface
The outputs can be supplied individually or in one vector, with the exception of total solar radiation, which are always supplied separately in a vector.
Known Limitations
Be aware that the calculation of the total solar radiation may cause problems at simulation times close to sunset and sunrise. In this case, change the cut-off angles. refer to model RadOnTiltedSurf.
References
DWD: TRYHandbuch.2011.DWD,2011
Example Results
Examples.Weather.WeatherModels
-
May 02, 2013 by Ole Odendahl:
Formatted documentation appropriately, Rewarded 5*****! -
Mai 1, 2012 by Moritz Lauster and Ana Constantin:
Improved beyond belief. -
September 12, 2006 by Timo Haase:
Implemented.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Location Properties | |||
| Modelica.Units.NonSI.Angle_deg | Latitude | 49.5 | latitude of location |
| Modelica.Units.NonSI.Angle_deg | Longitude | 8.5 | longitude of location |
| Real | GroundReflection | 0.2 | ground reflection coefficient |
| Properties of Weather Data | |||
| Modelica.Units.NonSI.Time_hour | DiffWeatherDataTime | 1 | difference between weather data time and UTC, e.g. +1 for CET |
| String | tableName | "wetter" | table name on file or in function usertab |
| String | fileName | Modelica.Utilities.Files.loadResource("modelica://AixLib/Resources/weatherdata/TRY2010_12_Jahr_Modelica-Library.txt") | file where matrix is stored |
| String | formatTRY | "TRY 2010/2011" | File format of test reference year (TRY) |
| Real[:] | offset | {0} | offsets of output signals |
| Modelica.Blocks.Types.Smoothness | smoothness | Modelica.Blocks.Types.Smoothness.LinearSegments | Smoothness of table interpolation |
| Modelica.Blocks.Types.Extrapolation | extrapolation | Modelica.Blocks.Types.Extrapolation.Periodic | Extrapolation of data outside the definition range |
| Real[1] | startTime | {0} | output = offset for time < startTime (same value for all columns) |
| Solar radiation on oriented surfaces | |||
| DataBase.Weather.SurfaceOrientation.SurfaceOrientationBaseDataDefinition | SOD | DataBase.Weather.SurfaceOrientation.SurfaceOrientationData_N_E_S_W_Hor() | Surface orientation data |
| Optional output vector | |||
| Boolean | outOpt | true | Output individual vectors instead of one vector [-] |
| Boolean | Cloud_cover | false | Cloud cover [-] (TRY col 7) |
| Boolean | Wind_dir | false | Wind direction [deg] (TRY col 8) |
| Boolean | Wind_speed | false | Wind speed [m/s] (TRY col 9) |
| Boolean | Air_temp | false | Air temperature [K] (TRY col 10) |
| Boolean | Air_press | false | Air pressure [Pa] (TRY col 11) |
| Boolean | Mass_frac | false | Mass fraction of water in dry air [kg/kg] (TRY col 12) |
| Boolean | Rel_hum | false | Realtive humidity of air [-] (TRY col 13) |
| Boolean | Sky_rad | false | Longwave sky radiation on horizontal [W/m2] (TRY col 18) |
| Boolean | Ter_rad | false | Longwave terrestric radiation from horizontal [W/m2] (TRY col 19) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Utilities.Interfaces.SolarRad_out[SOD.nSurfaces] | SolarRadiation_OrientedSurfaces | ||
| Modelica.Blocks.Interfaces.RealOutput[m] | WeatherDataVector | ||
| Modelica.Blocks.Interfaces.RealOutput | CloudCover | [0..8] | |
| Modelica.Blocks.Interfaces.RealOutput | WindDirection | in deg [0...360] | |
| Modelica.Blocks.Interfaces.RealOutput | WindSpeed | in m/s | |
| Modelica.Blocks.Interfaces.RealOutput | AirTemp | in Kelvin | |
| Modelica.Blocks.Interfaces.RealOutput | AirPressure | in Pa | |
| Modelica.Blocks.Interfaces.RealOutput | WaterInAir | in kg/kg | |
| Modelica.Blocks.Interfaces.RealOutput | RelHumidity | in percent | |
| Modelica.Blocks.Interfaces.RealOutput | SkyRadiation | in W/m2 | |
| Modelica.Blocks.Interfaces.RealOutput | TerrestrialRadiation | in W/m2 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| BaseClasses.Sun | Sun | ||
| RadOnTiltedSurface[SOD.nSurfaces] | RadOnTiltedSurf | ||
| Modelica.Blocks.Sources.CombiTimeTable | WeatherData | ||
| Modelica.Blocks.Routing.DeMultiplex3 | deMultiplex | ||
| Modelica.Blocks.Math.Gain | hPa_to_Pa | ||
| Modelica.Blocks.Math.Gain | percent_to_unit | ||
| Modelica.Blocks.Math.Gain | g_to_kg | ||
| Modelica.Blocks.Math.UnitConversions.From_degC | from_degC |
Contents
| Name | Description |
|---|---|